/**
 * STP Find-a-Car — Tour Lead Capture Popup
 * @package STPFindACar
 */

/* Overlay */
.stpfc-tour-lead-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: stpfc-overlay-in .18s ease;
}

.stpfc-tour-lead-overlay[hidden] {
    display: none;
}

@keyframes stpfc-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal box */
.stpfc-tour-lead-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    padding: 32px 28px 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: stpfc-modal-in .22s ease;
}

@keyframes stpfc-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

/* Close button */
.stpfc-tour-lead-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: background .15s, color .15s;
    padding: 0;
}

.stpfc-tour-lead-close:hover {
    background: #e5e7eb;
    color: #111;
}

/* Header */
.stpfc-tour-lead-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.stpfc-tour-lead-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background .2s;
}

.stpfc-tour-lead-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.3;
}

.stpfc-tour-lead-subtitle {
    font-size: .85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Tour name badge */
.stpfc-tour-lead-tour-name {
    font-size: .82rem;
    font-weight: 600;
    color: #14532d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 18px;
    display: none;
}

.stpfc-tour-lead-tour-name:not(:empty) {
    display: block;
}

/* Form */
.stpfc-tour-lead-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stpfc-tl-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stpfc-tl-field label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
}

.stpfc-tl-field label span {
    color: #dc2626;
    margin-left: 2px;
}

.stpfc-tl-field input {
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .95rem;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.stpfc-tl-field input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

/* Error */
.stpfc-tl-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .85rem;
    font-weight: 500;
}

/* Submit button */
.stpfc-tl-submit {
    margin-top: 4px;
    width: 100%;
    padding: 13px 20px;
    font-size: 1rem;
    font-weight: 700;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.stpfc-tl-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

/* Spinner animation */
.stpfc-spin {
    animation: stpfc-spin 1s linear infinite;
}

@keyframes stpfc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Privacy note */
.stpfc-tl-privacy {
    font-size: .75rem;
    color: #9ca3af;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 480px) {
    .stpfc-tour-lead-modal {
        padding: 24px 18px 20px;
    }
}
