@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   HostixOS Enterprise — Global Typography & Modern Form Control System
   ========================================================================== */

/* 1. Global Modern Typography (Inter Font Family & Crisp Font Smoothing) */
:root {
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    --hx-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    --hx-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

*, *::before, *::after {
    font-family: inherit;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

button, input, select, textarea, optgroup, option, label, .form-control, .form-select, .form-label, .badge {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Premium Enterprise Select & Dropdown Controls (Razorpay / Stripe SaaS Standards) */
.form-select,
select.form-select,
.hx-modern-select,
.hx-portal-select,
.hx-package-select {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 0.65rem 2.6rem 0.65rem 1rem !important;
    height: 48px !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04) !important;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-position: right 1rem center !important;
    background-size: 14px 9px !important;
    background-repeat: no-repeat !important;
    transition: border-color 0.18s ease-in-out, box-shadow 0.18s ease-in-out, background-color 0.18s ease-in-out !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.form-select:hover,
select.form-select:hover,
.hx-portal-select:hover,
.hx-package-select:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 4px 0 rgba(15, 23, 42, 0.06) !important;
}

.form-select:focus,
select.form-select:focus,
.hx-portal-select:focus,
.hx-package-select:focus {
    border-color: #126BFF !important;
    outline: none !important;
    box-shadow: 0 0 0 3.5px rgba(18, 107, 255, 0.15), 0 1px 2px 0 rgba(15, 23, 42, 0.05) !important;
    background-color: #ffffff !important;
}

.form-select option,
select option {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    padding: 10px 14px !important;
}

/* 3. Modern Text Input & Form Controls */
.form-control,
input.form-control,
textarea.form-control {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 0.7rem 1rem !important;
    height: 48px;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.18s ease-in-out, box-shadow 0.18s ease-in-out !important;
}

textarea.form-control {
    height: auto;
    min-height: 90px;
}

.form-control:hover {
    border-color: #94a3b8 !important;
}

.form-control:focus {
    border-color: #126BFF !important;
    outline: none !important;
    box-shadow: 0 0 0 3.5px rgba(18, 107, 255, 0.15), 0 1px 2px 0 rgba(15, 23, 42, 0.05) !important;
    background-color: #ffffff !important;
}

/* 4. Modern Input Groups & Unified Input Shell */
.hx-input-group {
    display: flex;
    align-items: center;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    height: 48px !important;
    min-height: 48px !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.18s ease-in-out, box-shadow 0.18s ease-in-out !important;
    overflow: hidden !important;
    position: relative;
    width: 100%;
}

.hx-input-group:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 4px 0 rgba(15, 23, 42, 0.06) !important;
}

.hx-input-group:focus-within {
    border-color: #126BFF !important;
    box-shadow: 0 0 0 3.5px rgba(18, 107, 255, 0.15), 0 1px 2px 0 rgba(15, 23, 42, 0.05) !important;
}

.hx-input-group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1rem;
    padding-right: 0.25rem;
    color: #64748b !important;
    font-size: 1rem !important;
    background: transparent !important;
    border: none !important;
    flex-shrink: 0;
}

.hx-input-group-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1rem;
    padding-right: 0.85rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: #334155 !important;
    background-color: #f8fafc !important;
    border-right: 1.5px solid #cbd5e1 !important;
    height: 100%;
    flex-shrink: 0;
}

.hx-input-group .form-control,
.hx-input-group input.form-control {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: 100% !important;
    padding: 0 0.85rem !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    outline: none !important;
    flex: 1 1 auto;
    width: 1%;
}

.hx-input-group .form-control:focus,
.hx-input-group input.form-control:focus {
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Fallback/Reset for Standard Bootstrap .input-group */
.input-group {
    border-radius: 12px !important;
}
.input-group > .input-group-text {
    border: 1.5px solid #cbd5e1 !important;
    border-right: none !important;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    background-color: #f8fafc !important;
    color: #64748b !important;
    height: 48px;
    padding: 0 1rem;
    font-family: 'Inter', sans-serif !important;
}
.input-group > .form-control {
    border: 1.5px solid #cbd5e1 !important;
    border-left: none !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    height: 48px;
}
.input-group:focus-within > .input-group-text,
.input-group:focus-within > .form-control {
    border-color: #126BFF !important;
}

/* 5. Labels & Form Headings */
.form-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    letter-spacing: -0.15px !important;
}

/* 6. Validation Messages */
.validation-message {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #ef4444 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    margin-top: 0.35rem !important;
}

/* 7. General Anchor & Buttons */
a, .btn-link {
    color: #126BFF;
}

.btn-primary {
    color: #fff;
    background-color: #126BFF;
    border-color: #0A4FCC;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* 8. Modern Workspace Watermark (Brand Icon Only) */
.hx-workspace-watermark {
    position: absolute;
    bottom: 2rem;
    right: 2.5rem;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    opacity: 0.035;
    transition: opacity 0.3s ease;
}

.hx-watermark-icon {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 44px;
    display: block;
}

@media (max-width: 1200px) {
    .hx-workspace-watermark {
        bottom: 1.5rem;
        right: 1.5rem;
        opacity: 0.03;
    }
    .hx-watermark-icon {
        width: 160px;
        height: 160px;
        border-radius: 32px;
    }
}

@media (max-width: 991.98px) {
    .hx-workspace-watermark {
        bottom: 1rem;
        right: 1rem;
        opacity: 0.02;
    }
    .hx-watermark-icon {
        width: 80px;
        height: 80px;
        border-radius: 16px;
    }
}

/* 9. Mobile Responsive Form Engine Optimizations */
@media (max-width: 767.98px) {
    /* 16px font-size prevents iOS Safari from auto-zooming on focus */
    .form-control,
    input.form-control,
    .form-select,
    select.form-select,
    .hx-portal-select,
    .hx-package-select,
    .hx-input-group input.form-control,
    .hx-input-group .form-control {
        font-size: 16px !important;
    }

    .hx-input-group {
        height: 48px !important;
        min-height: 48px !important;
    }

    .form-label {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }
}