/* ================================
   Home Value Haven - Extras Stylesheet
   Updated: 2025-11-09
   Matches main form styling and design system
   ================================ */

/* ================================
   CRITICAL MODAL FIX - MUST BE FIRST
   ================================ */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1055 !important;
}

.modal-dialog {
    z-index: 1056 !important;
}

.modal-content {
    z-index: 1057 !important;
    background-color: #ffffff !important;
}

.modal-body,
.modal-header,
.modal-footer {
    background-color: #ffffff !important;
    color: #212121 !important;
}

/* ================================
   CSS VARIABLES (Match Main)
   ================================ */
:root {
    --primary-color: #2C4F7C;
    --primary-dark: #1a3352;
    --primary-light: #4a6b94;
    --accent-color: #3B9FD8;
    --accent-light: #5FB3E3;
    --accent-dark: #2586BE;
    --text-dark: #212121;
    --text-medium: #333333;
    --text-light: #757575;
    --white: #ffffff;
    --background-light: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #2C4F7C 0%, #4a6b94 100%);
    --gradient-accent: linear-gradient(135deg, #3B9FD8 0%, #5FB3E3 100%);
    --shadow-sm: 0 2px 8px rgba(44, 79, 124, 0.08);
    --shadow-md: 0 4px 16px rgba(44, 79, 124, 0.12);
    --shadow-lg: 0 8px 32px rgba(44, 79, 124, 0.16);
    --shadow-xl: 0 16px 48px rgba(44, 79, 124, 0.2);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ================================
   FORM LABELS (Match Main)
   ================================ */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: block;
}

/* ================================
   SELECTION OPTIONS (Match Main)
   ================================ */
.aq-select-label-option {
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    padding: 1.25rem 0.875rem;
    border: 3px solid #e3eef7;
    transition: all var(--transition-base);
    cursor: pointer;
    border-radius: 16px;
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(44, 79, 124, 0.08);
    position: relative;
    overflow: hidden;
    min-height: 110px;
}

/* Row spacing for extras */
.extras-form-steps .row.justify-content-center {
    row-gap: 1rem;
}

.extras-form-steps .col-sm-12 {
    margin-bottom: 0;
}

.aq-select-label-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 0;
}

.aq-select-label-option::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.aq-select-label-option:hover {
    background-color: var(--white);
    border: 3px solid var(--primary-color);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(44, 79, 124, 0.15);
}

.aq-select-label-option:hover::before {
    opacity: 0.06;
}

.aq-select-label-option:hover::after {
    transform: scaleX(1);
}

/* Radio button checked states */
input[type="radio"]:checked + label {
    color: var(--primary-color);
    font-weight: 700;
}

input[type="radio"]:checked + .aq-select-label-option {
    border-color: var(--accent-color);
    background-color: rgba(59, 159, 216, 0.05);
}

input[type="radio"]:checked + .aq-select-label-option::after {
    transform: scaleX(1);
}

.select-box input[type="radio"]:checked + label .select-img,
input[type="radio"]:checked + img#img-icon,
#sunny-excellent:checked + .select-img {
    filter: brightness(100%);
    transform: scale(1.1);
}

.aq-select-label-option:hover .aq-select-img {
    filter: brightness(100%);
    transform: scale(1.15);
}

.aq-select-label-option:hover .aq-box-option-title {
    color: var(--primary-color);
}

/* ================================
   BOX TITLE (Match Main Typography)
   ================================ */
.aq-box-option-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-dark);
    position: relative;
    z-index: 1;
    transition: color var(--transition-base);
    letter-spacing: -0.01em;
    text-align: center;
}

/* ================================
   SELECT IMAGES
   ================================ */
.aq-select-img {
    width: 100%;
    max-width: 56px;
    margin: 0.5rem auto;
    opacity: 0.85;
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
}

/* ================================
   LOGO STYLES
   ================================ */
.ant-logo {
    margin-bottom: 2rem;
}

.ant-logo img {
    max-width: 120px;
}

.ant-logo-modal {
    height: auto;
    width: auto;
    position: relative;
    text-align: center;
}

/* ================================
   MODAL STYLES (Match Main)
   ================================ */
.aq-modal-header {
    border-bottom: 2px solid var(--primary-color);
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.modal-question {
    padding-left: 20px;
    padding-right: 20px;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body legend {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-body .form-select {
    border: 2px solid #e3eef7;
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    transition: all var(--transition-base);
}

.modal-body .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 159, 216, 0.15);
    outline: none;
}

/* ================================
   FORM STEPS (Match Main Typography)
   ================================ */
.extras-form-steps {
    display: none;
    position: relative;
    animation: fadeIn 0.5s ease-out;
}

.extras-form-steps:first-of-type {
    display: block;
}

.extras-form-steps legend.questions {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.extras-form-wrapper {
    margin: 0.75rem auto;
    width: 100%;
    padding: 2rem 2rem 2.25rem 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid rgba(59, 159, 216, 0.08);
}

.extras-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ================================
   EXTRA BOX ON TOP
   ================================ */
.extra-box-on-top {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.25rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
}

/* ================================
   ARROW ANIMATION
   ================================ */
.arrow-down {
    position: absolute;
    bottom: -70px;
    right: -75px;
    width: 90px;
    z-index: 999;
    animation: downarrow 0.6s infinite alternate ease-in-out;
}

@keyframes downarrow {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(0.5em); opacity: 1; }
}

.view-new-mortgage-top {
    color: var(--accent-color);
    position: relative;
    font-weight: 800;
}

/* ================================
   RESPONSIVE ADJUSTMENTS
   ================================ */
@media (min-width: 768px) {
    .extras-form-wrapper {
        margin: 0.75rem auto;
        width: 100%;
        padding: 2rem 1.5rem;
        border-radius: var(--radius-xl);
        overflow: hidden;
        position: relative;
    }

    .aq-form-label {
        font-size: 18px;
    }

    .aq-select-label-option {
        padding: 1.5rem 1rem;
    }

    .aq-select-img {
        max-width: 70px;
        margin: 0.75rem auto;
    }

    .ant-logo img {
        max-width: 160px;
    }
}

/* ================================
   THANK YOU PAGE STYLES
   ================================ */

#chart-ty {
    margin-top: -75px;
}

@media (min-width: 992px) {
    #chart-ty {
        margin-top: -92px;
    }
}

/* ================================
   AMOUNT BOX
   ================================ */
.amount-box {
    padding: 18px 10px;
    border-radius: var(--radius-md);
    border: 4px solid var(--accent-color);
    max-width: 200px;
    width: 100%;
    margin: 0 auto 3rem;
    background-color: var(--white);
    position: relative;
    text-align: right;
    box-shadow: 0 10px 32px rgba(59, 159, 216, 0.2);
}

@media (min-width: 992px) {
    .amount-box {
        padding: 30px 15px;
        max-width: 280px;
        margin-bottom: 3rem;
    }
}

.amount-box:before {
    content: '$';
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-color);
    position: absolute;
    left: 10px;
    top: 11px;
}

@media (min-width: 992px) {
    .amount-box:before {
        font-size: 42px;
        left: 10px;
        top: 25px;
        z-index: 99;
    }
}

.amount-box-text {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--primary-color);
}

@media (min-width: 992px) {
    .amount-box-text {
        font-size: 46px;
        z-index: 999;
        position: relative;
    }
}

/* ================================
   STEPS
   ================================ */
.step-ty {
    background: var(--gradient-accent);
    color: var(--white);
    border-radius: 50%;
    height: 60px;
    width: 60px;
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(59, 159, 216, 0.3);
}

@media (min-width: 768px) {
    .step-ty {
        height: 80px;
        width: 80px;
    }
}

.step-ty-text {
    font-size: 11px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .step-ty-text {
        font-size: 14px;
    }
}

.step-ty-number {
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
}

@media (min-width: 768px) {
    .step-ty-number {
        font-size: 34px;
    }
}

.step-ty-description {
    background-color: var(--background-light);
    padding: 1rem;
    font-weight: 500;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* ================================
   ADDITIONAL OFFERS
   ================================ */
.ty-additional-offers {
    border: 2px solid #e3eef7;
    padding: 2rem 1rem;
    border-radius: var(--radius-md);
}

@media (min-width: 768px) {
    .ty-additional-offers {
        padding: 2rem;
    }
}

.ty-offer-container {
    border: 2px solid var(--accent-color);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
    transition: all var(--transition-base);
    background: var(--white);
}

@media (min-width: 768px) {
    .ty-offer-container {
        padding: 1.5rem 2rem;
    }
}

.ty-offer-container:hover {
    box-shadow: 0 8px 32px rgba(59, 159, 216, 0.2);
    transform: translateY(-4px);
}

/* ================================
   CUSTOM MAX WIDTHS
   ================================ */
.custom-mw-921 {
    max-width: 921px;
    margin-left: auto;
    margin-right: auto;
}

.custom-mw-720 {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================
   OFFER BUTTON
   ================================ */
.ty-offer-button {
    color: var(--white);
    background: var(--gradient-accent);
    font-weight: 600;
    width: 100%;
    max-width: 190px;
    transition: all var(--transition-base);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(59, 159, 216, 0.3);
}

.ty-offer-button:hover {
    color: var(--white);
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44, 79, 124, 0.3);
}

/* ================================
   CHAT BOX
   ================================ */
.chat-box {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    background-color: var(--white);
    padding-bottom: 3rem;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.chat-box-heading {
    padding: 20px 30px;
    background: var(--gradient-primary);
    color: var(--white);
}

.chat-box-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.chat-box-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
}

.chat-box-date {
    text-align: center;
    padding: 10px;
    color: var(--text-light);
    font-weight: 500;
}

.chat-box-body {
    padding: 10px 30px;
}

/* ================================
   MESSAGES
   ================================ */
.agent-message {
    background-color: var(--background-light);
    padding: 20px 25px;
    border-radius: var(--radius-xl);
    border-top-left-radius: 0;
    margin-bottom: 25px;
    color: var(--text-dark);
    max-width: 620px;
    width: auto;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.user-message {
    background: linear-gradient(135deg, rgba(59, 159, 216, 0.15) 0%, rgba(95, 179, 227, 0.15) 100%);
    padding: 20px 25px;
    border-radius: var(--radius-xl);
    border-top-right-radius: 0;
    margin-bottom: 15px;
    color: var(--text-dark);
    max-width: 620px;
    width: auto;
    display: block;
    line-height: 1.6;
    border: 2px solid var(--accent-color);
}

.chat-box-agent-reply {
    display: flex;
}

.agent-profile {
    margin-right: 15px;
}

.chat-box-user-reply {
    display: flex;
    justify-content: flex-end;
    display: none;
}

.user-reply {
    display: flex;
    flex-direction: column;
}

/* ================================
   TEXTAREA
   ================================ */
#user-textarea {
    width: 100%;
    padding: 1.5rem 1rem;
    height: 100%;
    border-radius: 0;
    min-height: 78px;
    padding-right: 50px;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.textarea-wrapper {
    margin-top: 1rem;
    padding: 0;
}

.textbox-form {
    position: relative;
    width: 100%;
    border: 2px solid #e3eef7;
    padding-right: 50px;
    border-radius: var(--radius-md);
    transition: border-color var(--transition-base);
}

.textbox-form:focus-within {
    border-color: var(--accent-color);
}

#user-send {
    position: absolute;
    border: none;
    background-color: transparent;
    padding: 0 0 0 15px;
    top: 16px;
    right: 10px;
    transition: all var(--transition-base);
    cursor: pointer;
}

.send-btn-icon {
    color: var(--accent-color);
    font-size: 24px;
}

#user-textarea:focus::placeholder {
    color: transparent;
}

#user-textarea:focus {
    box-shadow: none;
    border: none;
    outline: none;
}

#user-send:hover .send-btn-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* ================================
   SCROLLBAR STYLES
   ================================ */
#user-textarea::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0,0,0,0.05);
    border-radius: 0;
    background-color: var(--white);
}

#user-textarea::-webkit-scrollbar {
    width: 5px;
    background-color: #F5F5F5;
}

#user-textarea::-webkit-scrollbar-thumb {
    border-radius: 5px;
    box-shadow: inset 0 0 6px rgba(0,0,0,.15);
    background-color: var(--accent-color);
}

/* ================================
   DARK BACKGROUND
   ================================ */
.dark-bg {
    background: var(--gradient-primary);
    color: var(--white);
}

/* ================================
   MODAL SELECTED STATE
   ================================ */
.modal .select-label-option.selected {
    border-color: var(--accent-color) !important;
    background-color: rgba(59, 159, 216, 0.1) !important;
    transform: translateY(-4px) !important;
}

.modal .select-label-option.selected .box-option-title {
    color: var(--primary-color) !important;
}

/* Make sure modal elements are clickable */
.modal .select-box,
.modal .select-label-option,
.modal input[type="radio"] {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* ================================
   MOBILE RESPONSIVENESS
   ================================ */

/* Tablet and Mobile Devices */
@media (max-width: 992px) {
    .extras-form-steps legend.questions {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .extras-form-wrapper {
        padding: 1.75rem 1.5rem 2rem 1.5rem;
    }
}

/* Mobile Devices */
@media (max-width: 767px) {
    .extras-form-steps legend.questions {
        font-size: 1.35rem;
        line-height: 1.3;
        margin-bottom: 1.25rem;
    }
    
    .extras-form-wrapper {
        padding: 1.5rem 1.25rem 1.75rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    
    .aq-select-label-option {
        padding: 0.875rem 0.75rem;
        min-height: 90px;
    }
    
    .aq-select-img {
        max-width: 40px;
    }
    
    .aq-box-option-title {
        font-size: 0.9rem;
    }
    
    .chat-box-body {
        padding: 10px 15px;
    }
    
    .agent-message,
    .user-message {
        padding: 15px 18px;
        font-size: 0.95rem;
        max-width: 90%;
    }
    
    #user-textarea {
        font-size: 16px;
        padding: 1rem 0.75rem;
        min-height: 70px;
    }
    
    .ty-offer-container {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-md);
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .extras-form-steps legend.questions {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .extras-form-wrapper {
        padding: 1.25rem 1rem 1.5rem 1rem;
    }
    
    .aq-select-label-option {
        min-height: 80px;
        padding: 0.75rem 0.625rem;
    }
    
    .aq-box-option-title {
        font-size: 0.85rem;
    }
}