/*
 * 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),
html.tk-brand header:has(.tk-intro) { display: block !important; }
html.tk-brand header:has(.tk-hero--brand) .page-header-links,
html.tk-brand header:has(.tk-intro) .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; }

/* Language links in the header (theme.css hides pretix's own) */
.tk-nav-langs nav { display: flex; align-items: center; gap: 2px; }
html.tk-brand a.tk-nav-lang {
  font-size: 12px; font-weight: 700; padding: 6px 8px; border-radius: 8px;
  color: var(--mut) !important; text-decoration: none !important;
}
html.tk-brand a.tk-nav-lang:hover { color: var(--acc) !important; }
html.tk-brand a.tk-nav-lang.active { color: var(--acc) !important; background: rgba(var(--acc-rgb), 0.08); }

/* ── Organizer page landing: introduction, event list heading, "how to buy" ── */
@media (prefers-reduced-motion: no-preference) { html.tk-brand { scroll-behavior: smooth; } }
#tk-events, #tk-howto { scroll-margin-top: 80px; }

.tk-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--acc) !important;
}
.tk-eyebrow:before { content: ""; width: 16px; height: 3px; border-radius: 4px; background: currentColor; }

.tk-intro {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(ellipse at 74% 31%, rgba(var(--acc-rgb), 0.38) 0%, transparent 46%),
    linear-gradient(110deg, var(--brand2-dark) 9%, var(--brand2) 68%, var(--brand2-dark) 100%);
}
.tk-intro:before {
  content: ""; position: absolute; inset: 0; opacity: 0.12; pointer-events: none;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 29px 29px;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
}
.tk-intro:after {
  content: ""; position: absolute; width: 700px; height: 700px; right: -490px; bottom: -430px;
  border: 100px solid rgba(var(--acc-rgb), 0.15); border-radius: 50%; pointer-events: none;
}
.tk-intro-inner {
  position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 64px 24px 72px;
  display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center;
}
.tk-intro-inner--visual { grid-template-columns: 1.05fr 1fr; min-height: 470px; }
html.tk-brand .tk-intro .tk-eyebrow { color: rgba(255,255,255,0.8) !important; color: color-mix(in srgb, var(--acc) 30%, #fff) !important; }
.tk-intro-title {
  font-size: clamp(34px, 4.2vw, 58px); line-height: 1.06; letter-spacing: -0.04em; font-weight: 800;
  margin: 20px 0 18px; max-width: 620px; color: #fff !important;
}
.tk-intro-title span { color: color-mix(in srgb, var(--acc) 50%, #fff); }
html.tk-brand .tk-intro-text { font-size: 16px; line-height: 1.75; color: rgba(255,255,255,0.82) !important; max-width: 480px; margin: 0 0 30px; }
.tk-intro-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
html.tk-brand a.tk-intro-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; border-radius: 13px;
  background: var(--acc); color: #fff !important; font-weight: 800; font-size: 14px; line-height: 1;
  text-decoration: none !important; box-shadow: 0 9px 20px rgba(var(--acc-rgb), 0.3);
  transition: background .2s, transform .2s;
}
html.tk-brand a.tk-intro-btn:hover { background: var(--acc-hover); color: #fff !important; transform: translateY(-1px); }
html.tk-brand a.tk-intro-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
  color: #fff !important; text-decoration: none !important;
}
html.tk-brand a.tk-intro-link:hover { color: #fff !important; text-decoration: underline !important; }

.tk-intro-visual { position: relative; padding: 22px 0 22px 22px; }
.tk-intro-visual:before {
  content: ""; position: absolute; width: 78%; height: 88%; right: 4%; top: 0;
  border: 1px solid rgba(255,255,255,0.14); border-radius: 32px; transform: rotate(7deg);
}
html.tk-brand .tk-feature {
  position: relative; display: block; height: 340px; border-radius: 24px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 24px 50px rgba(0,0,0,0.34);
  color: #fff !important; text-decoration: none !important;
}
.tk-feature-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a.tk-feature:hover .tk-feature-img { transform: scale(1.03); }
.tk-feature:after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15,6,20,0.8), rgba(15,6,20,0.05) 62%); }
.tk-feature-tag {
  position: absolute; z-index: 1; top: 20px; left: 20px; padding: 8px 13px; border-radius: 30px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(var(--brand2-rgb), 0.6); border: 1px solid rgba(255,255,255,0.22);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
.tk-feature-body { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; display: flex; flex-direction: column; gap: 6px; }
.tk-feature-title { font-size: 26px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; color: #fff; }
.tk-feature-meta { font-size: 13px; color: rgba(255,255,255,0.88); }
.tk-feature-meta .fa { width: 16px; opacity: 0.8; }

html.tk-brand .tk-events-section { padding-top: 64px; }
.tk-section-heading { margin: 0 0 30px; }
html.tk-brand .tk-section-heading h2 {
  font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -0.035em; font-weight: 800;
  margin: 12px 0 10px; color: var(--txt) !important;
}
html.tk-brand .tk-section-heading p:not(.tk-eyebrow) { font-size: 15px; line-height: 1.6; color: var(--mut) !important; margin: 0; max-width: 620px; }

.tk-howto { background: rgba(var(--brand2-rgb), 0.06); border-top: 1px solid var(--bdr); padding: 72px 0 80px; }
.tk-howto-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.tk-howto-head { text-align: center; }
html.tk-brand .tk-howto-head h2 {
  font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.035em; font-weight: 800;
  margin: 14px 0 10px; color: var(--txt) !important;
}
.tk-howto-head p:not(.tk-eyebrow) { color: var(--mut); margin: 0; font-size: 14px; }
.tk-howto-grid { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tk-howto-item { background: var(--surf); border: 1px solid var(--bdr); border-radius: 18px; padding: 30px 28px; }
.tk-howto-num {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; margin-bottom: 22px;
  background: rgba(var(--acc-rgb), 0.1); color: var(--acc); font-size: 20px; font-weight: 800;
}
html.tk-brand .tk-howto-item h3 { font-size: 17px; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 8px; color: var(--txt) !important; }
.tk-howto-item p { color: var(--mut); font-size: 14px; line-height: 1.65; margin: 0; }

@media (max-width: 900px) {
  .tk-intro-inner, .tk-intro-inner--visual { grid-template-columns: 1fr; gap: 30px; min-height: 0; padding: 48px 20px 56px; }
  .tk-intro-visual { padding: 0 10px 0 0; }
  .tk-intro-visual:before { width: 70%; height: 90%; top: 6px; }
  .tk-feature { height: 260px; }
}
@media (max-width: 600px) {
  .tk-intro-title { font-size: 36px; margin: 16px 0 14px; }
  html.tk-brand .tk-intro-text { font-size: 14px; margin-bottom: 24px; }
  .tk-feature { height: 220px; border-radius: 19px; }
  .tk-feature-title { font-size: 21px; }
  html.tk-brand .tk-events-section { padding-top: 44px; }
  .tk-howto { padding: 52px 0 56px; }
  .tk-howto-inner { padding: 0 16px; }
  .tk-howto-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .tk-howto-item { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 20px; }
  .tk-howto-num { grid-row: span 2; width: 42px; height: 42px; font-size: 16px; margin: 0; }
  .tk-howto-item h3 { font-size: 15px; margin: 2px 0 4px; }
  .tk-howto-item p { font-size: 13px; }
}

/* 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; }
