/**
 * Aniimo Direct Pay Portal - Custom Stylesheet
 * Soothing Dark Theme & Retro UI Aesthetic (สบายตา + Dark Retro)
 */

:root {
    --bg-dark: #0e111a;
    --card-dark: rgba(20, 25, 37, 0.88);
    --border-retro: rgba(245, 158, 11, 0.22);
    --border-retro-hover: rgba(245, 158, 11, 0.55);
    --border-retro-active: #f59e0b;
    --retro-amber: #f59e0b;
    --retro-gold: #fbbf24;
    --retro-teal: #2dd4bf;
    --retro-cyan: #06b6d4;
    --retro-orange: #f97316;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        /* Subtle vintage grid matrix */
        linear-gradient(rgba(245, 158, 11, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.02) 1px, transparent 1px),
        /* Warm soothing radial glows */
        radial-gradient(at 15% 15%, rgba(245, 158, 11, 0.08) 0px, transparent 50%),
        radial-gradient(at 85% 25%, rgba(45, 212, 191, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 90%, rgba(249, 115, 22, 0.07) 0px, transparent 60%),
        radial-gradient(at 50% 50%, rgba(14, 17, 26, 0.9) 0px, transparent 100%);
    background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e2e8f0;
    min-height: 100vh;
}

/* Glassmorphism Retro Panel */
.glass-panel {
    background: var(--card-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-retro);
}

/* Custom Scrollbar - Retro Amber & Dark Slate */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #0f131d;
}
::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 9999px;
    border: 1px solid rgba(245, 158, 11, 0.15);
}
::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

/* Package Card Interactive Styles (Both Carousel & Grid) */
.package-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    background: rgba(22, 28, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.package-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(28, 36, 54, 0.95);
    box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.5), 0 0 18px rgba(245, 158, 11, 0.15);
}

.package-card.selected {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.16) 0%, rgba(18, 23, 35, 0.98) 100%) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 24px 2px rgba(245, 158, 11, 0.28), inset 0 0 16px rgba(245, 158, 11, 0.12) !important;
}

/* Carousel Specific Styles (Swiper 11) */
.package-swiper {
    width: 100%;
    padding: 12px 4px 44px 4px !important;
    position: relative;
}

.package-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.package-swiper .swiper-slide .package-card {
    width: 100%;
    height: 100%;
}

/* Swiper Navigation Buttons (Retro Arcade Amber) */
.swiper-btn-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    background: rgba(18, 23, 35, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.swiper-btn-nav:hover {
    background: #f59e0b;
    color: #0f131d;
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    transform: translateY(-50%) scale(1.08);
}

.swiper-btn-prev {
    left: -8px;
}

.swiper-btn-next {
    right: -8px;
}

@media (max-width: 640px) {
    .swiper-btn-prev { left: -4px; width: 36px; height: 36px; }
    .swiper-btn-next { right: -4px; width: 36px; height: 36px; }
}

/* Swiper Pagination Bullets (Retro Amber Dots) */
.package-swiper .swiper-pagination {
    bottom: 8px !important;
}

.package-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #475569;
    opacity: 0.6;
    transition: all 0.25s ease;
}

.package-swiper .swiper-pagination-bullet-active {
    width: 24px;
    border-radius: 9999px;
    background: #f59e0b;
    opacity: 1;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}

/* View Switch Toggle (Retro Cartridge / Pill) */
.view-toggle-btn {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    background: rgba(14, 18, 27, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.view-toggle-btn:hover {
    color: #ffffff;
    background: rgba(30, 38, 56, 0.85);
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f131d;
    font-weight: 800;
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* SweetAlert2 Soothing Dark Retro Theme */
.swal2-popup.swal-dark-popup {
    background: #121622 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #f1f5f9 !important;
    border-radius: 1.5rem !important;
    font-family: inherit !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 158, 11, 0.15) !important;
}

.swal2-title {
    color: #ffffff !important;
}

.swal2-html-container {
    color: #cbd5e1 !important;
}
