/*
 * Orbis EBM Laborziffern - Stylesheet
 * Version: 0.1.1
 * Datum: 2026-07-28
 *
 * Changelog:
 * - 0.1.1 (2026-07-28): Darstellung fuer optionale Gruppentexte ergaenzt.
 * - 0.1.0 (2026-07-28): Erstes responsives Layout fuer gruppierte Buttons,
 *   aktive Buttonzustaende, Eingabezeile und Kopierbutton.
 *
 * Beschreibung:
 * Dieses Stylesheet definiert die visuelle Darstellung der Laborziffern-
 * Anwendung. Die Oberflaeche ist fuer schnelle wiederholte Nutzung optimiert:
 * gut erkennbare Gruppen, grosse Klickflaechen und klare aktive Zustaende.
 */

:root {
    --page-bg: #f4f7f6;
    --surface: #ffffff;
    --surface-strong: #e9f1ef;
    --text: #17211f;
    --muted: #60706c;
    --border: #cbd8d5;
    --primary: #0b6b5f;
    --primary-dark: #074f46;
    --active-bg: #d7f2ec;
    --active-border: #0b6b5f;
    --shadow: 0 12px 30px rgba(31, 49, 45, 0.12);
    --radius: 8px;
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--page-bg);
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.app-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 2rem;
    line-height: 1.15;
}

h2 {
    font-size: 1rem;
    line-height: 1.3;
}

.group-description {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.version {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.button-area {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.code-group {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.code-button,
.copy-button {
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.code-button {
    display: grid;
    gap: 3px;
    place-items: center;
    padding: 10px;
    color: var(--text);
    background: var(--surface-strong);
}

.code-button:hover,
.copy-button:hover {
    transform: translateY(-1px);
}

.code-button.is-active {
    color: var(--primary-dark);
    background: var(--active-bg);
    border-color: var(--active-border);
}

.button-label {
    font-size: 1rem;
}

.button-codes {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
}

.input-row {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 0 4px;
    background: var(--page-bg);
}

.copy-button {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.copy-button:active,
.code-button:active {
    transform: translateY(0);
}

.code-input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    font-size: 1.05rem;
}

.code-input:focus {
    outline: 3px solid rgba(11, 107, 95, 0.18);
    border-color: var(--primary);
}

.status-line {
    min-height: 22px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .app-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .app-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .input-row {
        grid-template-columns: 1fr;
    }
}
