/**
 * Sequential Collector Styles
 * Conversational name and email collection UI
 */

/* ============================================
   OVERLAY
   ============================================ */
.sequential-collector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* ============================================
   PANEL
   ============================================ */
.collector-panel {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    overflow: hidden;
}

.collector-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.collector-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1A3028;
    transform: rotate(90deg);
}

/* ============================================
   CONTENT
   ============================================ */
.collector-content {
    padding: 48px 40px 32px;
}

.collector-step {
    animation: fadeInUp 0.5s ease;
}

.collector-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #C9A961, #B8935A);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.collector-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collector-avatar:empty::before {
    content: '👋';
    font-size: 32px;
}

/* ============================================
   MESSAGE
   ============================================ */
.collector-message {
    margin-bottom: 32px;
    animation: messageAppear 0.6s ease;
}

.collector-message p {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 12px 0;
}

.collector-message p:last-child {
    margin-bottom: 0;
}

.personalized-greeting {
    font-size: 18px;
    font-weight: 600;
    color: #1A3028;
}

.user-name {
    color: #C9A961;
}

/* Typing effect animation */
@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   INPUT GROUP
   ============================================ */
.collector-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.collector-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #FAFAFA;
}

.collector-input:focus {
    outline: none;
    border-color: #C9A961;
    background: white;
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.1);
}

.collector-input::placeholder {
    color: #9CA3AF;
}

.collector-submit {
    padding: 14px 28px;
    background: linear-gradient(135deg, #C9A961, #B8935A);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.collector-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
}

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

/* ============================================
   PRIVACY NOTE
   ============================================ */
.collector-privacy {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.collector-privacy svg {
    flex-shrink: 0;
    color: #C9A961;
}

/* ============================================
   LOADING
   ============================================ */
.collector-loading {
    text-align: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #E5E7EB;
    border-top-color: #C9A961;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.collector-loading p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

/* ============================================
   ACCOUNT ACTIONS
   ============================================ */
.collector-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.collector-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collector-btn.primary {
    background: linear-gradient(135deg, #C9A961, #B8935A);
    color: white;
}

.collector-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
}

.collector-btn.secondary {
    background: white;
    color: #6B7280;
    border: 2px solid #E5E7EB;
}

.collector-btn.secondary:hover {
    background: #F9FAFB;
    border-color: #C9A961;
    color: #C9A961;
}

/* ============================================
   PROGRESS
   ============================================ */
.collector-progress {
    padding: 20px 40px;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
}

.progress-bar {
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A961, #B8935A);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.step-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    transition: all 0.3s ease;
}

.step-indicator.active {
    border-color: #C9A961;
    background: #C9A961;
    color: white;
}

.step-indicator.complete {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
}

.step-indicator.complete::before {
    content: '✓';
}

/* ============================================
   ERROR
   ============================================ */
.collector-error {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: 8px;
    font-size: 14px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 540px) {
    .collector-panel {
        width: 95%;
        margin: 20px;
    }
    
    .collector-content {
        padding: 40px 24px 24px;
    }
    
    .collector-input-group {
        flex-direction: column;
    }
    
    .collector-submit {
        width: 100%;
    }
    
    .collector-message p {
        font-size: 15px;
    }
    
    .progress-steps {
        gap: 16px;
    }
}