/* Lead Capture Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-wrapper {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--space-md);
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-wrapper {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-gold);
}

.modal-content h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 1.5rem;
}

#lead-phone {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px 15px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#lead-phone:focus {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.08);
}

.btn-primary {
    width: 100%;
    background: var(--accent-gold);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(224, 26, 79, 0.3);
}

.input-error-msg {
    color: #e30b5d;
    /* Raspberry */
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
    text-align: left;
}

/* Intl Tel Input Overrides for Dark Theme */
.iti {
    width: 100%;
}

.iti__flag-container {
    padding: 0;
}

.iti__selected-flag {
    background-color: transparent !important;
    padding: 0 8px 0 12px;
}

.iti__arrow {
    border-top-color: var(--text-primary);
}

.iti__country-list {
    background-color: #1a1a1a !important;
    /* Force dark bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-sans);
    width: 380px !important;
    /* Fix width, slightly wider than input to fit names */
    max-width: 90vw;
    /* Responsive constraint */
    white-space: normal;
    /* Allow wrapping */
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    scrollbar-color: var(--accent-gold) #1a1a1a;
    scrollbar-width: thin;
}

.iti__country {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Reorder: Flag (1), Code (2), Name (3) */
.iti__flag-box {
    order: 1;
    margin-right: 10px;
    flex-shrink: 0;
}

.iti__dial-code {
    order: 2;
    color: #fff !important;
    /* White code */
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
    width: 50px;
    /* Fixed width for alignment */
    text-align: left;
}

.iti__country-name {
    order: 3;
    color: rgba(255, 255, 255, 0.6) !important;
    /* Greyer name */
    font-size: 0.9em;
    word-break: break-word;
    /* Ensure long names wrap */
    line-height: 1.2;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.success-message {
    display: none;
    text-align: center;
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin-top: 1rem;
    font-family: var(--font-serif);
}