/* ============================================
   Skytternes Hus - Kiosk Touch UI
   ============================================ */

:root {
    /* Semantic colors */
    --color-success: #4caf50;
    --color-success-hover: #43a047;
    --color-success-light: #e8f5e9;
    --color-success-bg: #f0fff0;
    --color-danger: #cc5555;
    --color-danger-strong: #d32f2f;
    --color-danger-light: #fff0f0;
    --color-primary: #2a6bb5;
    --color-primary-light: #3a8fd4;
    --color-warning: #ffa500;
    --color-warning-bg: #fff3cd;

    /* Text */
    --color-text: #333;
    --color-text-muted: #666;
    --color-text-light: #888;
    --color-text-placeholder: #999;

    /* Borders & backgrounds */
    --color-border: #ccc;
    --color-border-light: #ddd;
    --color-bg: #f0f0f0;
    --color-bg-light: #f5f5f5;
    --color-bg-white: #fff;

    /* Scrollbar */
    --scrollbar-width: 14px;
    --scrollbar-track: #e0e0e0;
    --scrollbar-thumb: #999;
    --scrollbar-thumb-active: #777;
    --scrollbar-radius: 7px;
}

/* Blazor reconnect modal */
.reconnect-modal {
    display: none;
}

.reconnect-modal.components-reconnect-show,
.reconnect-modal.components-reconnect-failed,
.reconnect-modal.components-reconnect-rejected {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.reconnect-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 40px;
    text-align: center;
    font-size: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.reconnect-box p {
    margin: 8px 0;
}

.reconnect-box a {
    color: var(--color-success);
    font-weight: bold;
    text-decoration: none;
}

.reconnect-show { display: none; }
.reconnect-failed { display: none; }
.reconnect-rejected { display: none; }

.reconnect-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: var(--color-success);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.components-reconnect-show .reconnect-show { display: block; }
.components-reconnect-failed .reconnect-failed { display: block; }
.components-reconnect-rejected .reconnect-rejected { display: block; }

.config-warning {
    background: #fff3cd;
    border: 2px solid #f0ad4e;
    color: #7a4f00;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 12px;
}

* {
    box-sizing: border-box;
}

.kiosk-container * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f0f0;
    color: #333;
}

/* ---- Layout ---- */
.kiosk-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ---- Fælles knapper ---- */
.btn-round {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: none;
    font-size: 44px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
    touch-action: manipulation;
}

.btn-round:active {
    opacity: 0.7;
}

.btn-large {
    width: 180px;
    height: 180px;
    font-size: 48px;
}

.btn-rect.btn-large,
.btn-rect-lg.btn-large {
    width: auto;
    height: auto;
}

.btn-green {
    background: linear-gradient(145deg, #7edf7e, #4caf50);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-grey {
    background: linear-gradient(145deg, #d5d5d5, #bbb);
    color: #888;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: default;
}

.btn-red {
    background: linear-gradient(145deg, #f08080, #cc5555);
    color: #fff;
}

.btn-blue {
    background: linear-gradient(145deg, #6aafe6, #2a6bb5);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-small {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-rect {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-rect-md {
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-rect-lg {
    padding: 20px 36px;
    border-radius: 14px;
    border: none;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-action {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
    margin: 5px;
}

.btn-print {
    background: linear-gradient(145deg, #6bb3f0, #3a8fd4);
    color: #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.btn-print:active {
    opacity: 0.7;
}

.btn-delete {
    background: linear-gradient(145deg, #f08080, #cc5555) !important;
}

/* ============================================
   Startskærm (Home)
   ============================================ */
.home-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 20px;
}

.home-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    height: auto;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.home-title {
    font-size: 36px;
    margin: 10px 0 15px;
    text-align: center;
}

.input-display {
    width: 320px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    border-radius: 8px;
    margin-bottom: 10px;
    letter-spacing: 4px;
    position: relative;
    cursor: text;
}

.home-input-hidden {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 36px;
    caret-color: transparent;
}

.input-nomatch {
    background: #f8b4b4;
    border: 2px solid #e88;
}

.input-match {
    background: #b4f8b4;
    border: 2px solid #6c6;
}

.match-name {
    font-size: 24px;
    color: #2a7a2a;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Numpad */
.numpad {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.numpad-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.numpad-btn {
    width: 160px;
    height: 160px;
    font-size: 72px;
    font-weight: bold;
    border: 2px solid #999;
    border-radius: 14px;
    background: linear-gradient(145deg, #e8e8e8, #c8c8c8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    color: #333;
}

.numpad-btn:active {
    background: linear-gradient(145deg, #c8c8c8, #aaa);
}

.numpad-empty {
    visibility: hidden;
}

.numpad-delete {
    font-size: 60px;
    background: linear-gradient(145deg, #ddd, #bbb);
}

/* Footer */
.home-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    width: 100%;
}

.footer-center {
    flex: 1;
    text-align: center;
}

.footer-label {
    font-size: 20px;
    font-weight: bold;
    color: #555;
}

/* ============================================
   Tom-liste-besked (bruges af medlemsskærmen)
   ============================================ */
.empty-message {
    font-size: 24px;
    color: #888;
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* ============================================
   Medlemsskærm (Member)
   ============================================ */
.member-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

.member-screen h1 {
    text-align: center;
    font-size: 32px;
    margin: 10px 0 10px;
}

.member-content {
    flex: 1;
    display: flex;
    gap: 20px;
    overflow: hidden;
}

.registration-history {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.registration-history h2 {
    font-size: 22px;
    margin: 0 0 10px;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    border: 2px solid #ccc;
    border-radius: 10px;
    max-width: 75%;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f5f5f5;
    padding: 8px;
}

.history-item {
    display: flex;
    padding: 10px 15px;
    margin-bottom: 4px;
    border-radius: 5px;
    font-size: 20px;
    background: #fff;
    border: 1px solid #ddd;
}

.history-type {
    width: 30%;
    flex: 0 0 30%;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.history-date {
    width: 130px;
    flex: 0 0 130px;
    font-weight: bold;
    color: #333;
    padding-right: 12px;
}

.history-header {
    background: #ebebeb !important;
    border-bottom: 2px solid #ddd !important;
    font-size: 13px;
    color: #666;
}

.history-location {
    width: 15%;
    flex: 0 0 15%;
    color: #666;
}

.history-desc {
    flex: 1;
    color: #333;
}

.history-by {
    width: 180px;
    flex: 0 0 180px;
    color: #666;
    font-size: 0.9em;
}

.history-ind {
    width: 27%;
    flex: 0 0 27%;
    white-space: nowrap;
    color: #2a7a2a;
    font-weight: bold;
    text-align: left;
    padding-right: 12px;
}

.history-ud {
    width: 27%;
    flex: 0 0 27%;
    white-space: nowrap;
    color: #aa3333;
    font-weight: bold;
    text-align: left;
}

.period-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-period {
    padding: 12px 24px;
    border-radius: 10px;
    border: 2px solid #aaa;
    font-size: 18px;
    background: #f0f0f0;
    font-size: 18px;
    cursor: pointer;
}

.btn-period.btn-period-active,
.btn-print.btn-period-active {
    background: #2a6bb5;
    color: #fff;
    border-color: #2a6bb5;
}

.print-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.print-section h2 {
    font-size: 22px;
    margin: 0 0 15px;
}

.print-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.print-buttons .btn-print {
    width: 100%;
    font-size: 22px;
    padding: 20px;
}

/* Member footer */
.member-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    gap: 15px;
}

/* Status besked */
.status-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    z-index: 100;
    animation: fadeOut 3s forwards;
}

.status-success {
    background: rgba(76, 175, 80, 0.95);
    color: #fff;
}

.status-error {
    background: rgba(220, 80, 80, 0.95);
    color: #fff;
}

@keyframes fadeOut {
    0%   { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

.status-warning {
    background: rgba(255, 152, 0, 0.95);
    color: #fff;
    animation: fadeOut 5s forwards;
}

/* ============================================
   Print-dialog
   ============================================ */
.print-dialog-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.print-dialog {
    background: #fff;
    border-radius: 14px;
    padding: 48px 40px;
    max-width: 640px;
    width: 90%;
    text-align: center;
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.35);
}

.print-dialog h2 {
    font-size: 28px;
    margin: 0 0 8px;
}

.print-dialog p {
    font-size: 20px;
    color: #666;
    margin: 0 0 36px;
}

.print-dialog-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.print-dialog-buttons .btn-rect {
    padding: 20px 36px;
    border-radius: 14px;
    font-size: 28px;
}

