/* Override default theme colors to Voskamp brand */
:root {
    --brand: #0090d3;
    --brand-dark: #007bb3;
    --brand-light: #2fb2e9;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --surface: #ffffff;
    --surface-alt: #f5f7fb;
    --border: #e5e7eb;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--surface-alt);
    color: var(--text-dark);
    overflow-x: hidden;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Styles */
.kiosk-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--surface-alt);
}

.kiosk-header {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.topbar {
    width: 100%;
}

.topbar-white {
    background: #ffffff;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}

.topbar-white .topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-explain {
    height: 36px;
    max-width: 180px;
}

.kiosk-header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.brandbar {
    background: var(--brand);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    color: #fff;
}

.kiosk-main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.kiosk-footer {
    position: relative;
    background: transparent;
}

.powered-by {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.powered-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.logo-voskamp {
    height: 28px;
    width: auto;
}

/* Links and buttons */
a, .btn-link { color: var(--brand-dark); }
.btn-primary {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand);
}

/* Welcome Screen */
.welcome-screen { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 500px; }
.welcome-content {
    text-align: center;
    background: var(--surface);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-width: 900px;
    width: 100%;
}
.welcome-content h2 { font-size: 2.2rem; margin: 0 0 12px 0; color: var(--text-dark); font-weight: 700; }
.welcome-text { font-size: 1.2rem; margin-bottom: 24px; color: var(--text-muted); }

.option-buttons { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.option-btn {
    background: #fff;
    border: 3px solid var(--brand);
    border-radius: 14px;
    padding: 28px 22px;
    width: 320px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}
.option-btn:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,144,211,0.25); }
.option-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.option-btn.primary:hover { background: var(--brand-dark); }
.option-btn.secondary:hover { background: #f3f8fb; }
.btn-icon { font-size: 2.6rem; margin-bottom: 10px; }
.option-btn h3 { margin: 12px 0 6px 0; font-size: 1.4rem; }
.option-btn p { margin: 0; opacity: 0.9; font-size: 1rem; }

/* Common Components */
.back-btn {
    background: #fff;
    border: 2px solid var(--brand);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--brand);
    font-weight: 600;
}
.back-btn:hover { background: var(--brand); color: #fff; }

.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 360px; background: var(--surface); border-radius: 14px; margin: 16px; }
.loading-spinner { width: 56px; height: 56px; border: 6px solid #eaecef; border-top: 6px solid var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 16px; }
@keyframes spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }

.error-screen, .error-message { background: var(--surface); border-radius: 12px; padding: 26px; text-align: center; margin: 16px; border: 2px solid #e53e3e; }
.error-icon { font-size: 2.2rem; margin-bottom: 12px; }

.retry-btn, .continue-btn, .confirm-btn, .new-visitor-btn, .home-btn, .retry-print-btn {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 26px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 600;
    margin: 8px;
}
.retry-btn:hover, .continue-btn:hover, .confirm-btn:hover, .new-visitor-btn:hover, .home-btn:hover, .retry-print-btn:hover { background: var(--brand-dark); transform: translateY(-2px); }
.continue-btn:disabled, .confirm-btn:disabled { background: #b9dff0; cursor: not-allowed; transform: none; }

/* QR Scanner */
.scanner-page { max-width: 900px; margin: 0 auto; }
.scanner-header { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.scanner-header h2 { color: var(--text-dark); font-size: 1.8rem; margin: 0; }
.scanner-container { background: var(--surface); border-radius: 14px; padding: 24px; text-align: center; }
.scanner-instruction { font-size: 1.2rem; margin-bottom: 14px; color: var(--text-dark); font-weight: 600; }
.scanner-frame { border: 4px solid var(--brand); border-radius: 14px; overflow: hidden; margin: 18px auto; max-width: 520px; }
.scanner-help { margin-top: 14px; color: var(--text-muted); font-style: italic; }

/* Date Input */
.date-input-page { max-width: 640px; margin: 0 auto; }
.input-header { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.input-header h2 { color: var(--text-dark); font-size: 1.8rem; margin: 0; }
.input-content { background: var(--surface); border-radius: 14px; padding: 28px; text-align: center; }
.input-instruction { font-size: 1.15rem; margin-bottom: 20px; color: var(--text-dark); }
.date-input-container { margin-bottom: 16px; }
.date-input-container label { display: block; font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; color: var(--text-dark); }
.date-input { font-size: 1.15rem; padding: 14px; border: 2px solid var(--brand); border-radius: 10px; width: 260px; text-align: center; }
.privacy-notice { margin-top: 22px; color: var(--text-muted); font-style: italic; }

/* Time Slots */
.timeslot-page { max-width: 1100px; margin: 0 auto; }
.timeslot-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 14px; }
.timeslot-header h2 { color: var(--text-dark); font-size: 1.8rem; margin: 0; }
.date-display { color: var(--text-dark); font-size: 1.05rem; opacity: 0.9; margin: 0; }
.timeslot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; }
.timeslot-card { background: var(--surface); border-radius: 14px; padding: 20px; cursor: pointer; transition: all 0.25s ease; border: 3px solid transparent; }
.timeslot-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.timeslot-card.selected { border-color: var(--brand); background: #f0f8fd; }
.slot-time { font-size: 1.35rem; font-weight: bold; color: var(--text-dark); margin-bottom: 8px; }
.slot-location { font-size: 1.05rem; color: var(--brand); font-weight: 600; margin-bottom: 6px; }
.slot-availability { color: var(--text-muted); font-size: 0.95rem; }
.selection-summary { background: var(--surface); border-radius: 14px; padding: 24px; text-align: center; }
.selection-summary h3 { margin-top: 0; color: var(--text-dark); font-size: 1.35rem; }
.selected-info { margin: 16px auto; text-align: left; max-width: 320px; }
.selected-info p { margin: 6px 0; font-size: 1.05rem; }
.no-slots { background: var(--surface); border-radius: 14px; padding: 28px; text-align: center; }
.no-slots-icon { font-size: 3rem; margin-bottom: 14px; }

/* Ticket */
.ticket-page { max-width: 760px; margin: 0 auto; }
.ticket-container { background: var(--surface); border-radius: 14px; padding: 24px; margin-bottom: 16px; }
.ticket-header { text-align: center; margin-bottom: 22px; }
.ticket-header h2 { color: #1f9d55; font-size: 1.8rem; margin: 0 0 8px 0; }
.success-message { color: var(--text-muted); font-size: 1.05rem; margin: 0; }
.ticket-preview { border: 3px dashed var(--brand); border-radius: 14px; padding: 18px; margin: 16px 0; background: #f7fbfe; }
.ticket-number { text-align: center; font-size: 1.35rem; margin-bottom: 14px; color: var(--text-dark); }
.ticket-details { margin-bottom: 14px; }
.detail-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 1.05rem; }
.label { font-weight: 600; color: var(--text-dark); }
.value { color: var(--brand); font-weight: 600; }
.ticket-instructions { border-top: 2px solid var(--border); padding-top: 12px; }
.ticket-instructions h4 { margin: 0 0 8px 0; color: var(--text-dark); }
.print-status, .print-success, .print-error { text-align: center; padding: 16px; border-radius: 10px; margin: 14px 0; }
.print-status { background: #cfefff; color: #185f82; }
.print-success { background: #d7f5e6; color: #1d6f45; }
.print-error { background: #ffe1e1; color: #9e2a2a; }
.print-icon, .success-icon { font-size: 1.8rem; margin-bottom: 8px; }
.instruction { font-weight: 600; margin-top: 8px; }
.ticket-actions { text-align: center; }
.ticket-error { background: var(--surface); border-radius: 14px; padding: 28px; text-align: center; }

/* Loading App */
.loading-app { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background: var(--surface-alt); color: var(--text-dark); }
.loading-app .loading-spinner { border-color: #eaecef; border-top-color: var(--brand); }

/* Error UI */
#blazor-error-ui { background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* Responsive */
@media (max-width: 768px) {
    .kiosk-header h1 { font-size: 1.3rem; }
    .logo-explain { height: 30px; }
    .brandbar { height: 46px; }
    .option-btn { width: 280px; }
    .timeslot-grid { grid-template-columns: 1fr; }
    .timeslot-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .kiosk-main { padding: 12px; }
    .welcome-content, .scanner-container, .input-content, .ticket-container { padding: 18px; }
    .powered-by { right: 10px; bottom: 10px; }
}