/* Lead Management System Styles */

/* Popup Styles */
.leads-popup {
    position: absolute;
    z-index: 100;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
    padding: 16px;
    animation: leads-popup-in 0.15s ease-out;
}

.leads-popup.hidden {
    display: none;
}

@keyframes leads-popup-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Overlay */
.leads-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: leads-modal-overlay-in 0.2s ease-out;
}

.leads-modal-overlay.hidden {
    display: none;
}

@keyframes leads-modal-overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content */
.leads-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: leads-modal-in 0.2s ease-out;
}

@keyframes leads-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal Header */
.leads-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leads-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.leads-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: background 0.15s, color 0.15s;
}

.leads-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Modal Body */
.leads-modal-body {
    padding: 24px;
}

/* Form Styles */
.leads-form-group {
    margin-bottom: 16px;
}

.leads-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.leads-form-group input,
.leads-form-group select,
.leads-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    color: #1e293b;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.leads-form-group input:focus,
.leads-form-group select:focus,
.leads-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.leads-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Photo Upload Area */
.leads-photo-upload {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.leads-photo-upload:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.leads-photo-upload.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.leads-photo-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #9ca3af;
}

.leads-photo-upload-text {
    font-size: 0.875rem;
    color: #6b7280;
}

.leads-photo-upload-text strong {
    color: #3b82f6;
}

/* Photo Thumbnails */
.leads-photo-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.leads-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.leads-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leads-photo-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.leads-photo-thumb-remove:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Submit Button */
.leads-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.leads-submit-btn:hover {
    background: #2563eb;
}

.leads-submit-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* Link Styles */
.quote-link,
.message-link {
    color: var(--color-primary, #3b82f6);
    font-weight: 600;
    cursor: pointer;
}

.quote-link:hover,
.message-link:hover {
    text-decoration: underline;
}

/* Button Style for Quote Links */
.quote-link.leads-btn-style,
.message-link.leads-btn-style {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s;
}

.quote-link.leads-btn-style:hover,
.message-link.leads-btn-style:hover {
    background: #2563eb;
    text-decoration: none;
}

/* Loading Spinner */
.leads-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: leads-spin 0.8s linear infinite;
}

@keyframes leads-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Urgency Radio Buttons */
.leads-urgency-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.leads-urgency-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.leads-urgency-option input {
    width: auto;
}

/* Step Indicator */
.leads-step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.leads-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
}

.leads-step-dot.active {
    background: #3b82f6;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .leads-popup {
        width: calc(100vw - 32px);
        left: 16px !important;
        right: 16px;
    }

    .leads-modal-content {
        margin: 16px;
        max-height: calc(100vh - 32px);
        border-radius: 12px;
    }

    .leads-modal-body {
        padding: 16px;
    }
}