/* Ticketa controls: dropdowns, calendar, time picker, validation messages, dialogs (see assets/js/tk-controls.js) */

/* ---------- the field shell ---------- */
body.tk-ui .tkc-field { position: relative; display: block; width: 100%; min-width: 0; max-width: 100%; }
body.tk-ui .tkc-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }

body.tk-ui .tkc-btn {
    display: flex; align-items: center; gap: .6rem; width: 100%; min-width: 0; max-width: 100%; min-height: 46px;
    margin: 0; padding: 0 .95rem; border: 1.5px solid var(--tk-ring, #e4e4e7); border-radius: 12px; background: #fff;
    color: var(--tk-ink, #18181b); font: inherit; font-size: .92rem; font-weight: 500; line-height: 1.2; text-align: left; cursor: pointer;
    box-shadow: none; -webkit-appearance: none; appearance: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
body.tk-ui .tkc-btn:hover { border-color: #a1a1aa; }
body.tk-ui .tkc-btn:focus-visible,
body.tk-ui .tkc-btn.is-open { border-color: var(--tk-ink, #18181b); box-shadow: 0 0 0 3px rgba(24, 24, 27, .09); outline: 0; }
body.tk-ui .tkc-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.tk-ui .is-empty > .tkc-btn .tkc-label { color: #a1a1aa; }
body.tk-ui .tkc-ico { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--tk-soft, #f4f4f5); color: var(--tk-ink, #18181b); }
body.tk-ui .tkc-chev { display: grid; place-items: center; flex: none; color: var(--tk-muted, #71717a); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
body.tk-ui .tkc-btn.is-open .tkc-chev { transform: rotate(180deg); color: var(--tk-ink, #18181b); }
body.tk-ui .tkc-field.is-disabled .tkc-btn { background: var(--tk-soft, #f4f4f5); color: #a1a1aa; cursor: not-allowed; }

/* compact: the small filter selects */
body.tk-ui .events-filter-wrapper .tkc-btn { min-height: 42px; padding-left: 2.6rem; border-color: transparent; background: transparent; font-weight: 700; }
body.tk-ui .events-filter-wrapper .is-empty > .tkc-btn .tkc-label { color: var(--tk-ink, #18181b); }
body.tk-ui .events-filter-wrapper .tkc-field { position: static; }

/* ---------- validation ---------- */
body.tk-ui .tkc-invalid > .tkc-btn,
body.tk-ui input.tkc-invalid,
body.tk-ui textarea.tkc-invalid,
body.tk-ui select.tkc-invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .1) !important; }
body.tk-ui .tkc-err {
    display: flex; align-items: flex-start; gap: .5rem; margin: .4rem 0 .2rem; padding: .5rem .75rem;
    border: 1.5px dashed #f0b4b4; border-radius: 10px; background: #fff6f6; color: #991b1b;
    font-size: .8rem; font-weight: 600; line-height: 1.4; animation: tkcErr .45s cubic-bezier(.34, 1.56, .64, 1);
}
body.tk-ui .tkc-err i { display: grid; place-items: center; flex: none; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%; background: #dc2626; color: #fff; }
@keyframes tkcErr { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- popovers (dropdown list, calendar, time) ---------- */
.tkc-pop {
    position: fixed; z-index: 100000; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left;
    transition: opacity .16s ease, transform .22s cubic-bezier(.34, 1.56, .64, 1);
    filter: drop-shadow(0 18px 22px rgba(24, 24, 27, .2)) drop-shadow(0 2px 3px rgba(24, 24, 27, .12));
    font-family: inherit; color: var(--tk-ink, #18181b);
}
.tkc-pop.is-in { opacity: 1; transform: none; }
.tkc-pop.is-up { transform-origin: bottom left; }
.tkc-pop-in { overflow: hidden; border-radius: 16px; background: #fff; }

/* dropdown list */
.tkc-select-pop { overflow: visible; }
.tkc-select-pop .tkc-pop-in { max-height: inherit; display: flex; }
.tkc-list { width: 100%; max-height: 300px; overflow-y: auto; padding: .35rem; overscroll-behavior: contain; scrollbar-width: thin; }
.tkc-opt {
    position: relative; display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem .6rem 1.05rem; border-radius: 10px;
    font-size: .9rem; font-weight: 600; line-height: 1.3; cursor: pointer; user-select: none;
}
.tkc-opt + .tkc-opt::before { content: ""; position: absolute; left: .8rem; right: .8rem; top: 0; border-top: 1.5px dashed #eeeef0; }
.tkc-opt.is-hot { background: #f4f4f5; }
.tkc-opt.is-hot::before, .tkc-opt.is-hot + .tkc-opt::before { border-top-color: transparent; }
.tkc-opt.is-selected { color: #fff; background: var(--tk-ink, #18181b); }
.tkc-opt.is-selected::before, .tkc-opt.is-selected + .tkc-opt::before { border-top-color: transparent; }
.tkc-opt.is-selected::after { content: ""; margin-left: auto; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.tkc-opt.is-placeholder { color: #a1a1aa; font-weight: 500; }
.tkc-opt.is-placeholder.is-selected { background: #f4f4f5; color: #a1a1aa; }
.tkc-opt.is-placeholder.is-selected::after { display: none; }
.tkc-opt.is-disabled { opacity: .4; cursor: not-allowed; }
.tkc-group { padding: .6rem .8rem .25rem; color: var(--tk-muted, #71717a); font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

/* ticket-style heads (calendar + time): ink band, dashed tear, notches cut into both sides */
.tkc-cal-pop .tkc-pop-in,
.tkc-time-pop .tkc-pop-in {
    --tear: 58px;
    -webkit-mask: radial-gradient(circle 9px at 0 var(--tear), #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% var(--tear), #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle 9px at 0 var(--tear), #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% var(--tear), #0000 98%, #000) right / 51% 100% no-repeat;
}
.tkc-cal { width: 296px; }
.tkc-cal-head { display: flex; align-items: center; gap: .15rem; height: 58px; padding: 0 .55rem; background: var(--tk-ink, #18181b); color: #fff; }
.tkc-cal-title { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; line-height: 1.15; cursor: pointer; }
button.tkc-cal-title:hover b { text-decoration: none; opacity: .8; }
.tkc-cal-title b { font-size: .8rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.tkc-cal-title span { margin-top: 2px; color: rgba(255, 255, 255, .6); font-size: .74rem; font-weight: 700; letter-spacing: .12em; }
.tkc-nav {
    display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0 0 2px; border: 0; border-radius: 9px;
    background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer; transition: background .15s, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.tkc-nav:hover { background: rgba(255, 255, 255, .22); transform: scale(1.08); }
.tkc-cal-tear { height: 0; margin: 0 14px; border-top: 2px dashed #dcdce0; }
.tkc-cal-week { display: grid; grid-template-columns: repeat(7, 1fr); padding: .7rem .6rem .2rem; }
.tkc-cal-week span { color: var(--tk-muted, #71717a); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.tkc-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: .2rem .6rem .5rem; }
.tkc-day {
    position: relative; display: grid; place-items: center; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent;
    color: var(--tk-ink, #18181b); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: background .12s, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.tkc-day.is-blank { pointer-events: none; }
.tkc-day:hover:not(:disabled) { background: #f0f0f2; transform: scale(1.08); }
.tkc-day:focus-visible { outline: 2px solid var(--tk-ink, #18181b); outline-offset: -2px; }
.tkc-day.is-today { box-shadow: inset 0 0 0 1.5px var(--tk-ink, #18181b); }
.tkc-day.is-on, .tkc-day.is-on:hover { background: var(--tk-ink, #18181b); color: #fff; box-shadow: none; }
.tkc-day.is-off { opacity: .28; cursor: not-allowed; text-decoration: line-through; }
.tkc-cal-foot { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem .7rem; border-top: 1.5px dashed #ececef; }
.tkc-link { padding: .35rem .6rem; border: 0; border-radius: 8px; background: transparent; color: var(--tk-ink, #18181b); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.tkc-link:hover { background: #f4f4f5; }
.tkc-cal-foot .tkc-link:last-of-type:not(:first-child) { margin-left: auto; color: var(--tk-muted, #71717a); }

/* time */
.tkc-time { width: 250px; }
.tkc-time-head { justify-content: center; }
.tkc-time-head .tkc-cal-title b { font-size: 1.5rem; letter-spacing: .06em; }
.tkc-cols { display: grid; grid-template-columns: 1fr 1fr .85fr; gap: .4rem; padding: .5rem .6rem .3rem; }
.tkc-col-h { padding: .1rem 0 .35rem; color: var(--tk-muted, #71717a); font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.tkc-col-list { display: flex; flex-direction: column; gap: 2px; height: 190px; overflow-y: auto; padding-right: 2px; overscroll-behavior: contain; scrollbar-width: none; }
.tkc-col-list::-webkit-scrollbar { display: none; }
.tkc-ampm .tkc-col-list { height: auto; }
.tkc-tv { flex: none; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--tk-ink, #18181b); font: inherit; font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .12s; }
.tkc-tv:hover { background: #f0f0f2; }
.tkc-tv.is-on { background: var(--tk-ink, #18181b); color: #fff; }
.tkc-done {
    --n: 5px; margin-left: auto; height: 34px; padding: 0 1.1rem; border: 0; border-radius: 9px; background: var(--tk-ink, #18181b); color: #fff; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
    -webkit-mask: radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.tkc-time .tkc-cal-foot .tkc-link:last-of-type:not(:first-child) { margin-left: 0; }

/* ---------- dialogs (alert / confirm) ---------- */
body.tkc-lock { overflow: hidden; }
.tkc-modal-back {
    position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 1rem;
    background: rgba(24, 24, 27, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .2s ease; font-family: inherit;
}
.tkc-modal-back.is-in { opacity: 1; }
.tkc-modal {
    width: min(92vw, 390px); transform: translateY(14px) scale(.96); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
    filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .35));
}
.tkc-modal-back.is-in .tkc-modal { transform: none; }
.tkc-modal-in {
    --act: 84px; overflow: hidden; border-radius: 22px; background: #fff; color: var(--tk-ink, #18181b);
    -webkit-mask: radial-gradient(circle 12px at 0 calc(100% - var(--act)), #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% calc(100% - var(--act)), #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle 12px at 0 calc(100% - var(--act)), #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% calc(100% - var(--act)), #0000 98%, #000) right / 51% 100% no-repeat;
}
.tkc-modal-band { padding: .8rem 1rem; background: var(--tk-ink, #18181b); color: rgba(255, 255, 255, .85); font-size: .66rem; font-weight: 800; letter-spacing: .22em; text-align: center; text-transform: uppercase; }
.tkc-modal-body { padding: 1.5rem 1.6rem 1.4rem; text-align: center; }
.tkc-modal-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto .9rem; border: 2px dashed #d4d4d8; border-radius: 18px; background: #f4f4f5; color: var(--tk-ink, #18181b); transform: rotate(-6deg); }
.tkc-modal-icon.is-danger { border-color: #f0b4b4; background: #fff6f6; color: #b91c1c; }
.tkc-modal-body h3 { margin: 0 0 .4rem; color: var(--tk-ink, #18181b); font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.tkc-modal-body p { margin: 0; color: var(--tk-muted, #71717a); font-size: .92rem; line-height: 1.6; overflow-wrap: anywhere; }
.tkc-modal-tear { height: 0; margin: 0 16px; border-top: 2px dashed #dcdce0; }
.tkc-modal-actions { display: flex; align-items: center; justify-content: center; gap: .6rem; height: var(--act, 84px); padding: 0 1.2rem; }
.tkc-mbtn {
    --n: 5px; flex: 1; max-width: 190px; height: 44px; padding: 0 1rem; border: 0; border-radius: 10px; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
    -webkit-mask: radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    outline: 1px dashed color-mix(in srgb, currentColor 42%, transparent); outline-offset: -4px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.tkc-mbtn:hover { transform: translateY(-2px); }
.tkc-mbtn:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.tkc-mbtn-main { background: var(--tk-ink, #18181b); color: #fff; }
.tkc-mbtn-main.is-danger { background: #b91c1c; }
.tkc-mbtn-ghost { background: #fff; color: var(--tk-ink, #18181b); box-shadow: inset 0 0 0 1.5px #e4e4e7; }

@media (prefers-reduced-motion: reduce) {
    .tkc-pop, .tkc-modal, .tkc-modal-back, .tkc-chev, .tkc-err { transition: none; animation: none; }
}

.tkc-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: .9rem .8rem .7rem; min-height: 224px; align-content: start; }
.tkc-pick { height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--tk-ink, #18181b); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; transition: background .12s, transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.tkc-pick:hover { background: #f0f0f2; transform: scale(1.05); }
.tkc-pick.is-on { background: var(--tk-ink, #18181b); color: #fff; }

/* ---------- toasts: a small ticket with an ink stub ---------- */
.tkc-toast {
    --n: 9px;
    position: fixed; z-index: 100002; left: 50%; bottom: 22px; display: flex; align-items: stretch; max-width: min(92vw, 420px); min-width: 250px;
    border-radius: 14px; background: #fff; color: var(--tk-ink, #18181b); font-family: inherit; font-size: .9rem; font-weight: 600; line-height: 1.4;
    transform: translate(-50%, 24px) scale(.96); opacity: 0; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease;
    filter: drop-shadow(0 14px 18px rgba(24, 24, 27, .28)) drop-shadow(0 2px 3px rgba(24, 24, 27, .14));
    -webkit-mask: radial-gradient(circle var(--n) at 54px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--n) at 54px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
    mask: radial-gradient(circle var(--n) at 54px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--n) at 54px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.tkc-toast.is-in { transform: translate(-50%, 0) scale(1); opacity: 1; }
.tkc-toast-stub { position: relative; display: grid; place-items: center; flex: none; width: 54px; border-radius: 14px 0 0 14px; background: var(--tk-ink, #18181b); color: #fff; font-size: 1rem; }
.tkc-toast-stub::after { content: ""; position: absolute; top: 12px; bottom: 12px; right: 0; border-right: 2px dashed rgba(255, 255, 255, .45); }
.tkc-toast.is-error .tkc-toast-stub { background: #b91c1c; }
.tkc-toast-text { flex: 1; min-width: 0; padding: .8rem .9rem; overflow-wrap: anywhere; }
.tkc-toast-text a { color: var(--tk-ink, #18181b); font-weight: 800; box-shadow: inset 0 -2px 0 #d4d4d8; text-decoration: none; }
.tkc-toast-x { flex: none; align-self: center; width: 30px; height: 30px; margin-right: .35rem; border: 0; border-radius: 50%; background: transparent; color: #a1a1aa; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.tkc-toast-x:hover { background: #f4f4f5; color: var(--tk-ink, #18181b); }
@media (min-width: 900px) { .tkc-toast { left: auto; right: 24px; bottom: auto; top: 84px; transform: translate(0, -16px) scale(.96); } .tkc-toast.is-in { transform: none; } }
a.tkc-mbtn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* cart page toasts (their own markup) get the same ticket look */
body.tk-ui .cart-toast { border-radius: 14px !important; background: #fff !important; color: var(--tk-ink, #18181b) !important; box-shadow: 0 14px 30px -12px rgba(24, 24, 27, .45) !important; border: 1.5px dashed var(--tk-line, #d4d4d8) !important; }
body.tk-ui .cart-toast__icon { background: var(--tk-ink, #18181b) !important; color: #fff !important; border-radius: 10px !important; }
body.tk-ui .cart-toast .cart-toast__text { color: var(--tk-ink, #18181b) !important; font-weight: 600; }

/* quantity stepper inside the remove-tickets popup */
.tkc-modal-in.is-qty { --act: 92px; }
.tkc-qty { margin: 1.1rem 0 .2rem; padding: 1rem 1rem .9rem; border: 2px dashed var(--tk-line, #d4d4d8); border-radius: 16px; background: var(--tk-page, #f1f1f4); }
.tkc-qty-label { display: block; margin-bottom: .6rem; color: var(--tk-muted, #71717a); font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.tkc-qty-row { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.tkc-qty-btn { --n: 5px; width: 42px; height: 42px; border: 0; border-radius: 11px; background: var(--tk-ink, #18181b); color: #fff; font: inherit; font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer;
    -webkit-mask: radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    outline: 1px dashed rgba(255, 255, 255, .45); outline-offset: -4px; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.tkc-qty-btn:hover { transform: translateY(-2px); }
.tkc-qty-row input { width: 76px; height: 42px; border: 1.5px solid var(--tk-ring, #e4e4e7); border-radius: 11px; background: #fff; color: var(--tk-ink, #18181b); font: inherit; font-size: 1.05rem; font-weight: 800; text-align: center; -moz-appearance: textfield; }
.tkc-qty-row input::-webkit-outer-spin-button, .tkc-qty-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tkc-qty-row input:focus { border-color: var(--tk-ink, #18181b); outline: 0; box-shadow: 0 0 0 3px rgba(24, 24, 27, .08); }
.tkc-qty-all { margin-top: .7rem; padding: .3rem .8rem; border: 1.5px dashed #f0b4b4; border-radius: 999px; background: #fff; color: #b91c1c; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.tkc-qty-all:hover { background: #fff6f6; }
#customConfirmModal .tkc-modal-body { max-height: 62vh; overflow-y: auto; }
