/**
 * Jahaz Empty States Design System
 *
 * Per JAHAZ_DESIGN_PRINCIPLES.md:
 * "Empty states aren't errors - they're opportunities."
 * "Every empty state should inspire action, not discourage."
 *
 * These components turn blank screens into welcoming invitations.
 */

/* ==========================================================================
   Base Empty State Container
   ========================================================================== */

.jahaz-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    min-height: 200px;
}

.jahaz-empty-state--compact {
    padding: 2rem 1rem;
    min-height: 150px;
}

.jahaz-empty-state--full {
    min-height: 400px;
}

/* ==========================================================================
   Empty State Icon/Illustration
   ========================================================================== */

.jahaz-empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
}

.jahaz-empty-icon--large {
    width: 120px;
    height: 120px;
}

.jahaz-empty-icon--small {
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
}

.jahaz-empty-icon__emoji {
    font-size: 2.5rem;
}

.jahaz-empty-icon--large .jahaz-empty-icon__emoji {
    font-size: 3.5rem;
}

.jahaz-empty-icon--small .jahaz-empty-icon__emoji {
    font-size: 1.75rem;
}

/* Animated background pulse for icon */
.jahaz-empty-icon--animated::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: jahaz-empty-pulse 2s ease-in-out infinite;
}

@keyframes jahaz-empty-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

/* ==========================================================================
   Empty State Typography
   ========================================================================== */

.jahaz-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.jahaz-empty-state--compact .jahaz-empty-title {
    font-size: 1.125rem;
}

.jahaz-empty-description {
    font-size: 1rem;
    color: #6b7280;
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.jahaz-empty-state--compact .jahaz-empty-description {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Empty State Actions
   ========================================================================== */

.jahaz-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.jahaz-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: none;
}

.jahaz-empty-cta--primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 14px -3px rgba(99, 102, 241, 0.4);
}

.jahaz-empty-cta--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.5);
}

.jahaz-empty-cta--secondary {
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.jahaz-empty-cta--secondary:hover {
    border-color: #c7d2fe;
    color: #6366f1;
    background: #f5f3ff;
}

/* ==========================================================================
   Themed Empty States
   ========================================================================== */

/* Flights Empty State */
.jahaz-empty-state--flights .jahaz-empty-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.jahaz-empty-state--flights .jahaz-empty-cta--primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 4px 14px -3px rgba(14, 165, 233, 0.4);
}

/* Hotels Empty State */
.jahaz-empty-state--hotels .jahaz-empty-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.jahaz-empty-state--hotels .jahaz-empty-cta--primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    box-shadow: 0 4px 14px -3px rgba(139, 92, 246, 0.4);
}

/* Activities Empty State */
.jahaz-empty-state--activities .jahaz-empty-icon {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
}

.jahaz-empty-state--activities .jahaz-empty-cta--primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 14px -3px rgba(249, 115, 22, 0.4);
}

/* Trips Empty State */
.jahaz-empty-state--trips .jahaz-empty-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.jahaz-empty-state--trips .jahaz-empty-cta--primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 14px -3px rgba(34, 197, 94, 0.4);
}

/* Wishlist Empty State */
.jahaz-empty-state--wishlist .jahaz-empty-icon {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.jahaz-empty-state--wishlist .jahaz-empty-cta--primary {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    box-shadow: 0 4px 14px -3px rgba(236, 72, 153, 0.4);
}

/* Search No Results */
.jahaz-empty-state--no-results .jahaz-empty-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

/* ==========================================================================
   Empty State Suggestions
   ========================================================================== */

.jahaz-empty-suggestions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    width: 100%;
    max-width: 500px;
}

.jahaz-empty-suggestions__title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.jahaz-empty-suggestions__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.jahaz-empty-suggestion {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: #4b5563;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.jahaz-empty-suggestion:hover {
    background: white;
    border-color: #c7d2fe;
    color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

/* ==========================================================================
   Empty State Animation
   ========================================================================== */

.jahaz-empty-state--fade-in {
    animation: jahaz-empty-fade 0.4s ease forwards;
}

@keyframes jahaz-empty-fade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children animation */
.jahaz-empty-state--stagger > * {
    opacity: 0;
    animation: jahaz-empty-stagger 0.4s ease forwards;
}

.jahaz-empty-state--stagger > *:nth-child(1) { animation-delay: 0s; }
.jahaz-empty-state--stagger > *:nth-child(2) { animation-delay: 0.1s; }
.jahaz-empty-state--stagger > *:nth-child(3) { animation-delay: 0.2s; }
.jahaz-empty-state--stagger > *:nth-child(4) { animation-delay: 0.3s; }

@keyframes jahaz-empty-stagger {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 640px) {
    .jahaz-empty-state {
        padding: 2rem 1rem;
    }

    .jahaz-empty-icon {
        width: 64px;
        height: 64px;
    }

    .jahaz-empty-icon__emoji {
        font-size: 2rem;
    }

    .jahaz-empty-title {
        font-size: 1.25rem;
    }

    .jahaz-empty-description {
        font-size: 0.875rem;
    }

    .jahaz-empty-cta {
        width: 100%;
        justify-content: center;
    }

    .jahaz-empty-actions {
        width: 100%;
        flex-direction: column;
    }
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .jahaz-empty-icon--animated::before {
        animation: none;
    }

    .jahaz-empty-state--fade-in,
    .jahaz-empty-state--stagger > * {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
