/* ==========================================================================
   1. MODAL WINDOW OVERLAYS & BASE CONTEXT LAYOUTS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-glass);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 1.125rem;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   2. PROGRESS MAPPING INDICATORS
   ========================================================================== */
.wizard-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 28px;
    padding-top: 24px;
}

.wizard-step-bar {
    flex: 1;
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.wizard-step-bar.active {
    background: var(--accent-gradient);
}

.step-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==========================================================================
   3. EXTRACTED BUSINESS PROFILE PRESENTATION METRICS
   ========================================================================== */
.business-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.business-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.business-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-tertiary);
    flex-shrink: 0;
}

.business-name {
    font-size: 1.125rem;
    font-weight: 600;
}

.business-category {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.business-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--warning);
}

.business-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.business-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.business-detail-icon {
    color: var(--text-muted);
    width: 16px;
    text-align: center;
}

/* ==========================================================================
   4. ASYNCHRONOUS BACKEND PROCESSING SPINNERS
   ========================================================================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    gap: 24px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.ready-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   5. NOTIFICATION TOAST OVERLAYS
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-size: 0.875rem;
    color: var(--text-primary);
    z-index: 3000;
    display: none;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
}

.toast.active {
    display: flex;
}

.toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   6. INTERACTIVE DESIGN CORE KEYFRAMES
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   7. MEDIA REVIEWS RESPONSIVE BREAKS
   ========================================================================== */
@media (max-width: 768px) {
    .business-details {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================================
   FLOATING WHATSAPP BUTTON UTILITY
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    z-index: 2999; /* Positions button just directly beneath active dialog modal contexts */
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.whatsapp-float:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
    color: white;
}

/* Push notification alerts safely upward when WhatsApp is rendered active */
.toast {
    bottom: 96px; /* Offsets notification toast 96px up so it doesn't block the WhatsApp button */
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    .toast {
        bottom: 80px;
    }
}