/* Lead Popup Modal Overlay */
.lead-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.lead-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Dialog Box */
.lead-modal-container {
    width: 100%;
    max-width: 430px;
    background: #fdfbf7;
    border-radius: 20px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.15);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 94vh;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.lead-modal-overlay.active .lead-modal-container {
    transform: scale(1) translateY(0);
}

/* Top Blue Header */
.lead-modal-header {
    background: linear-gradient(135deg, #1255af 0%, #1e6bd6 50%, #104fa8 100%);
    color: #ffffff;
    padding: 18px 20px 14px 20px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

/* Circular White Close Button */
.lead-modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    color: #1e293b;
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    padding: 0;
}

.lead-modal-close-btn:hover {
    background: #f1f5f9;
    transform: scale(1.1) rotate(90deg);
    color: #0f172a;
}

.lead-modal-close-btn:focus {
    outline: none;
}

/* Header Texts */
.lead-modal-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.28;
    color: #ffffff;
    margin: 0;
    padding: 0 25px;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.lead-modal-gift-icon {
    font-size: 24px;
    margin: 4px 0 3px 0;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.lead-modal-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: #ffe699;
    letter-spacing: 0.5px;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Gold divider line */
.lead-modal-gold-bar {
    height: 3.5px;
    background: linear-gradient(90deg, #d99b1c 0%, #ffd066 35%, #f5a623 50%, #ffd066 65%, #d99b1c 100%);
    width: 100%;
    flex-shrink: 0;
}

/* Modal Form Body */
.lead-modal-body {
    padding: 16px 20px 14px 20px;
    background: #fdfbf7;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.lead-modal-body::-webkit-scrollbar {
    width: 5px;
}

.lead-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.lead-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.lead-form-group {
    margin-bottom: 9px;
    text-align: left;
}

.lead-form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    letter-spacing: -0.1px;
}

.lead-required {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}

/* Form Inputs */
.lead-form-control {
    width: 100%;
    height: 39px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    padding: 0 13px;
    font-size: 13.5px;
    color: #1f2937;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.lead-form-control:focus {
    border-color: #1e6bd6;
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(30, 107, 214, 0.12);
}

.lead-form-control::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

/* Textarea and Counter */
.lead-textarea-wrapper {
    position: relative;
}

.lead-form-control.lead-textarea {
    height: 58px;
    padding: 7px 12px 20px 12px;
    resize: none;
    font-family: inherit;
    line-height: 1.4;
}

.lead-char-counter {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 11px;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

.lead-resize-indicator {
    font-size: 11px;
    opacity: 0.6;
}

/* Submit Button */
.lead-submit-btn {
    width: 100%;
    height: 42px;
    background: linear-gradient(180deg, #ffb703 0%, #f59e0b 60%, #e88c00 100%);
    color: #0f172a;
    font-size: 15.5px;
    font-weight: 700;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.38);
    transition: all 0.2s ease;
    margin-top: 5px;
    letter-spacing: 0.2px;
}

.lead-submit-btn:hover {
    background: linear-gradient(180deg, #fca903 0%, #ea8f00 100%);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
    color: #000000;
}

.lead-submit-btn:active {
    transform: translateY(0);
}

.lead-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer Disclaimer */
.lead-disclaimer-text {
    font-size: 10.5px;
    line-height: 1.4;
    color: #64748b;
    text-align: center;
    margin: 8px 0 0 0;
    padding: 0 4px;
}

/* Success / Feedback Message Box */
.lead-alert {
    display: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
    text-align: center;
}

.lead-alert-success {
    background: #def7ec;
    color: #03543f;
    border: 1px solid #bcf0da;
}

.lead-alert-error {
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

/* Floating Re-Open Badge */
.lead-floating-trigger {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: linear-gradient(135deg, #1b68ce 0%, #0d4a9e 100%);
    color: #ffffff;
    padding: 9px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 6px 18px rgba(19, 85, 178, 0.4);
    cursor: pointer;
    z-index: 9998;
    border: 2px solid #f59e0b;
    transition: all 0.25s ease;
    text-decoration: none;
}

.lead-floating-trigger:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(19, 85, 178, 0.55);
    color: #ffffff;
}

@keyframes leadSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lead-spinner {
    display: inline-block;
    animation: leadSpin 0.9s linear infinite;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .lead-modal-title {
        font-size: 17px;
        padding: 0 15px;
    }
    .lead-modal-body {
        padding: 14px 16px 12px 16px;
    }
    .lead-floating-trigger {
        bottom: 15px;
        left: 15px;
        font-size: 12px;
        padding: 8px 14px;
    }
}
