/* Světlá verze formuláře pro obsluhu */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    margin: 0;
    color: #1a1a2e;
    font-size: 18px;
}

.app {
    width: 95vw;
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
    color: #1a1a2e;
}

.main {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.step {
    transition: opacity 0.2s ease;
}

.step.hidden {
    display: none;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1.05rem;
    color: #374151;
}

.search-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

#search-input {
    flex: 1;
    padding: 1rem 1.15rem;
    font-size: 1.25rem;
    min-height: 52px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    color: #1a1a2e;
}

#search-input::placeholder {
    color: #9ca3af;
}

#search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#search-btn {
    padding: 1rem 1.5rem;
    min-height: 52px;
    font-size: 1.15rem;
    font-weight: 600;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

#search-btn:hover {
    background: #1d4ed8;
}

.btn-clear {
    padding: 1rem 1.85rem;
    min-height: 52px;
    font-size: 1rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-clear:hover {
    background: #e5e7eb;
}

.hint {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.reload-hint {
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
    text-align: center;
}
.reload-hint .link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #6b7280;
    text-decoration: underline;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.reload-hint .link-btn:hover { color: #374151; }
.reload-hint .link-btn:disabled { opacity: 0.6; cursor: wait; }
.version-tag { color: #9ca3af; font-size: 0.8rem; }

.on-screen-keyboard {
    margin-top: 1.25rem;
    touch-action: manipulation;
    width: 100%;
    --key-gap: 0.5rem;
    --keys-per-row: 10;
    --key-size: calc((100% - (var(--keys-per-row) - 1) * var(--key-gap)) / var(--keys-per-row));
    --key-height: calc(var(--key-size) * 1.25);
}
.osk-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: var(--key-gap);
    margin-bottom: var(--key-gap);
}
.osk-row .osk-key {
    flex: 0 0 auto;
    width: var(--key-size);
    height: var(--key-height);
    min-width: var(--key-size);
    min-height: var(--key-height);
    padding: 0.3em 0;
    font-size: 1.15rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}
/* Na tabletu: větší mezery, větší písmo */
@media (min-width: 600px) and (min-height: 500px) {
    .on-screen-keyboard {
        margin-top: 1.5rem;
        --key-gap: 0.6rem;
    }
    .osk-row .osk-key {
        font-size: 2rem;
        padding: 0.3em 0;
    }
}
.osk-btn {
    margin: 0;
    font-family: inherit;
    padding: 0.3em 0;
    font-size: 1.15rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #1a1a2e;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.osk-btn:hover {
    background: #f3f4f6;
}
.osk-btn:active {
    background: #e5e7eb;
}
.results-label {
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1.1rem;
    color: #374151;
}

#results-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

#results-list li {
    padding: 1.1rem 1.25rem;
    min-height: 56px;
    margin-bottom: 0.6rem;
    background: #f9fafb;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: #1a1a2e;
}

#results-list li:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

#results-list li:active {
    background: #dbeafe;
}

#results-list li .name {
    font-weight: 600;
}

.guest-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.guest-card h2 {
    margin: 0 0 1.25rem 0;
    font-size: 1.6rem;
    color: #1a1a2e;
}

.guest-card .row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1.15rem;
    border-bottom: 1px solid #e5e7eb;
}

.guest-card .row:last-child {
    border-bottom: none;
}

.guest-card .label {
    color: #6b7280;
}

.guest-card .value {
    font-weight: 500;
    color: #1a1a2e;
}

.guest-card .vegetarian {
    color: #16a34a;
}

.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 1.1rem 1.75rem;
    min-height: 54px;
    font-size: 1.2rem;
    font-weight: 600;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #15803d;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary.btn-confirmed {
    background: #eab308;
    color: #0d1117;
    cursor: default;
}

.btn-primary.btn-confirmed:hover {
    background: #eab308;
}

.btn-secondary {
    padding: 1.1rem 1.25rem;
    min-height: 54px;
    font-size: 1.1rem;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.error-msg {
    color: #dc2626;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.empty-results {
    color: #6b7280;
    padding: 1.25rem 0;
    font-size: 1.1rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    background: #16a34a;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.hidden { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }

.tablet-msg {
    font-size: 1.1rem;
    color: #4b5563;
    margin: 0;
}

/* Výpis všech hostů pro kontrolu */
.debug-guests {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #d1d5db;
}
.debug-last-query {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 0.5rem 0;
    min-height: 1.4em;
}
.debug-guests-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}
.debug-guests-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    max-height: 280px;
    overflow-y: auto;
}
.debug-guests-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.debug-normalized {
    color: #6b7280;
    font-weight: normal;
}
