/* Modal Base Styles */
.quote-modal {
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    max-width: 90vw;
    width: 100%;
    max-height: 98vh; /* Allow it to be taller so it doesn't need a scrollbar */
    margin: auto;
    overflow: visible; 
}

.quote-modal::backdrop {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    animation: fade-in 0.3s ease;
}

.quote-modal__backdrop {
    display: none; 
}

.quote-modal__content {
    position: relative;
    background: #66d8b4; /* The requested background color */
    color: #0f172a;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slide-up-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto; /* Allow scrolling for tall mobile forms */
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    width: 100%;
    max-width: 600px;
    max-height: 90vh; /* Keep it inside the screen */
    margin: 0 auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.quote-modal__content::-webkit-scrollbar {
    display: none;
}

.quote-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #0f172a;
    transition: all 0.2s ease;
}

.quote-modal__close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* Modal Form Overrides */
.quote-modal__content .section {
    background: transparent;
    padding: 1.5rem 1.5rem 1rem 1.5rem; /* Reduced padding to fit without scrolling */
}

.quote-modal__content .form-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.quote-modal__content .form-card__header {
    margin-bottom: 1rem;
}

.quote-modal__content .form-card__header h2,
.quote-modal__content .text-display-lg {
    color: #0f172a;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.quote-modal__content .form-card__header p,
.quote-modal__content .text-on-surface-variant {
    color: #1e293b;
    font-size: 0.9rem;
}

/* Tighter margins and gaps for modal to eliminate scrollbar and compact layout */
.quote-modal__content .custom-form {
    gap: 5px;
}

.quote-modal__content .custom-form__row {
    gap: 5px;
    margin-bottom: 0;
}

.quote-modal__content .custom-form__group {
    margin-bottom: 0;
}

.quote-modal__content .custom-form__label {
    color: #0f172a;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.quote-modal__content .custom-form__input,
.quote-modal__content .custom-form__select,
.quote-modal__content .custom-form__textarea {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #0f172a;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.quote-modal__content .custom-form__textarea {
    min-height: 50px;
}

.quote-modal__content .custom-form__input::placeholder,
.quote-modal__content .custom-form__select::placeholder,
.quote-modal__content .custom-form__textarea::placeholder {
    color: #475569;
}

.quote-modal__content .custom-form__input:focus,
.quote-modal__content .custom-form__select:focus,
.quote-modal__content .custom-form__textarea:focus {
    border-color: #3b876e; 
    box-shadow: 0 0 0 1px #3b876e;
    background: #ffffff;
    outline: none;
}

.quote-modal__content select option {
    background: #ffffff;
    color: #0f172a;
}

.quote-modal__content .custom-form__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px; /* Override the default 32px padding from forms.css */
}

.quote-modal__content .custom-form__actions button {
    background: #3b876e; /* The requested button color */
    color: #ffffff;
    width: auto;
    min-width: 250px;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    margin-top: 0;
    margin-bottom: 0.75rem; /* Space between button and text */
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
}

.quote-modal__content .custom-form__actions button:hover {
    background: #2a6350;
}

.quote-modal__content .custom-form__consent {
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    color: #1e293b;
    margin: 0;
}

/* Animations */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up-fade {
    from { 
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
