/* ============================================================= */
/* ANTI-BLINK SCROLLBAR STABILIZER LAYER                         */
/* ============================================================= */
/* Forces the base document layout to always reserve scrollbar   */
/* architecture space. This prevents the viewport width from     */
/* jumping or blinking during modal transitions.                 */
html {
    overflow-y: scroll !important;
}

body.modal-open {
    padding-right: 0 !important; /* Overrides Bootstrap's layout shift recalculation padding */
    overflow-y: scroll !important; /* Retains track window background alignment state */
}

/* 1. Frosted White Glass Overlay Background Mask */
#freeTrialModal.modal {
    background: rgba(20, 21, 22, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important; /* Forces Safari/macOS hardware rendering path */
    padding: 0 !important;
}

/* Remove default harsh dark Bootstrap backdrop masking layer */
.modal-backdrop {
    display: none !important;
    visibility: hidden !important;
}

/* 2. Safari-Proof Flex Centering Engine */
#freeTrialModal .modal-dialog {
    max-width: 480px !important;
    width: 90% !important; /* Leaves breathing room on mobile viewports */
    margin: 0 auto !important; /* Let alignment rule govern */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important; 
    min-height: 100vh !important;
}

/* 3. The Isolated Floating White Card Box Canvas */
#freeTrialModal .modal-content {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    background-color: #ffffff !important;
    border: 0 !important;
    border-radius: 24px !important; /* Soft, premium curved desktop profile corners */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08) !important; /* Deep diffuse smooth drop shadow */
    padding: 3.5rem 2.5rem !important;
    box-sizing: border-box !important;
    flex: none !important; 
}

/* 4. Top Right Floating Close Button with Pure White Background */
#freeTrialModal .close-circle-btn {
    position: fixed !important; /* Fixed shifts the element relative to the window overlay screen */
    top: 25px !important;      /* Inset cleanly from top-right browser edges */
    right: 25px !important;
    width: 44px !important;     /* Clean sizing wrapper context */
    height: 44px !important;
    background: rgba(20, 21, 22, 0.3) !important; /* Transparent White Background Override */
    border: 1px solid #e2e8f0 !important; /* Crisp subtle perimeter border edge */
    color: #ffffff !important;   /* Sleek slate charcoal close cross color */
    border-radius: 50% !important; /* Absolute Circle */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important; /* Distinct shadow mapping to separate from blur */
    transition: all 0.2s ease-in-out !important;
    z-index: 9999 !important;   /* Pushes execution layout stack above everything else */
}

#freeTrialModal .close-circle-btn:hover {
    background: #f8fafc !important; /* Off-white hover tint */
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

/* Typography & Sizing Normalizations */
.modal-logo-brand {
    height: 55px !important;
    width: auto !important;
    object-fit: contain !important;
}

.tagline-heading {
    font-size: 1.5rem !important;
    letter-spacing: -0.3px !important;
    line-height: 1.35 !important;
}

/* 5. Stacked Input and Full-Width Button Configurations */
.form-input-field {
    border-radius: 8px !important; 
    border: 1px solid #ced4da !important;
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
    height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-input-field:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

.submit-action-btn-stacked {
    border-radius: 8px !important;
    background-color: #c00 !important;
    border: 0 !important;
    font-size: 1rem !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    width: 100% !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.submit-action-btn-stacked:hover {
    background-color: #a00 !important;
    color: #ffffff !important;
}

.submit-action-btn-stacked:active {
    transform: scale(0.99) !important;
}

/* Centered Dynamic Error Real Estate Box */
.ajax-feedback-error-field {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #dc3545 !important;
    margin-top: 0.6rem !important;
    text-align: center !important;
}