/*
 * Client brand skin (Organizer → Brand). Loaded after theme.css, only for an
 * organizer with the brand switched on; <html> then carries .tk-brand, plus
 * .tk-light for the light look. The per-organizer colors and font come from a
 * generated stylesheet loaded after this one (brand.py → brand_css), which sets
 * --acc, --acc2, --acc-hover, --acc3, --acc-glow, --acc-rgb, --brand2,
 * --brand2-rgb and --tk-font.
 *
 * theme.css is written for a dark page and hardcodes a few dark shades and the
 * Tiketeu purple; the overrides below cover those.
 */

/* ───────────── Every brand look ───────────── */

/* Font: everything except icon fonts. */
html.tk-brand body,
html.tk-brand body *:not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not(.glyphicon) {
  font-family: var(--tk-font) !important;
}
html.tk-brand .tk-hero-title,
html.tk-brand h1, html.tk-brand h2, html.tk-brand h3 {
  letter-spacing: -0.01em;
}

/* Tiketeu purple that theme.css hardcodes → brand color */
html.tk-brand a:hover { color: var(--acc-hover) !important; }
html.tk-brand .tk-nav-cta { border-color: rgba(var(--acc-rgb), 0.35) !important; }
html.tk-brand .tk-nav-cta:hover { background: rgba(var(--acc-rgb), 0.12) !important; color: var(--acc) !important; }
html.tk-brand .tk-btn-ver-mapa,
html.tk-brand .modal-card .progress-bar {
  background: linear-gradient(135deg, var(--acc), var(--acc2)) !important;
}
html.tk-brand .btn-primary, html.tk-brand button.btn-primary,
html.tk-brand article.panel-ticketeu .btn-primary,
html.tk-brand .tk-card-btn, html.tk-brand .tk-btn-comprar,
html.tk-brand .tk-contact-opt-btn--email {
  box-shadow: 0 4px 14px rgba(var(--acc-rgb), 0.25) !important;
}
html.tk-brand .btn-primary:hover, html.tk-brand button.btn-primary:hover,
html.tk-brand article.panel-ticketeu .btn-primary:hover,
html.tk-brand .tk-card-btn:hover, html.tk-brand .tk-btn-comprar:hover {
  box-shadow: 0 6px 20px rgba(var(--acc-rgb), 0.35) !important;
}
html.tk-brand .tk-btn-ver-mapa,
html.tk-brand .tk-btn-ver-mapa:hover { box-shadow: 0 4px 18px rgba(var(--acc-rgb), 0.35) !important; animation: none !important; }
html.tk-brand article.panel-ticketeu:hover,
html.tk-brand .tk-card:hover { border-color: rgba(var(--acc-rgb), 0.3) !important; }
html.tk-brand .product-row:hover { border-color: rgba(var(--acc-rgb), 0.3) !important; box-shadow: 0 4px 18px rgba(var(--acc-rgb), 0.08) !important; }
html.tk-brand .tk-contact-opt-email { background: rgba(var(--acc-rgb), 0.12); }
html.tk-brand .modal-card-icon { background: rgba(var(--acc-rgb), 0.12) !important; box-shadow: none !important; }
html.tk-brand .modal-card-icon .fa-cog { text-shadow: none !important; }
html.tk-brand .modal-card .progress { background: rgba(var(--acc-rgb), 0.15) !important; }
html.tk-brand .alert-info { color: var(--acc) !important; }

/* Tiketeu purple that this fork's core presale SCSS hardcodes
   (src/pretix/static/pretixpresale/scss/_theme.scss), some with !important. */
html.tk-brand .checkout-flow .checkout-step.step-current .checkout-step-icon,
html.tk-brand .checkout-flow .checkout-step.step-done .checkout-step-icon,
html.tk-brand .checkout-flow .checkout-step.step-done:before,
html.tk-brand .checkout-flow .checkout-step.step-done:after,
html.tk-brand .checkout-flow .checkout-step.step-current:before,
html.tk-brand .panel-primary > .panel-heading,
html.tk-brand .panel-primary > legend > .panel-heading,
html.tk-brand #panel-heading-ticketeu {
  background: var(--acc) !important;
}
html.tk-brand .info-row .info-row-icon,
html.tk-brand .info-row > img { color: var(--acc) !important; }
html.tk-brand .input-item-count-inc { border-color: var(--acc) !important; color: var(--acc) !important; }
html.tk-brand .input-item-count-inc:hover:not([disabled]) {
  background: var(--acc) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(var(--acc-rgb), 0.3) !important;
}
html.tk-brand .input-item-count-group input:focus,
html.tk-brand .form-control:focus,
html.tk-brand input[type="file"].form-control:hover {
  border-color: var(--acc) !important; box-shadow: 0 0 0 3px rgba(var(--acc-rgb), 0.15) !important;
}
html.tk-brand .eupho-box { background: rgba(var(--acc-rgb), 0.05) !important; }

/* Header: client logo + "Powered by Tiketeu" */
.tk-nav-logo--brand { height: 34px; max-width: 180px; object-fit: contain; object-position: left center; }
.tk-nav-brand-name { font-weight: 800; font-size: 20px; color: var(--txt); }
.tk-powered {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; line-height: 1; white-space: nowrap;
  color: var(--mut) !important; text-decoration: none !important;
}
.tk-powered img { height: 14px; width: auto; display: block; }
.tk-powered--nav { margin-left: 14px; margin-right: auto; padding-left: 14px; border-left: 1px solid var(--bdr2); }
@media (max-width: 767px) {
  /* Phones: the brand logo gets the room; "Powered by" stays in the footer. */
  .tk-powered--nav { display: none; }
}

/* Organizer page header: brand gradient, optional photo (set in the generated CSS).
   theme.css hides <header> entirely; show it when it holds the brand hero, still
   without pretix's header links row. */
html.tk-brand header:has(.tk-hero--brand) { display: block !important; }
html.tk-brand header:has(.tk-hero--brand) .page-header-links { display: none !important; }
html.tk-brand .tk-hero--brand {
  height: auto; min-height: 220px; padding: 48px 0;
  background-color: var(--brand2);
  background-image: linear-gradient(118deg, var(--acc) 0%, var(--brand2) 64%);
  background-size: cover; background-position: center;
}
html.tk-brand .tk-hero--brand .tk-hero-title {
  color: #fff !important; text-shadow: none; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 0 0 10px;
}
html.tk-brand .tk-hero--brand .tk-hero-sub { color: rgba(255,255,255,0.88) !important; font-size: clamp(14px, 2vw, 17px); margin: 0; }

/* Footer: second brand color, white text */
html.tk-brand .tk-footer--brand { background: var(--brand2); border-top: none; padding-top: 32px; }
html.tk-brand .tk-footer--brand .tk-footer-logo--brand { height: 40px; max-width: 200px; object-fit: contain; }
html.tk-brand .tk-footer-brand-name { font-weight: 800; font-size: 22px; color: #fff; }
.tk-footer-brandlinks { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
html.tk-brand .tk-footer--brand a,
html.tk-brand .tk-footer--brand .tk-footer-links nav ul li a,
html.tk-brand .tk-footer--brand .tk-footer-links nav ul li button { color: rgba(255,255,255,0.78) !important; }
html.tk-brand .tk-footer--brand a:hover,
html.tk-brand .tk-footer--brand .tk-footer-links nav ul li a:hover,
html.tk-brand .tk-footer--brand .tk-footer-links nav ul li button:hover { color: #fff !important; }
html.tk-brand .tk-footer--brand .tk-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px;
}
html.tk-brand .tk-footer--brand .tk-footer-bottom p { color: rgba(255,255,255,0.7) !important; }
html.tk-brand .tk-footer--brand .tk-powered { color: rgba(255,255,255,0.7) !important; }

/* ───────────── Light look ───────────── */

html.tk-light {
  --txt:    #262b32;
  --txt2:   #4a5160;
  --mut:    #60697b;
  --bg:     #f7f6f9;
  --surf:   #ffffff;
  --surf2:  #f3f0f5;
  --surf3:  #e8e3ec;
  --bdr:    rgba(38,43,50,0.09);
  --bdr2:   rgba(38,43,50,0.15);
  --grn:    #13875a;
  --grn-bg: rgba(19,135,90,0.10);
  --red:    #c8303f;
  --red-bg: rgba(200,48,63,0.09);
  --ylw:    #a86400;
  --ylw-bg: rgba(168,100,0,0.10);
  color-scheme: light;
}

html.tk-light ::-webkit-scrollbar-thumb { background: #cfc7d6; }

html.tk-light .tk-nav {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 1px 12px rgba(38,43,50,0.06);
}
html.tk-light .tk-nav-link:hover { color: var(--acc) !important; background: var(--surf2) !important; }
html.tk-light .tk-nav-toggle span { background: var(--txt) !important; }

/* Soft shadows instead of the dark theme's deep ones */
html.tk-light article.panel-ticketeu,
html.tk-light .tk-card { box-shadow: 0 2px 14px rgba(38,43,50,0.06) !important; }
html.tk-light article.panel-ticketeu:hover,
html.tk-light .tk-card:hover { box-shadow: 0 10px 30px rgba(38,43,50,0.10) !important; }
html.tk-light .dropdown-menu { box-shadow: 0 8px 28px rgba(38,43,50,0.12) !important; }
html.tk-light .tk-overlay { background: rgba(38,43,50,0.45); }
html.tk-light .tk-overlay-modal,
html.tk-light .tk-map-box,
html.tk-light dialog.modal-card { box-shadow: 0 24px 60px rgba(38,43,50,0.22) !important; }
html.tk-light .tk-map-backdrop,
html.tk-light dialog.modal-card::backdrop { background: rgba(38,43,50,0.55) !important; }

/* Hairlines theme.css draws in translucent white */
html.tk-light .panel.panel-primary:not(.cart) .panel-heading { border-bottom-color: var(--bdr2) !important; }
html.tk-light .panel-confirm > .panel-body { border-top-color: var(--bdr) !important; }

/* Bootstrap form controls and wells that pretix's own CSS paints */
html.tk-light .form-control,
html.tk-light input[type="text"], html.tk-light input[type="email"], html.tk-light input[type="tel"],
html.tk-light input[type="number"], html.tk-light select, html.tk-light textarea {
  background-color: #fff !important; color: var(--txt) !important; border-color: var(--bdr2) !important;
}
html.tk-light .form-control:focus { border-color: var(--acc) !important; box-shadow: 0 0 0 3px rgba(var(--acc-rgb), 0.15) !important; }
html.tk-light ::placeholder { color: #8c93a1 !important; }
