/* ============================================================
   TC St. Ulrich Schankapp — Basis-Styles & CSS-Variablen
   ============================================================ */

:root {
    --color-primary:     #003DA6;
    --color-primary-dk:  #002d7a;
    --color-primary-lt:  #e8eef9;
    --color-accent:      #ffffff;
    --color-bg:          #f0f2f5;
    --color-surface:     #ffffff;
    --color-text:        #1a1a2e;
    --color-text-muted:  #666680;
    --color-success:     #1a7a2e;
    --color-success-bg:  #e8f5eb;
    --color-danger:      #c0392b;
    --color-danger-bg:   #fdecea;
    --color-warning:     #d68910;
    --color-warning-bg:  #fef9e7;
    --color-border:      #d0d5e0;

    --radius-sm:  8px;
    --radius:     14px;
    --radius-lg:  20px;

    --shadow-sm:  0 1px 4px rgba(0,0,0,.10);
    --shadow:     0 3px 12px rgba(0,0,0,.12);
    --shadow-lg:  0 8px 28px rgba(0,0,0,.16);

    --touch-min:  64px;
    --font:       -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: var(--font);
    font-size: 16px;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    border-radius: var(--radius);
    transition: background .15s, transform .1s, opacity .15s;
    -webkit-appearance: none;
}

button:active {
    transform: scale(.96);
}

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: .6rem 1rem;
    outline: none;
    transition: border-color .2s;
    background: var(--color-surface);
    color: var(--color-text);
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-primary);
}

/* Utility */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

.text-center  { text-align: center; }
.text-muted   { color: var(--color-text-muted); font-size: .9em; }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }

.badge {
    display: inline-block;
    padding: .2em .7em;
    border-radius: 99px;
    font-size: .8em;
    font-weight: 600;
    background: var(--color-primary-lt);
    color: var(--color-primary);
}

.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge-warn    { background: var(--color-warning-bg); color: var(--color-warning); }

/* Toast-Meldungen */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-text);
    color: #fff;
    padding: .9rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
    white-space: nowrap;
    max-width: 90vw;
}

#toast.show {
    transform: translateX(-50%) translateY(0);
}

#toast.success { background: var(--color-success); }
#toast.error   { background: var(--color-danger); }

/* ============================================================
   Benutzer-Anleitung — Guide Overlay (Kiosk + Admin)
   ============================================================ */
.guide-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.55);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.guide-overlay.active { display: flex; }

.guide-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: min(560px, 96vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: guideIn .25s ease;
}
@keyframes guideIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.guide-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}
.guide-body {
    overflow-y: auto;
    flex: 1;
    font-size: .95rem;
    line-height: 1.6;
    color: var(--color-text);
}
.guide-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem 0 .35rem;
    color: var(--color-primary);
}
.guide-body h3:first-child { margin-top: 0; }
.guide-body ol, .guide-body ul {
    padding-left: 1.4rem;
    margin: 0 0 .5rem;
}
.guide-body li { margin-bottom: .25rem; }
.guide-footer {
    flex-shrink: 0;
    margin-top: 1.5rem;
    text-align: right;
}
