/*
Theme Name: TicketJunkies
Theme URI: https://github.com/djpayne242/ticket-junkies-2.0
Author: Dj Payne Events
Author URI: https://ticketjunkies.com
Description: The official theme for the TicketJunkies event ticketing plugin. Light and fast, built for Elementor and WooCommerce, with day/night mode, your brand colours and fonts in Appearance → Customize → TicketJunkies Theme. Updates arrive from GitHub together with the plugin. Put your own changes in the "TicketJunkies Child" theme so updates never overwrite them.
Version: 2.0.13
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ticketjunkies-theme
Tags: one-column, custom-logo, custom-menu, custom-colors, featured-images, full-width-template, theme-options, translation-ready, e-commerce
*/

/* Colours, width and fonts are CSS variables set in Appearance → Customize → TicketJunkies Theme.
   Brand colours follow Elementor's Global Colors unless you pick your own in the Customizer. */
:root {
  --tjt-primary: var(--e-global-color-accent, #eb742a);      /* buttons, highlights (orange) */
  --tjt-secondary: var(--e-global-color-primary, #376eb8);   /* links (blue) */
  --tjt-accent: var(--e-global-color-secondary, #84d65f);    /* badges (green) */
  --tjt-primary-d: color-mix(in srgb, var(--tjt-primary) 85%, #000);
  --tjt-ink: #1b1f2a;
  --tjt-muted: #6b7280;
  --tjt-line: #e5e7eb;
  --tjt-bg: #f6f7fb;
  --tjt-card: #ffffff;
  --tjt-header-bg: #ffffff;
  --tjt-footer-bg: #ffffff;
  --tjt-width: 1180px;
  --tjt-radius: 14px;
  --tjt-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tjt-heading-font: var(--tjt-font);
  --tjt-display-font: Anton, Impact, sans-serif;
  --tjt-shadow: 0 6px 24px rgba(20, 30, 60, .08);
}
:root[data-theme="dark"] {
  --tjt-ink: #e9ecf3;
  --tjt-muted: #9aa4b5;
  --tjt-line: #283042;
  --tjt-bg: #0d1017;
  --tjt-card: #161b26;
  --tjt-header-bg: rgba(18, 22, 31, .92);
  --tjt-footer-bg: #12161f;
  --tjt-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--tjt-font); font-size: 16px; line-height: 1.6;
  color: var(--tjt-ink); background: var(--tjt-bg);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--tjt-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
/* night mode: lighter links inside page content (menus keep their own colours) */
:root[data-theme="dark"] .tjt-page-body a:not([class]), :root[data-theme="dark"] .tjt-entry a:not([class]), :root[data-theme="dark"] .tjt-footer-widgets a:not([class]) { color: #7fb0f0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--tjt-heading-font); line-height: 1.2; margin: 0 0 .6em; color: var(--tjt-ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
p, ul, ol, figure, blockquote, table { margin: 0 0 1.2em; }
blockquote { border-left: 4px solid var(--tjt-primary); padding: .2em 0 .2em 1em; color: var(--tjt-muted); }
hr { border: 0; border-top: 1px solid var(--tjt-line); margin: 2em 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .6em .8em; border-bottom: 1px solid var(--tjt-line); text-align: left; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--tjt-card); color: var(--tjt-ink); border-radius: 8px; box-shadow: var(--tjt-shadow); }
.tjt-display { font-family: var(--tjt-display-font); font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }

/* ---------- layout ---------- */
.tjt-container { width: 100%; max-width: var(--tjt-width); margin: 0 auto; padding: 0 20px; }
.tjt-main { flex: 1 0 auto; width: 100%; }
.tjt-content { padding: 36px 0 64px; }
.tjt-narrow { max-width: 780px; }
.tjt-page-title { margin-bottom: 24px; }
.tjt-entry { background: var(--tjt-card); border: 1px solid var(--tjt-line); border-radius: var(--tjt-radius); padding: clamp(20px, 4vw, 40px); box-shadow: var(--tjt-shadow); }
.tjt-entry + .tjt-entry { margin-top: 24px; }
.tjt-entry-meta { color: var(--tjt-muted); font-size: .9rem; margin: -.3em 0 1em; }
.tjt-entry-thumb { margin: -10px 0 20px; border-radius: 12px; overflow: hidden; }
.tjt-entry-thumb img { display: block; width: 100%; }
.tjt-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tjt-grid .tjt-entry + .tjt-entry { margin-top: 0; }
/* Elementor pages: Elementor controls the width, the theme stays out of the way */
.tjt-elementor .tjt-content, .tjt-full .tjt-content { padding: 0; }
.alignwide { max-width: calc(var(--tjt-width) + 200px); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }

/* ---------- buttons & forms ---------- */
/* theme buttons only: never TicketJunkies screens (.tj-root), which have their own styles */
.tjt-btn, button:not([class*="elementor"]):not(.tjt-plain):not(.tj-root *), input[type="submit"]:not(.tj-root *), .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: 10px; cursor: pointer;
  font: 700 1rem/1.2 var(--tjt-font); color: #fff; background: var(--tjt-primary); text-decoration: none;
}
.tjt-btn:hover, button:not([class*="elementor"]):not(.tjt-plain):not(.tj-root *):hover, input[type="submit"]:not(.tj-root *):hover, .wp-block-button__link:hover { background: var(--tjt-primary-d); text-decoration: none; color: #fff; }
:is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], select, textarea):not(.tj-root *) {
  width: 100%; max-width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--tjt-line);
  font: 1rem var(--tjt-font); color: var(--tjt-ink); background: var(--tjt-card);
}
:is(input, select, textarea):not(.tj-root *):focus { outline: 2px solid color-mix(in srgb, var(--tjt-secondary) 40%, transparent); border-color: var(--tjt-secondary); }
@media (max-width: 640px) { input, select, textarea { font-size: 16px; } } /* stops iPhone zoom */

/* ---------- header ---------- */
.tjt-header { position: sticky; top: 0; z-index: 60; background: var(--tjt-header-bg); border-bottom: 1px solid var(--tjt-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.admin-bar .tjt-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tjt-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .tjt-header { top: 0; } }
.tjt-header .topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.tjt-brand { display: flex; align-items: center; gap: 10px; color: var(--tjt-ink); font-weight: 800; font-size: 1.2rem; text-decoration: none !important; }
.tjt-brand img { display: block; height: 40px; width: auto; }
.tjt-nav { margin-left: auto; }
.tjt-push { flex: 1 1 0; }
.tjt-nav ~ .tjt-push { flex: 0 0 0; }
.tjt-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tjt-nav li { position: relative; }
.tjt-header .tjt-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--tjt-ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.tjt-header .tjt-nav a:hover, .tjt-header .tjt-nav .current-menu-item > a { background: color-mix(in srgb, var(--tjt-ink) 7%, transparent); color: var(--tjt-secondary); }
.tjt-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 6px; background: var(--tjt-card); border: 1px solid var(--tjt-line); border-radius: 12px; box-shadow: var(--tjt-shadow); flex-direction: column; align-items: stretch; z-index: 5; }
.tjt-nav li:hover > .sub-menu, .tjt-nav li:focus-within > .sub-menu { display: flex; }
.tjt-header .tjt-nav .tjt-cta > a { background: var(--tjt-primary); color: #fff; padding: 8px 16px; }
.tjt-header .tjt-nav .tjt-cta > a:hover { background: var(--tjt-primary-d); color: #fff; }
.tjt-mode { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--tjt-ink) 7%, transparent); }
.tjt-mode button { padding: 6px; border: 0; border-radius: 999px; background: none; color: var(--tjt-muted); line-height: 0; box-shadow: none; cursor: pointer; }
.tjt-mode button:hover { background: none; color: var(--tjt-ink); }
.tjt-mode button[aria-pressed="true"] { background: var(--tjt-card); color: var(--tjt-primary); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.tjt-menu-toggle { display: none; padding: 8px 10px; background: none; color: var(--tjt-ink); font-size: 1.4rem; line-height: 1; }
.tjt-menu-toggle:hover { background: none; }
/* the TicketJunkies plugin adds its cart button to this header (.cart-btn) */
.tjt-header .cart-btn { position: relative; display: inline-flex; color: var(--tjt-ink); padding: 6px; }
.tjt-header .cart-btn .cart-count { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--tjt-primary); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
@media (max-width: 860px) {
  .tjt-menu-toggle { display: block; }
  .tjt-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; background: var(--tjt-card); border-bottom: 1px solid var(--tjt-line); box-shadow: var(--tjt-shadow); padding: 10px 20px 16px; margin: 0; }
  .tjt-header.is-open .tjt-nav { display: block; }
  .tjt-nav ul { flex-direction: column; align-items: stretch; }
  .tjt-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; }
  .tjt-nav ~ .tjt-push { flex: 1 1 0; }
}

/* ---------- footer ---------- */
.tjt-footer { margin-top: auto; background: var(--tjt-footer-bg); border-top: 1px solid var(--tjt-line); color: var(--tjt-muted); font-size: .95rem; }
.tjt-footer-widgets { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 40px 0 10px; }
.tjt-footer .widget-title, .tjt-footer .widget h2, .tjt-footer .widget h3 { font-size: 1.02rem; color: var(--tjt-ink); margin-bottom: .6em; }
.tjt-footer ul { list-style: none; padding: 0; }
.tjt-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 0; }
.tjt-footer-bottom img { height: 34px; width: auto; display: block; }
.tjt-footer-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tjt-footer-menu a { color: var(--tjt-muted); font-weight: 600; }

/* ---------- posts, pagination, comments, widgets ---------- */
.tjt-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 32px; }
.tjt-pagination .page-numbers { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--tjt-line); background: var(--tjt-card); color: var(--tjt-ink); }
.tjt-pagination .current { background: var(--tjt-primary); border-color: var(--tjt-primary); color: #fff; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-top: 1px solid var(--tjt-line); padding: 16px 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.widget { margin-bottom: 24px; }
.tjt-404 { text-align: center; padding: 60px 0; }
.tjt-404 .big { font-size: 4rem; line-height: 1; }
.search-form { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.wp-caption-text, figcaption { color: var(--tjt-muted); font-size: .9rem; text-align: center; }
.sticky .tjt-entry { border-color: var(--tjt-primary); }
.bypostauthor { }
.gallery-caption { }
