/*
Theme Name: WordCamp Uganda 2027 Tickets
Description: One-screen ticket site for WordCamp Uganda 2027, on top of the WordCamp Uganda Tickets plugin.
Author: Kasiryelabs
Version: 1.2.0
Requires PHP: 8.1
Text Domain: wcug-landing
*/

:root {
    --ink: #111111;
    --ink-2: #3d3d3d;
    --muted: #6b6b6b;
    --line: #e4e2dc;
    --paper: #ffffff;
    --paper-2: #f5f5f3;
    --accent: #3858e9; /* WordPress blue */
    --accent-dark: #2145e6;
    --radius: 8px;
    --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    padding: 0 !important;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.5 "Google Sans Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border: 1.5px solid var(--ink); border-radius: var(--radius);
    background: var(--paper); color: var(--ink); font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1;
    text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; border-color: #333; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn-lg { min-height: 52px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { background: #e9e9e6; border-color: #e9e9e6; color: var(--muted); cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand img { height: 32px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 600px) { .site-nav a:not(.btn) { display: none; } .brand img { height: 26px; } }

/* Stage: one screen with the photo, the event and the tickets */
.stage { position: relative; display: flex; align-items: center; min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); overflow: hidden; background: #1a1a1a; color: #fff; }
.stage-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .58); }

/* Tiled photos sliding sideways behind everything */
.tiles { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(3, 1fr); gap: 6px; }
.tiles-row { overflow: hidden; min-height: 0; }
.tiles-track { display: flex; width: max-content; height: 100%; animation: tiles-slide var(--dur, 100s) linear infinite; will-change: transform; }
.tiles-row.is-reverse .tiles-track { animation-direction: reverse; }
.tiles-set { display: flex; gap: 6px; padding-right: 6px; height: 100%; }
.tiles-set img { height: 100%; width: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@keyframes tiles-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tiles-track { animation: none; } }
.stage-inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.stage-event h1 img { width: min(460px, 100%); }
.stage-when { margin-top: 20px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em; }
.stage-where { margin-top: 2px; font-size: 18px; opacity: .9; }

.stage-tickets { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: #fff; color: var(--ink); }
.tk { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 16px 18px; border: 1.5px solid var(--line); border-radius: var(--radius); }
.tk.is-off { background: var(--paper-2); }
.tk-name { font-weight: 700; font-size: 17px; }
.tk-name span { margin-left: 6px; font-weight: 500; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tk-price { margin-top: 2px; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tk .btn { min-width: 96px; }
@media (max-width: 400px) { .tk-name span { display: block; margin-left: 0; font-size: 13px; } }
.tk-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 4px 4px 2px; font-size: 14px; color: var(--muted); }
.tk-pay { display: flex; align-items: center; gap: 14px; }
.tk-pay img { height: 22px; width: auto; }
.tk-pay .pay-visa { height: 12px; }
.tk-pay .pay-mc { height: 18px; }

@media (max-width: 860px) and (min-aspect-ratio: 1/1) and (max-height: 560px) {
    /* Phone held sideways: keep both columns, tighter, so the tickets are on the first screen */
    .stage-inner { gap: 24px; padding-top: 16px; padding-bottom: 16px; }
    .stage-event h1 img { width: min(240px, 100%); }
    .stage-when { margin-top: 10px; font-size: 20px; }
    .stage-where { font-size: 15px; }
    .stage-tickets { gap: 6px; padding: 8px; }
    .tk { padding: 8px 10px 8px 14px; }
    .tk-price { font-size: 22px; }
    .tk .btn { min-height: 40px; }
    .tk-foot { display: none; }
}
@media (max-width: 860px) and (max-aspect-ratio: 1/1) {
    .stage { align-items: flex-end; }
    .stage-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 140px; padding-bottom: 20px; }
    .stage-event h1 img { width: min(320px, 80vw); }
}


/* Footer */
.site-footer { background: var(--ink); color: #c9c9c9; font-size: 14px; }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding-top: 28px; padding-bottom: 12px; }
.site-footer-logo { height: 28px; width: auto; margin-bottom: 8px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: #fff; }
.site-footer-note { padding-bottom: 28px; color: #8f8f8f; font-size: 13px; }

/* Pop-up */
.modal { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); overflow: auto; }
.modal::backdrop { background: rgba(17, 17, 17, .65); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.modal-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.modal-body { display: grid; gap: 12px; padding: 16px 22px 22px; }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: none; font-size: 22px; line-height: 1; cursor: pointer; }
.modal-error { padding: 10px 12px; border-left: 4px solid #c62828; background: #fdecec; color: #8e1c1c; font-weight: 600; font-size: 15px; }
@media (max-width: 600px) {
    .modal { width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
}

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.choice-item { position: relative; cursor: pointer; }
.choice-item input { position: absolute; opacity: 0; }
.choice-item span { display: grid; gap: 1px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); }
.choice-item em { font-style: normal; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.choice-item input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-item input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.modal input[type="text"], .modal input[type="email"], .modal input[type="tel"] {
    width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius);
    font: inherit; color: var(--ink); background: #fff;
}
.modal input:focus { outline: none; border-color: var(--accent); }
.field-label { font-weight: 600; font-size: 15px; }
.qty { display: flex; justify-content: space-between; align-items: center; }
.stepper { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: var(--paper-2); font-size: 20px; cursor: pointer; }
.stepper input { width: 48px; border: 0; text-align: center; font-family: inherit; font-size: 17px; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.others [data-other-list] { display: grid; gap: 8px; }
.consent { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.consent input { width: 18px; height: 18px; accent-color: var(--accent); }

.demo-flag { justify-self: start; padding: 4px 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a5a00; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.pay-total strong { font-size: 26px; letter-spacing: -.03em; color: var(--ink); }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; border: 0; }
.method { position: relative; cursor: pointer; }
.method input { position: absolute; opacity: 0; }
.method span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 58px; border: 1.5px solid var(--line); border-radius: var(--radius); }
.method img { height: 26px; width: auto; }
.method .m-visa { height: 11px; }
.method .m-mc { height: 18px; }
.method input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.method input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0; color: var(--ink-2); }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-frame { width: 100%; height: min(640px, 70dvh); border: 1px solid var(--line); border-radius: var(--radius); }
.done-lead { color: var(--ink-2); }

/* Tickets (pop-up and order page) */
.wcug-tickets { display: grid; gap: 10px; }
.wcug-ticket { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; }
.wcug-ticket img { width: 96px; height: 96px; flex: none; }
.wcug-ticket-type { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wcug-ticket-name { margin-top: 2px; font-weight: 700; }
.wcug-ticket-code { margin-top: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .06em; }
.wcug-ticket.is-demo { border-style: dashed; }
.wcug-ticket.is-cancelled { opacity: .5; }

/* Order page (the plugin's [wcug_order]) */
.page { padding: 56px 0 80px; }
.page .wcug { max-width: none; }
.page .wcug-event-title { font-weight: 800; letter-spacing: -.035em; }
.page .wcug-ticket img { width: 132px; height: 132px; }
.page .wcug-button { border-radius: var(--radius); background: var(--accent); color: #fff !important; }
.page .wcug-button-ghost { background: transparent; border-color: var(--ink); color: var(--ink) !important; }

@media print {
    .site-header, .site-footer, .wcug-print { display: none !important; }
}

/* Contact */
.help-line { font-size: 14px; color: var(--muted); text-align: center; }
.help-line a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.stage-tickets .help-line { padding: 2px 4px 4px; text-align: left; }
.site-footer-contact { display: grid; gap: 4px; }
.site-footer-label { color: #8f8f8f; font-size: 13px; }

/* Icons: sized to the text, coloured by it */
.icon { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.16em; margin-right: .4em; }
.btn .icon { margin-right: 0; }
.stage-when, .stage-where { display: flex; align-items: center; }
.stage-when .icon { width: .85em; height: .85em; margin-right: .45em; opacity: .9; }
.stage-where .icon { opacity: .85; }
.tk-includes { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.tk-includes > span { display: inline-flex; align-items: center; }
.tk-includes .icon { margin-right: .35em; color: var(--ink-2); }
.help-line a { display: inline-flex; align-items: center; }
.help-line .icon { margin-right: .3em; }
.demo-flag { display: inline-flex; align-items: center; }
.site-nav a { display: inline-flex; align-items: center; }
.site-footer a, .site-footer-note p { display: inline-flex; align-items: center; }
.site-footer .icon { color: #9a9a9a; }
.site-footer a:hover .icon { color: #fff; }
.site-footer-event { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer-event span { display: inline-flex; align-items: center; }


/* Pay step: Pesapal's page lives in a frame we can't auto-size (other site), so give it a wider, full-height pop-up
   and let the frame fill it; one scroll area instead of a frame scrolling inside a scrolling pop-up. */
.modal:has([data-step="pay"]:not([hidden]) .pay-frame) { width: min(600px, calc(100% - 24px)); height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; }
.modal:has([data-step="pay"]:not([hidden]) .pay-frame) .modal-body[data-step="pay"] { flex: 1; min-height: 0; grid-template-rows: 1fr auto auto; gap: 10px; padding-top: 10px; }
.modal:has([data-step="pay"]:not([hidden]) .pay-frame) .pay-frame { height: 100%; min-height: 0; border: 0; border-radius: 0; }
@media (max-width: 600px) {
    .modal:has([data-step="pay"]:not([hidden]) .pay-frame) { width: 100%; height: 94dvh; }
    .modal:has([data-step="pay"]:not([hidden]) .pay-frame) .modal-body[data-step="pay"] { padding: 6px 8px 14px; }
}
