/* =========================================================
   FURRY FUSION - DARK LIQUID GLASS (V3)
   ========================================================= */

/* =========================================================
   1. BASE & BACKGROUNDS (Tailwind Slate Gradient)
   ========================================================= */
body, html {
    background-color: #0f172a !important; /* Tailwind slate-900 fallback */
    
    /* Replicating: bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 */
    background-image: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

#page-wrapper {
    min-height: 100vh !important;
    background-color: transparent !important; /* Let the body gradient shine through */
}
/* =========================================================
   2. TYPOGRAPHY & COLORS
   ========================================================= */
/* Aggressive Text Color Fix */
.container.main-box,
.container.main-box h1, .container.main-box h2, .container.main-box h3, 
.container.main-box h4, .container.main-box h5, .container.main-box h6,
.container.main-box p, .container.main-box span, .container.main-box div:not(.glow),
.container.main-box strong, .container.main-box label, .container.main-box th, .container.main-box td,
.text-muted {
    color: #e2e8f0 !important;
}

/* Gradient Title Text */
.page-header h1, .page-header h1 a {
    background: linear-gradient(90deg, #93c5fd 0%, #f472b6 50%, #c084fc 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 800 !important;
    border-bottom: none !important;
}

.page-header h1 small.text-muted {
    -webkit-text-fill-color: #cbd5e1 !important;
}

/* =========================================================
   15. CONTENT HEADER OVERHAUL (RAINBOW GLOW)
   ========================================================= */

h2.content-header {
    font-size: 38px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    /* This adds a subtle "Furry Fusion" glow to the text */
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.4), 0 0 40px rgba(244, 114, 182, 0.2) !important;
    margin-bottom: 30px !important;
}

h2.content-header small {
    display: inline-block !important;
    background: rgba(167, 139, 250, 0.15) !important;
    border: 1px solid rgba(167, 139, 250, 0.3) !important;
    padding: 4px 12px !important;
    border-radius: 99px !important;
    color: #a78bfa !important; /* Purple color for the date */
    font-size: 13px !important;
    vertical-align: middle !important;
    margin-left: 15px !important; /* Keep it on the same line on desktop */
    text-shadow: none !important;
}

/* Move date below title on mobile to prevent squishing */
@media (max-width: 768px) {
    h2.content-header {
        font-size: 28px !important;
    }
    h2.content-header small {
        display: block !important;
        margin-left: 0 !important;
        margin-top: 10px !important;
        width: max-content !important;
    }
}
/* =========================================================
   3. MAIN LAYOUT & CONTAINERS
   ========================================================= */
/* Frosted Glass Main Container */
.container.main-box {
    background: rgba(20, 25, 40, 0.4) !important; 
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Base Panel & Card Styling */
.panel, .cart {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Clean up inner borders */
.panel-heading, .list-group-item, .cart-row {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* =========================================================
   4. BUTTONS & FORMS
   ========================================================= */
/* =========================================================
   NEW GLASSY BUTTONS (Vibrant Rainbow Edition)
   ========================================================= */

/* Primary Action Buttons (Checkout, Save, etc.) */
.btn-primary, .btn-success {
    /* Much punchier, more opaque gradient (Purple to Deep Pink) */
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.7) 0%, rgba(219, 39, 119, 0.7) 100%) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    
    /* Stronger glowing border */
    border: 1px solid rgba(244, 114, 182, 0.6) !important; 
    border-radius: 999px !important; /* Pill shape */
    color: #ffffff !important;
    font-weight: 600 !important;
    
    /* Slightly stronger pink shadow resting state */
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.25) !important;
    transition: all 0.3s ease !important; 
}

/* Hover Effect: Scale up, get almost fully opaque, and glow bright */
.btn-primary:hover, .btn-success:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.9) 0%, rgba(236, 72, 153, 0.9) 100%) !important;
    border-color: rgba(244, 114, 182, 0.9) !important;
    transform: scale(1.05) !important; 
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.5) !important; 
    color: #ffffff !important;
}

/* Fancy Default/Select Buttons (Empty Cart, Choose Ticket) */
.btn-default {
    background: rgba(59, 130, 246, 0.25) !important; /* Brighter, more visible blue tint */
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(96, 165, 250, 0.5) !important;
    color: #e2e8f0 !important;
    border-radius: 999px !important; 
    transition: all 0.3s ease !important;
}

.btn-default:hover {
    background: rgba(59, 130, 246, 0.4) !important;
    border-color: rgba(96, 165, 250, 0.8) !important;
    transform: scale(1.05) !important; 
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4) !important;
    color: #ffffff !important;
}

/* When a default button is actively clicked or selected */
.btn-default.active, .btn-default:active, .btn-default:focus {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.6) 0%, rgba(219, 39, 119, 0.6) 100%) !important;
    border-color: #f472b6 !important;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.5) !important;
    color: #ffffff !important;
    transform: scale(0.98) !important; 
}
/* Form Fields */
.form-control {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    height: auto !important;
    box-shadow: none !important;
}

.form-control:focus {
    border-color: #f472b6 !important;
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.2) !important;
    outline: none !important;
}

/* File Upload Button */
input[type="file"]::file-selector-button {
    background: rgba(167, 139, 250, 0.2) !important;
    border: 1px solid rgba(167, 139, 250, 0.5) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 6px 16px !important;
    margin-right: 16px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-weight: 600 !important;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(167, 139, 250, 0.4) !important;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.3) !important;
}

/* =========================================================
   5. TABLES & IMAGES
   ========================================================= */
/* Table Overhaul */
.table {
    color: #e2e8f0 !important;
    background: transparent !important;
    margin-top: 15px !important;
}

.table > thead > tr > th {
    border-bottom: 2px solid rgba(192, 132, 252, 0.4) !important;
    color: #c084fc !important; 
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.85em !important;
    letter-spacing: 1px !important;
    padding-bottom: 12px !important;
}

.table > tbody > tr > td, 
.table > tbody > tr > th {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    vertical-align: middle !important;
    padding: 12px 8px !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.table-striped > tbody > tr:hover {
    background-color: rgba(244, 114, 182, 0.05) !important;
}

.table > thead > tr > th i.fa {
    color: #94a3b8 !important;
    margin-left: 4px !important;
}

/* Images */
img.gravatar {
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.img-thumbnail {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* =========================================================
   6. ALERTS, LABELS & BADGES
   ========================================================= */
/* Alert Banners */
.alert-success {
    background: rgba(34, 197, 94, 0.15) !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
    color: #86efac !important;
    border-radius: 12px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.1) !important;
}

.alert-success a { color: #f0fdf4 !important; font-weight: bold !important; text-decoration: underline !important; }

.alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #fcd34d !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1) !important;
}

.alert-warning a { color: #fffbeb !important; font-weight: bold !important; text-decoration: underline !important; }

.alert-info {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    color: #bae6fd !important;
    border-radius: 12px !important;
    backdrop-filter: blur(8px) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    border-radius: 12px !important;
    backdrop-filter: blur(8px) !important;
}

/* Status Labels */
.label-success {
    background: rgba(34, 197, 94, 0.25) !important;
    border: 1px solid rgba(34, 197, 94, 0.5) !important;
    color: #86efac !important;
    border-radius: 6px !important;
}

.label-warning {
    background: rgba(245, 158, 11, 0.25) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    color: #fcd34d !important;
    border-radius: 6px !important;
}

.label-danger {
    background: rgba(239, 68, 68, 0.25) !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    color: #fca5a5 !important;
    border-radius: 6px !important;
}

/* Panel Status Borders */
.panel-success {
    border-color: rgba(34, 197, 94, 0.4) !important;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1) !important;
}

.panel-danger {
    border-color: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.1) !important;
}

/* Cart Tags */
.textbubble, .textbubble-success {
    background: rgba(167, 139, 250, 0.25) !important;
    border: 1px solid rgba(167, 139, 250, 0.5) !important;
    color: #f8fafc !important;
    border-radius: 8px !important;
    padding: 2px 8px !important;
    box-shadow: 0 2px 10px rgba(167, 139, 250, 0.2) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    font-weight: 600 !important;
}

/* =========================================================
   7. STORE PRODUCTS & CUSTOM COMPONENTS
   ========================================================= */
/* Ticket Product Rows */
.product-row {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.product-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(244, 114, 182, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Sneak Peek Fade Override */
.sneak-peek-trigger {
    background: linear-gradient(0deg, rgba(20, 25, 40, 0.95) 20%, rgba(20, 25, 40, 0) 100%) !important;
    color: #93c5fd !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5) !important;
}

.sneak-peek-trigger:hover, 
.sneak-peek-trigger:hover * {
    color: #f472b6 !important;
    cursor: pointer !important;
}
/* =========================================================
   8. FORMS, LEGENDS & SAVE CONTAINERS
   ========================================================= */

/* Fix the unreadable <legend> titles */
legend {
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 700 !important;
    padding-bottom: 8px !important;
    margin-bottom: 20px !important;
}

/* Turn the white profile-save-container into frosted glass */
.profile-save-container, 
.profile-save-container.js-do-not-copy-answers {
    background: rgba(20, 25, 40, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    padding: 15px !important;
    margin-top: 20px !important;
}
/* =========================================================
   9. HEADER LOGO CORNER FIX
   ========================================================= */

/* Override Pretix's math and force the logo to match our glass box radius */
.page-header.logo-large img,
.event-logo {
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
}

/* Ensure the header container itself doesn't have sharp edges hiding underneath */
.page-header.page-header-with-logo {
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
}
/* =========================================================
   10. LANGUAGE TOGGLE SWITCH (HEADER)
   ========================================================= */

/* 1. Turn the <ul> into a glassy pill container */
.locales ul {
    display: inline-flex !important;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 999px !important; /* Pill shape */
    padding: 4px !important;
    margin: 0 !important;
    list-style: none !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    align-items: center !important;
}

/* 2. Strip out default Pretix list styling/separators */
.locales li {
    margin: 0 !important;
    padding: 0 !important;
}

.locales li::before, 
.locales li + li::before {
    display: none !important; /* Hides the default Pretix "|" separator */
    content: none !important;
}

/* 3. Style the inactive links as subtle text */
.locales a {
    display: inline-block !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    color: #94a3b8 !important; /* Dim grey */
    font-weight: 600 !important;
    font-size: 0.85em !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.locales a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* 4. Style the ACTIVE language as a glowing gradient button */
.locales a.active {
    background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(244, 114, 182, 0.4) !important;
}

/* 5. Inject Flags automatically based on the language tag */
.locales a[lang="en"]::before {
    content: "🇬🇧 ";
    margin-right: 4px;
}

.locales a[lang^="nl"]::before {
    content: "🇳🇱 "; /* The ^="nl" targets both "nl" and "nl-informal" */
    margin-right: 4px;
}
/* =========================================================
   12. BACK BUTTON POSITIONING (FLEXBOX ALIGNMENT)
   ========================================================= */

/* Force the header container to use Flexbox to perfectly align left and right items */
.page-header-links-outside {
    display: flex !important;
    align-items: center !important; /* Perfectly centers everything vertically */
    padding-top: 15px !important; /* Gives some breathing room at the top */
    padding-bottom: 5px !important;
}

/* Hide Pretix's old invisible layout block that messes with Flexbox */
.page-header-links-outside .clearfix {
    display: none !important;
}

/* Disable Bootstrap's old floats and reset margins */
.custom-back-wrapper {
    float: none !important;
    margin: 0 !important;
}

.page-header-links-outside .pull-right.header-part {
    float: none !important;
    margin: 0 0 0 auto !important; /* Pushes the language toggle all the way to the right */
}

/* Make sure the text inside isn't overly huge */
#custom-back-btn {
    font-size: 0.9em !important;
    padding: 6px 16px !important;
    font-weight: 600 !important;
    display: inline-block !important; /* Ensures the padding behaves correctly */
}

/* Mobile responsive fix */
@media (max-width: 768px) {
    .page-header-links-outside {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
/* =========================================================
   13. SPACING & MOBILE RESPONSIVENESS FIXES
   ========================================================= */

/* 1. Fix the giant gap between top buttons and the logo */
.page-header-links-outside {
    padding-bottom: 0 !important; 
    margin-bottom: 0 !important;
}

/* 2. Force buttons to never stack or wrap awkwardly */
.locales ul {
    flex-wrap: nowrap !important;
}

.locales a, #custom-back-btn {
    white-space: nowrap !important; 
}

/* 3. Mobile Magic: Turn language buttons into Flag-Only icons to save space! */
@media (max-width: 768px) {
    .locales a {
        font-size: 0 !important; /* Makes the text invisible */
        padding: 8px 12px !important; /* Keeps the glassy pill shape */
    }
    
    .locales a::before {
        font-size: 18px !important; /* Keeps the flag emoji visible and large */
        margin-right: 0 !important; /* Removes the text gap */
    }

    /* Slightly shrink the back button to ensure perfect fit */
    #custom-back-btn {
        padding: 6px 12px !important;
        font-size: 0.85em !important;
    }
}
/* =========================================================
   14. MODERN TOGGLE BUTTONS (CHECKBOX REMOVAL)
   ========================================================= */

/* 1. Hide the ugly native checkbox square */
.product-row-add input[type="checkbox"],
.item-selection input[type="checkbox"] {
    display: none !important;
}

/* 2. Base style for the Select button label */
.product-row-add label.btn-default,
.item-selection label.btn-default {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 100px !important;
}

/* 3. The "Selected" state (When active) */
.product-row-add label.btn-default.active,
.item-selection label.btn-default.active {
    /* Use the vibrant rainbow gradient from your primary buttons */
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.5) 0%, rgba(219, 39, 119, 0.5) 100%) !important;
    border-color: #f472b6 !important;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4) !important;
    color: #ffffff !important;
    transform: scale(1.02) !important;
}

/* 4. Add a checkmark indicator when selected */
.product-row-add label.btn-default.active::before,
.item-selection label.btn-default.active::before {
    content: '✓' !important; /* Or use an icon font if you have one */
    font-weight: 900 !important;
    font-size: 1.2em !important;
    animation: popIn 0.3s ease-out forwards;
}

/* 5. Change "Select" text to "Selected" when active */
/* Note: This works if the text is exactly "Select" or "Selecteren" */
.product-row-add label.btn-default.active {
    font-size: 0; /* Hide old text */
}

.product-row-add label.btn-default.active::after {
    content: 'Selected' !important; /* Update text */
    font-size: 14px !important; /* Restore font size */
    font-weight: 600 !important;
}

/* Dutch version if needed:
.product-row-add label.btn-default.active:lang(nl)::after {
    content: 'Geselecteerd' !important;
}
*/

/* Quick animation for the checkmark */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}