/**
 * Lead Capture Widget Styles
 * Pulsing badge (calculator pages) and floating button (other pages)
 */

/* ========================================= */
/* INLINE BADGE WIDGET (Calculator Pages) */
/* ========================================= */

.lead-capture-badge-slot {
    margin-top: 12px;
}

.lead-capture-badge-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    color: #28a745;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #28a745;
    transition: all 0.3s ease;
}

.lead-capture-badge-inline:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.lead-capture-badge-inline .lead-capture-badge-icon {
    font-size: 1.1rem;
}

.lead-capture-badge-inline .bi-arrow-right {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.lead-capture-badge-inline:hover .bi-arrow-right {
    transform: translateX(3px);
}

/* ========================================= */
/* FLOATING BUTTON WIDGET (Other Pages) */
/* ========================================= */

.lead-capture-float {
    display: none;
}

/* =========================================
/* MODAL STYLES */
/* ========================================= */

.lead-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(0px);
}

.lead-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.lead-modal-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    position: relative;
    transform: translateY(30px) scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-height: 90vh;
    overflow-y: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

/* Modal close button */
.lead-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.lead-modal-close:hover {
    background: #e9ecef;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lead-modal-close svg {
    width: 18px;
    height: 18px;
    color: #495057;
}

/* Modal content */
.lead-modal-content {
    padding: 36px;
}

.lead-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.lead-modal-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.lead-modal-icon svg {
    width: 28px;
    height: 28px;
}

.lead-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
}

.lead-modal-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

/* Form styles */
.lead-modal-form {
    margin-top: 20px;
}

.lead-form-group {
    margin-bottom: 18px;
}

.lead-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.lead-form-label-required::after {
    content: ' *';
    color: #dc3545;
}

.lead-form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.lead-form-input:focus {
    outline: none;
    border-color: #0066cc;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.lead-form-input::placeholder {
    color: #adb5bd;
}

.lead-form-input.is-invalid {
    border-color: #dc3545;
}

.lead-form-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Submit button */
.lead-form-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    margin-top: 8px;
}

.lead-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

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

.lead-form-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Sample-download button (gated): green when unlocked, distinct from the blue submit.
   Grey/disabled state is handled by .lead-form-submit:disabled above (higher specificity). */
.lead-sample-download {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.lead-sample-download:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.lead-sample-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
}

/* Success/Error messages */
.lead-form-message {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    display: none;
}

.lead-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.lead-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Trust badges */
.lead-trust-badges {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e9ecef;
}

.lead-trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #6c757d;
}

.lead-trust-badge i {
    color: #28a745;
    font-size: 0.95rem;
}

/* ========================================= */
/* RESPONSIVE */
/* ========================================= */

@media (max-width: 768px) {
    .lead-capture-badge-inline {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .lead-modal-content {
        padding: 28px 22px;
    }

    .lead-modal-title {
        font-size: 1.4rem;
    }

    .lead-capture-badge {
        font-size: 0.75rem;
        padding: 5px 10px;
        top: -6px;
        right: -6px;
    }

    .lead-trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lead-modal-overlay {
        padding: 12px;
    }

    .lead-modal-content {
        padding: 24px 18px;
    }

    .lead-modal-title {
        font-size: 1.25rem;
    }

    .lead-modal-subtitle {
        font-size: 0.9rem;
    }

    .lead-form-submit {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* ========================================= */
/* ACCESSIBILITY */
/* ========================================= */

@media (prefers-reduced-motion: reduce) {
    .lead-capture-badge,
    .lead-modal-overlay,
    .lead-modal-container {
        animation: none;
        transition: opacity 0.2s ease;
    }

    .lead-capture-badge-icon {
        animation: none;
    }
}

.lead-form-input:focus,
.lead-form-submit:focus,
.lead-modal-close:focus,
.lead-capture-badge:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}
