/**
 * WCWT Kiosk styles -- shared-device clock in/out.
 * Inherits the selected theme via --wcwt-* tokens (emitted on #wcwt-kiosk).
 *
 * @package WCWT_Workforce_Timeclock
 * @version 1.2.15
 */

/* Standalone full-screen mode */
body.wcwt-kiosk-standalone {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--wcwt-bg, #eef2f6);
}

#wcwt-kiosk,
.wcwt-kiosk {
    --k-radius: 18px;
    position: relative;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--wcwt-bg, #eef2f6);
    color: var(--wcwt-text, #1a2c42);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.wcwt-kiosk *,
.wcwt-kiosk *::before,
.wcwt-kiosk *::after { box-sizing: border-box; }

/* ---- Header ---- */
.wcwt-kiosk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px;
    border-bottom: 1px solid var(--wcwt-border-faint, rgba(0,0,0,.08));
}
.wcwt-kiosk-brand { display: flex; align-items: center; gap: 14px; }
.wcwt-kiosk-logo { height: 44px; width: auto; object-fit: contain; }
.wcwt-kiosk-logo-mark { font-size: 32px; color: var(--wcwt-logo-color, var(--wcwt-accent, #1a4d7a)); line-height: 1; }
.wcwt-kiosk-title {
    font-size: 20px; font-weight: 600; letter-spacing: 1px;
    color: var(--wcwt-logo-color, var(--wcwt-accent, #1a4d7a));
}
.wcwt-kiosk-clock {
    font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
    color: var(--wcwt-text, #1a2c42);
}

/* ---- Stage container ---- */
.wcwt-kiosk-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}
.wcwt-kiosk-stage[hidden] { display: none; }

.wcwt-kiosk-h2 {
    font-size: 30px; font-weight: 600; margin: 0 0 6px;
    color: var(--wcwt-text, #1a2c42);
}
.wcwt-kiosk-subtle { font-size: 18px; color: var(--wcwt-text-muted, #6B7280); margin: 0 0 22px; }

/* ---- IDLE ---- */
.wcwt-kiosk-date { font-size: 22px; color: var(--wcwt-text-muted, #6B7280); margin-bottom: 10px; }
.wcwt-kiosk-prompt {
    font-size: 40px; font-weight: 700; margin: 0 0 36px;
    color: var(--wcwt-text, #1a2c42);
}
.wcwt-kiosk-bigbtn {
    font-family: inherit;
    font-size: 30px; font-weight: 700; letter-spacing: 1px;
    color: #fff;
    background: var(--wcwt-accent, #1a4d7a);
    border: none;
    border-radius: var(--k-radius);
    padding: 34px 64px;
    cursor: pointer;
    box-shadow: var(--wcwt-shadow, 0 6px 28px rgba(0,0,0,.12));
    transition: transform .08s ease, filter .15s ease;
}
.wcwt-kiosk-bigbtn:active { transform: scale(.97); filter: brightness(.94); }

/* ---- SEARCH ---- */
.wcwt-kiosk-searchbox {
    font-family: inherit;
    width: min(560px, 90vw);
    font-size: 26px;
    padding: 18px 22px;
    border: 2px solid var(--wcwt-ctrl-border, rgba(0,0,0,.18));
    border-radius: 14px;
    background: var(--wcwt-card-bg, #fff);
    color: var(--wcwt-text, #1a2c42);
    outline: none;
}
.wcwt-kiosk-searchbox:focus { border-color: var(--wcwt-accent, #1a4d7a); }
.wcwt-kiosk-results {
    width: min(560px, 90vw);
    margin-top: 18px;
    display: flex; flex-direction: column; gap: 10px;
    max-height: 46vh; overflow-y: auto;
}
.wcwt-kiosk-result {
    font-family: inherit;
    font-size: 22px; font-weight: 500; text-align: left;
    padding: 18px 22px;
    border: 1px solid var(--wcwt-border-faint, rgba(0,0,0,.1));
    border-radius: 12px;
    background: var(--wcwt-card-bg, #fff);
    color: var(--wcwt-text, #1a2c42);
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}
.wcwt-kiosk-result:active { background: var(--wcwt-ctrl-bg, rgba(0,0,0,.05)); border-color: var(--wcwt-accent, #1a4d7a); }
.wcwt-kiosk-noresult { font-size: 18px; color: var(--wcwt-text-muted, #6B7280); padding: 20px; }

/* ---- PIN ---- */
.wcwt-kiosk-pindots { display: flex; gap: 14px; margin: 10px 0 6px; }
.wcwt-pindot {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--wcwt-accent, #1a4d7a);
    background: transparent;
    transition: background .1s ease, transform .1s ease;
}
.wcwt-pindot.is-filled { background: var(--wcwt-accent, #1a4d7a); transform: scale(1.05); }
.wcwt-kiosk-msg { min-height: 26px; font-size: 17px; color: var(--wcwt-status-break, #b9770b); margin: 8px 0 14px; }

.wcwt-kiosk-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    width: min(380px, 86vw);
}
.wcwt-kiosk-keypad.is-busy { pointer-events: none; opacity: .55; }
.wcwt-key {
    font-family: inherit;
    font-size: 30px; font-weight: 600;
    padding: 22px 0;
    border: 1px solid var(--wcwt-ctrl-border, rgba(0,0,0,.18));
    border-radius: 14px;
    background: var(--wcwt-card-bg, #fff);
    color: var(--wcwt-text, #1a2c42);
    cursor: pointer;
    transition: transform .06s ease, background .12s ease;
}
.wcwt-key:active { transform: scale(.95); background: var(--wcwt-ctrl-bg, rgba(0,0,0,.06)); }
.wcwt-key-fn { font-size: 18px; font-weight: 600; color: var(--wcwt-accent, #1a4d7a); }

.wcwt-shake { animation: wcwt-shake .45s; }
@keyframes wcwt-shake {
    0%,100% { transform: translateX(0); }
    20%,60% { transform: translateX(-8px); }
    40%,80% { transform: translateX(8px); }
}

/* ---- Back link ---- */
.wcwt-kiosk-back {
    margin-top: 26px;
    font-family: inherit;
    font-size: 18px;
    background: none; border: none;
    color: var(--wcwt-text-muted, #6B7280);
    cursor: pointer;
    padding: 8px 14px;
}
.wcwt-kiosk-back:active { color: var(--wcwt-accent, #1a4d7a); }

/* ---- CONFIRM ---- */
.wcwt-kiosk-confirm-icon {
    font-size: 80px; line-height: 1;
    color: var(--wcwt-status-on, #22C55E);
    margin-bottom: 12px;
}
#wcwt-kiosk[data-confirm="out"] .wcwt-kiosk-confirm-icon { color: var(--wcwt-accent, #1a4d7a); }
.wcwt-kiosk-confirm-msg { font-size: 38px; font-weight: 700; margin: 0 0 8px; color: var(--wcwt-text, #1a2c42); }
.wcwt-kiosk-confirm-sub { font-size: 22px; color: var(--wcwt-text-muted, #6B7280); margin: 0 0 28px; }
.wcwt-kiosk-countdown { font-size: 16px; color: var(--wcwt-text-muted, #6B7280); }

/* ---- Dim overlay ---- */
.wcwt-kiosk-dim {
    position: absolute; inset: 0; z-index: 50;
    background: rgba(8, 12, 18, 0.92);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .6s ease;
}
.wcwt-kiosk-dim.is-on { opacity: 1; pointer-events: auto; }
.wcwt-kiosk-dim-inner { text-align: center; color: #e8edf3; }
.wcwt-kiosk-dim-clock { font-size: 64px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wcwt-kiosk-dim-hint { font-size: 20px; color: #9fb0c2; margin-top: 12px; }

/* ---- Small screens ---- */
@media (max-width: 480px) {
    .wcwt-kiosk-prompt { font-size: 30px; }
    .wcwt-kiosk-bigbtn { font-size: 24px; padding: 26px 40px; }
    .wcwt-kiosk-clock { font-size: 18px; }
    .wcwt-key { font-size: 26px; padding: 18px 0; }
}

/* =====================================================================
 * v1.2.16 additions -- identification modes, prominent clock, roster
 * paging, ID entry, name confirm, and cooldown. All theme-token driven.
 * ===================================================================== */

/* ---- Header clock (renamed class; id unchanged) ---- */
.wcwt-kiosk-headclock {
    font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
    color: var(--wcwt-text, #1a2c42);
}

/* ---- Prominent idle clock (digital + analog) ---- */
.wcwt-bigclock {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

/* Show only the style the admin selected (body class on #wcwt-kiosk). */
.wcwt-clock-digital .wcwt-bigclock-analog { display: none; }
.wcwt-clock-analog  .wcwt-bigclock-digital { display: none; }

/* Digital */
.wcwt-bigclock-digital {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.wcwt-bigclock-time {
    font-size: 96px; font-weight: 700;
    color: var(--wcwt-text, #1a2c42);
    letter-spacing: 1px;
}
.wcwt-bigclock-secs {
    font-size: 40px; font-weight: 600;
    color: var(--wcwt-accent, #1a4d7a);
}
.wcwt-bigclock-ampm {
    font-size: 32px; font-weight: 600;
    color: var(--wcwt-text-muted, #6B7280);
    letter-spacing: 1px;
}

/* Analog */
.wcwt-bigclock-analog { width: 220px; height: 220px; }
.wcwt-analog-svg { width: 100%; height: 100%; display: block; }
.wcwt-analog-face {
    fill: var(--wcwt-card-bg, #fff);
    stroke: var(--wcwt-ctrl-border, rgba(0,0,0,.18));
    stroke-width: 3;
}
.wcwt-analog-tick {
    stroke: var(--wcwt-text-muted, #6B7280);
    stroke-width: 2;
    stroke-linecap: round;
}
.wcwt-analog-hand {
    stroke: var(--wcwt-text, #1a2c42);
    stroke-linecap: round;
    transform-origin: 100px 100px;
}
.wcwt-analog-hour   { stroke-width: 6; }
.wcwt-analog-minute { stroke-width: 4; }
.wcwt-analog-second { stroke-width: 2; stroke: var(--wcwt-accent, #1a4d7a); }
.wcwt-analog-pin { fill: var(--wcwt-accent, #1a4d7a); }

/* ---- Mode picker (idle, when >1 mode enabled) ---- */
.wcwt-kiosk-modebtns {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    width: min(720px, 92vw);
}
.wcwt-kiosk-modebtn {
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 200px;
    padding: 30px 20px;
    border: 1px solid var(--wcwt-ctrl-border, rgba(0,0,0,.18));
    border-radius: var(--k-radius);
    background: var(--wcwt-card-bg, #fff);
    color: var(--wcwt-text, #1a2c42);
    cursor: pointer;
    box-shadow: var(--wcwt-shadow, 0 6px 28px rgba(0,0,0,.12));
    transition: transform .08s ease, border-color .12s ease, background .12s ease;
}
.wcwt-kiosk-modebtn[hidden] { display: none; }
.wcwt-kiosk-modebtn:active {
    transform: scale(.97);
    border-color: var(--wcwt-accent, #1a4d7a);
    background: var(--wcwt-ctrl-bg, rgba(0,0,0,.04));
}
.wcwt-modebtn-icon { font-size: 44px; line-height: 1; }
.wcwt-modebtn-label { font-size: 20px; font-weight: 600; }

.wcwt-kiosk-single[hidden],
.wcwt-kiosk-modepick[hidden] { display: none; }

/* ---- Roster (paged list) ---- */
.wcwt-roster-results { margin-bottom: 6px; }
.wcwt-kiosk-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 16px;
}
.wcwt-kiosk-pager[hidden] { display: none; }
.wcwt-kiosk-pagebtn {
    font-family: inherit;
    font-size: 18px; font-weight: 600;
    padding: 12px 22px;
    border: 1px solid var(--wcwt-ctrl-border, rgba(0,0,0,.18));
    border-radius: 12px;
    background: var(--wcwt-card-bg, #fff);
    color: var(--wcwt-accent, #1a4d7a);
    cursor: pointer;
    transition: transform .06s ease, opacity .12s ease;
}
.wcwt-kiosk-pagebtn:active { transform: scale(.96); }
.wcwt-kiosk-pagebtn:disabled { opacity: .4; cursor: default; }
.wcwt-kiosk-pageinfo {
    font-size: 18px; font-variant-numeric: tabular-nums;
    color: var(--wcwt-text-muted, #6B7280);
    min-width: 120px;
}

/* ---- ID entry ---- */
.wcwt-kiosk-iddisplay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    margin: 4px 0 10px;
}
.wcwt-id-digit {
    font-size: 40px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 34px;
    padding: 4px 8px;
    border-bottom: 3px solid var(--wcwt-accent, #1a4d7a);
    color: var(--wcwt-text, #1a2c42);
}
.wcwt-id-placeholder {
    font-size: 36px; letter-spacing: 8px;
    color: var(--wcwt-text-muted, #6B7280);
}
.wcwt-key-go {
    font-size: 30px; font-weight: 700;
    color: #fff;
    background: var(--wcwt-accent, #1a4d7a);
    border-color: var(--wcwt-accent, #1a4d7a);
}
.wcwt-key-go:active { filter: brightness(.94); }

/* ---- Name confirm ---- */
.wcwt-kiosk-namecheck-name {
    font-size: 44px; font-weight: 700;
    color: var(--wcwt-text, #1a2c42);
    margin: 6px 0 26px;
}
.wcwt-kiosk-namecheck-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.wcwt-confirm-yes { background: var(--wcwt-status-on, #22C55E); }

/* ---- Cooldown ---- */
.wcwt-kiosk-cooldown-icon {
    font-size: 72px; line-height: 1;
    color: var(--wcwt-status-break, #b9770b);
    margin-bottom: 12px;
}
#wcwt-cooldown-countdown {
    font-size: 28px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--wcwt-accent, #1a4d7a);
    margin-top: 14px;
}

/* ---- Small screens (v1.2.16 elements) ---- */
@media (max-width: 480px) {
    .wcwt-bigclock-time { font-size: 60px; }
    .wcwt-bigclock-secs { font-size: 26px; }
    .wcwt-bigclock-ampm { font-size: 22px; }
    .wcwt-bigclock-analog { width: 160px; height: 160px; }
    .wcwt-kiosk-modebtn { width: 150px; padding: 22px 14px; }
    .wcwt-modebtn-icon { font-size: 34px; }
    .wcwt-kiosk-namecheck-name { font-size: 32px; }
    .wcwt-id-digit { font-size: 30px; min-width: 26px; }
}

/* --- Kiosk post-punch messages block --- */
.wcwt-kiosk-messages{ margin-top:22px; width:100%; max-width:520px; text-align:left; }
.wcwt-kiosk-messages .wcwt-kmsg-head{ font-size:13px; letter-spacing:.08em; text-transform:uppercase; opacity:.6; margin-bottom:10px; }
.wcwt-kiosk-messages .wcwt-kmsg{ display:flex; align-items:flex-start; gap:12px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:12px; padding:13px 15px; margin-bottom:9px; }
.wcwt-kiosk-messages .wcwt-kmsg-body{ flex:1; display:flex; flex-direction:column; gap:3px; }
.wcwt-kiosk-messages .wcwt-kmsg-body strong{ font-size:15px; font-weight:600; }
.wcwt-kiosk-messages .wcwt-kmsg-body span{ font-size:13.5px; opacity:.8; line-height:1.4; }
.wcwt-kiosk-messages .wcwt-kmsg-dismiss{ flex-shrink:0; width:34px; height:34px; border-radius:50%; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); color:#fff; font-size:16px; cursor:pointer; line-height:1; }
.wcwt-kiosk-messages .wcwt-kmsg-dismiss:hover{ background:rgba(255,255,255,.18); }
