/* Pretix Dark Mode — Storefront (presale)
 * Brand: Summer Party Botoșani (#0A0A0A bg + crimson + gold + wine accents (paletă oficială 2026-05-21))
 * Activation: html[data-pretix-theme="dark"]
 */

html[data-pretix-theme="dark"] {
    --pdm-bg: #0A0A0A;
    --pdm-bg-elev: #141414;
    --pdm-bg-elev-2: #1F1F1F;
    --pdm-text: #E5E5E5;
    --pdm-text-muted: #9CA3AF;
    --pdm-border: #262626;
    --pdm-accent-gold: #D4AF37;
    --pdm-accent-wine: #7F1D1D;
    --pdm-accent-red: #DC2626;
    color-scheme: dark;
}

html[data-pretix-theme="dark"] body {
    background: #0A0A0A !important;
    color: #E5E5E5 !important;
}

/* Pretix presale main wrapper — was hardcoded #fff */
html[data-pretix-theme="dark"] .container,
html[data-pretix-theme="dark"] .container-fluid,
html[data-pretix-theme="dark"] .main-box,
html[data-pretix-theme="dark"] .container.main-box,
html[data-pretix-theme="dark"] main,
html[data-pretix-theme="dark"] main#content,
html[data-pretix-theme="dark"] .event,
html[data-pretix-theme="dark"] .event-frontpage,
html[data-pretix-theme="dark"] footer {
    background-color: #0A0A0A !important;
    color: #E5E5E5 !important;
}

/* Inner cards that pretix uses for events / panels in presale */
html[data-pretix-theme="dark"] .event-list-item,
html[data-pretix-theme="dark"] .event-info,
html[data-pretix-theme="dark"] .event-header-content,
html[data-pretix-theme="dark"] .product-row,
html[data-pretix-theme="dark"] .product-row-content,
html[data-pretix-theme="dark"] .cart-row,
html[data-pretix-theme="dark"] .questions-form,
html[data-pretix-theme="dark"] .checkout-button-row,
html[data-pretix-theme="dark"] .subevent-list-item,
html[data-pretix-theme="dark"] .subevent-toolbar,
html[data-pretix-theme="dark"] .info-row,
html[data-pretix-theme="dark"] section,
html[data-pretix-theme="dark"] article {
    background-color: #141414 !important;
    color: #E5E5E5 !important;
    border-color: #262626 !important;
}

html[data-pretix-theme="dark"] h1,
html[data-pretix-theme="dark"] h2,
html[data-pretix-theme="dark"] h3,
html[data-pretix-theme="dark"] h4,
html[data-pretix-theme="dark"] h5,
html[data-pretix-theme="dark"] h6,
html[data-pretix-theme="dark"] .h1,
html[data-pretix-theme="dark"] .h2,
html[data-pretix-theme="dark"] .h3,
html[data-pretix-theme="dark"] .event h1,
html[data-pretix-theme="dark"] .event h2 {
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] a,
html[data-pretix-theme="dark"] .event a {
    color: #DC2626 !important;
}

html[data-pretix-theme="dark"] a:hover,
html[data-pretix-theme="dark"] a:focus {
    color: #D4AF37 !important;
}

/* Brand-colored primary title link in presale (organizer/event name) */
html[data-pretix-theme="dark"] .event-header .container > h1 a,
html[data-pretix-theme="dark"] .event-header-content h1 a,
html[data-pretix-theme="dark"] .event-header-content h2 a {
    color: #D4AF37 !important;
}

/* Event title (MADATORICELLI x Summer Party BT) — red neon */
html[data-pretix-theme="dark"] .event h1,
html[data-pretix-theme="dark"] .event h2,
html[data-pretix-theme="dark"] .event h3,
html[data-pretix-theme="dark"] .event-info h1,
html[data-pretix-theme="dark"] .event-info h2,
html[data-pretix-theme="dark"] .event-info h3,
html[data-pretix-theme="dark"] main h1,
html[data-pretix-theme="dark"] main h2,
html[data-pretix-theme="dark"] main h3,
html[data-pretix-theme="dark"] .event-frontpage h1,
html[data-pretix-theme="dark"] .event-frontpage h2,
html[data-pretix-theme="dark"] .event-frontpage h3,
html[data-pretix-theme="dark"] section h1,
html[data-pretix-theme="dark"] section h2,
html[data-pretix-theme="dark"] section h3,
html[data-pretix-theme="dark"] article h1,
html[data-pretix-theme="dark"] article h2,
html[data-pretix-theme="dark"] article h3 {
    color: #DC2626 !important;
}

/* The date range right of the title ("5 Iunie 2026 – 6 Iunie 2026") — gold */
html[data-pretix-theme="dark"] .event h1 small,
html[data-pretix-theme="dark"] .event h2 small,
html[data-pretix-theme="dark"] .event h3 small,
html[data-pretix-theme="dark"] main h1 small,
html[data-pretix-theme="dark"] main h2 small,
html[data-pretix-theme="dark"] section h1 small,
html[data-pretix-theme="dark"] section h2 small {
    color: #D4AF37 !important;
}

/* Tab navigation buttons (Listă / Săptămână / Lună / Zi) */
html[data-pretix-theme="dark"] .nav-tabs,
html[data-pretix-theme="dark"] .nav-pills,
html[data-pretix-theme="dark"] .btn-group {
    border-color: #262626 !important;
}

html[data-pretix-theme="dark"] .nav-tabs > li > a,
html[data-pretix-theme="dark"] .nav-pills > li > a,
html[data-pretix-theme="dark"] .btn-group > .btn {
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .nav-tabs > li.active > a,
html[data-pretix-theme="dark"] .nav-pills > li.active > a {
    background-color: #D4AF37 !important;
    color: #ffffff !important;
}

/* Panel / well / modal */
html[data-pretix-theme="dark"] .panel,
html[data-pretix-theme="dark"] .panel-default,
html[data-pretix-theme="dark"] .panel-primary,
html[data-pretix-theme="dark"] .panel-info,
html[data-pretix-theme="dark"] .well,
html[data-pretix-theme="dark"] .modal-content {
    background-color: #141414 !important;
    border-color: #262626 !important;
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .panel-heading,
html[data-pretix-theme="dark"] .panel-footer,
html[data-pretix-theme="dark"] .modal-header,
html[data-pretix-theme="dark"] .modal-footer {
    background-color: #1F1F1F !important;
    border-color: #262626 !important;
    color: #E5E5E5 !important;
}

/* Header bar with title "Evenimente viitoare" */
html[data-pretix-theme="dark"] .panel-heading h1,
html[data-pretix-theme="dark"] .panel-heading h2,
html[data-pretix-theme="dark"] .panel-heading h3,
html[data-pretix-theme="dark"] .panel-title {
    color: #E5E5E5 !important;
}

/* Form controls */
html[data-pretix-theme="dark"] input[type="text"],
html[data-pretix-theme="dark"] input[type="email"],
html[data-pretix-theme="dark"] input[type="number"],
html[data-pretix-theme="dark"] input[type="password"],
html[data-pretix-theme="dark"] input[type="tel"],
html[data-pretix-theme="dark"] input[type="date"],
html[data-pretix-theme="dark"] input[type="search"],
html[data-pretix-theme="dark"] textarea,
html[data-pretix-theme="dark"] select,
html[data-pretix-theme="dark"] .form-control {
    background-color: #0A0A0A !important;
    border-color: #262626 !important;
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .form-control:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25) !important;
}

/* Buttons */
html[data-pretix-theme="dark"] .btn-default {
    background-color: #1F1F1F !important;
    border-color: #262626 !important;
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .btn-default:hover,
html[data-pretix-theme="dark"] .btn-default:focus {
    background-color: #262626 !important;
    color: #D4AF37 !important;
}

html[data-pretix-theme="dark"] .btn-primary {
    background-color: #D4AF37 !important;
    border-color: #D4AF37 !important;
    color: #ffffff !important;
}

html[data-pretix-theme="dark"] .btn-primary:hover,
html[data-pretix-theme="dark"] .btn-primary:focus {
    background-color: #FCD34D !important;
    border-color: #FCD34D !important;
    color: #ffffff !important;
}

/* The "Retrimite link-ul de comandă" black button (event uses primary_color = black) */
html[data-pretix-theme="dark"] .btn[style*="background"],
html[data-pretix-theme="dark"] button[style*="background"] {
    /* leave inline-styled buttons alone */
}

/* Tables */
html[data-pretix-theme="dark"] table,
html[data-pretix-theme="dark"] .table {
    color: #E5E5E5 !important;
    background-color: transparent !important;
}

html[data-pretix-theme="dark"] .table > thead > tr > th,
html[data-pretix-theme="dark"] .table > tbody > tr > td,
html[data-pretix-theme="dark"] .table > tfoot > tr > td {
    border-color: #262626 !important;
    background-color: transparent !important;
}

html[data-pretix-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Misc */
html[data-pretix-theme="dark"] hr {
    border-color: #262626 !important;
}

html[data-pretix-theme="dark"] .text-muted,
html[data-pretix-theme="dark"] small,
html[data-pretix-theme="dark"] .small {
    color: #9CA3AF !important;
}

/* Alerts (with semantic colors) */
html[data-pretix-theme="dark"] .alert-info {
    background-color: rgba(255, 56, 56, 0.15) !important;
    border-color: #DC2626 !important;
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .alert-success {
    background-color: rgba(34, 197, 94, 0.15) !important;
    border-color: #22c55e !important;
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .alert-warning {
    background-color: rgba(251, 191, 36, 0.18) !important;
    border-color: #fbbf24 !important;
    color: #fbbf24 !important;
}

html[data-pretix-theme="dark"] .alert-warning a,
html[data-pretix-theme="dark"] .alert-warning strong {
    color: #fcd34d !important;
}

html[data-pretix-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] code,
html[data-pretix-theme="dark"] pre,
html[data-pretix-theme="dark"] kbd {
    background-color: #1F1F1F !important;
    color: #E5E5E5 !important;
    border-color: #262626 !important;
}

html[data-pretix-theme="dark"] .list-group-item {
    background-color: #141414 !important;
    border-color: #262626 !important;
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .breadcrumb {
    background-color: #1F1F1F !important;
}

html[data-pretix-theme="dark"] .breadcrumb > li + li::before {
    color: #9CA3AF !important;
}

html[data-pretix-theme="dark"] .dropdown-menu {
    background-color: #1F1F1F !important;
    border-color: #262626 !important;
}

html[data-pretix-theme="dark"] .dropdown-menu > li > a {
    color: #E5E5E5 !important;
}

html[data-pretix-theme="dark"] .dropdown-menu > li > a:hover,
html[data-pretix-theme="dark"] .dropdown-menu > li > a:focus {
    background-color: #262626 !important;
    color: #D4AF37 !important;
}

/* SVG / Font Awesome icons (calendar, clock, map pin etc.) — gold accent.
 * Pretix default primary_color = #3F1212 (violet); we replace with #D4AF37 (gold). */
html[data-pretix-theme="dark"] .fa,
html[data-pretix-theme="dark"] .fas,
html[data-pretix-theme="dark"] .far,
html[data-pretix-theme="dark"] [class^="icon-"],
html[data-pretix-theme="dark"] .event .fa-calendar,
html[data-pretix-theme="dark"] .event .fa-clock,
html[data-pretix-theme="dark"] .event .fa-clock-o,
html[data-pretix-theme="dark"] .event .fa-map-marker,
html[data-pretix-theme="dark"] .event .fa-map-marker-alt,
html[data-pretix-theme="dark"] .event .fa-map-pin,
html[data-pretix-theme="dark"] .event .fa-location-arrow,
html[data-pretix-theme="dark"] .event-info .fa,
html[data-pretix-theme="dark"] .event-header .fa {
    color: #D4AF37 !important;
    opacity: 1 !important;
}

/* Event dates / time (mov default Pretix) — gold accent */
html[data-pretix-theme="dark"] .event-info time,
html[data-pretix-theme="dark"] .event-info .date,
html[data-pretix-theme="dark"] .event-info .time,
html[data-pretix-theme="dark"] .event-header time,
html[data-pretix-theme="dark"] .event-header .date,
html[data-pretix-theme="dark"] .event-day,
html[data-pretix-theme="dark"] .event time,
html[data-pretix-theme="dark"] .event .date-range,
html[data-pretix-theme="dark"] .event-list-item time {
    color: #D4AF37 !important;
}

/* Override Pretix CSS custom property if it's used anywhere */
html[data-pretix-theme="dark"] {
    --brand-primary: #D4AF37;
    --brand: #D4AF37;
    --color-brand-primary: #D4AF37;
}

/* "Powered by" footer / small links */
html[data-pretix-theme="dark"] .copyright,
html[data-pretix-theme="dark"] footer .copyright,
html[data-pretix-theme="dark"] .powered-by {
    color: #9CA3AF !important;
}

html[data-pretix-theme="dark"] .copyright a,
html[data-pretix-theme="dark"] .powered-by a {
    color: #DC2626 !important;
}

/* Toggle button — pinned bottom-right */
.pretix-darkmode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #ffffff;
    color: #333;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    padding: 0;
    font-family: inherit;
}

.pretix-darkmode-toggle:hover {
    transform: scale(1.1);
}

html[data-pretix-theme="dark"] .pretix-darkmode-toggle {
    border-color: #262626;
    background: #1F1F1F;
    color: #D4AF37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

html[data-pretix-theme="dark"] .pretix-darkmode-toggle:hover {
    border-color: #D4AF37;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}


/* Fix: Pretix core .profile-save-container has white panel-footer bg (#F5F5F5) — override to dark gray for SPBT brand */
html[data-pretix-theme='dark'] .profile-save-container {
 background-color: #1A1A1A !important;
 border-top: 1px solid #2A2A2A !important;
}


/* Fix: Pretix .modal-wrapper / .modal-card popup (e.g., cart timeout extended) has white bg making text invisible */
html[data-pretix-theme='dark'] .modal-wrapper {
 background-color: rgba(0, 0, 0, 0.7) !important;
}
html[data-pretix-theme='dark'] .modal-card {
 background-color: #1A1A1A !important;
 color: #E5E5E5 !important;
 border: 1px solid #2A2A2A !important;
}
