/**
 * OLDENT – Vstupní anamnestický dotazník (Frontend CSS)
 * Plně zapouzdřené styly (.oldent-anamneza-wrapper) nezávislé na šabloně WordPressu.
 */

.oldent-anamneza-wrapper {
    --oldent-primary: #0284c7;
    --oldent-primary-hover: #0369a1;
    --oldent-primary-light: #e0f2fe;
    --oldent-dark: #0f172a;
    --oldent-text: #1e293b;
    --oldent-muted: #64748b;
    --oldent-border: #cbd5e1;
    --oldent-bg: #ffffff;
    --oldent-surface: #f8fafc;
    --oldent-yes-bg: #fef2f2;
    --oldent-yes-border: #dc2626;
    --oldent-yes-text: #b91c1c;
    --oldent-no-bg: #f0fdf4;
    --oldent-no-border: #16a34a;
    --oldent-no-text: #15803d;
    --oldent-error: #dc2626;
    --oldent-error-bg: #fef2f2;
    --oldent-radius: 12px;
    --oldent-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--oldent-text);
    background-color: var(--oldent-bg);
    border: 1px solid var(--oldent-border);
    border-radius: var(--oldent-radius);
    box-shadow: var(--oldent-shadow);
    max-width: 960px;
    margin: 24px auto;
    padding: 32px;
    box-sizing: border-box;
    line-height: 1.5;
}

.oldent-anamneza-wrapper *,
.oldent-anamneza-wrapper *::before,
.oldent-anamneza-wrapper *::after {
    box-sizing: border-box;
}

/* Garantované skrytí všech elementů s atributem [hidden] (přepíše i globální styly šablony jako .oldent-form { display: grid }) */
.oldent-anamneza-wrapper [hidden] {
    display: none !important;
}

.oldent-anamneza-wrapper .oldent-form {
    display: block;
    margin: 0;
}

.oldent-anamneza-wrapper .oldent-section {
    padding-block: 0;
}

/* Skrytý honeypot proti spam botům */
.oldent-hp-wrap {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================================
   HLAVIČKA A PŘEPÍNAČ REŽIMU ZOBRAZENÍ
   ========================================================================== */
.oldent-header {
    border-bottom: 1px solid var(--oldent-border);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.oldent-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.oldent-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--oldent-surface);
    border: 1px solid var(--oldent-border);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--oldent-dark);
}

.oldent-header__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--oldent-primary);
}

.oldent-view-switcher {
    display: inline-flex;
    background: var(--oldent-surface);
    border: 1px solid var(--oldent-border);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
}

.oldent-view-switcher__btn {
    appearance: none;
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--oldent-muted);
    cursor: pointer;
    transition: all 0.18s ease;
}

.oldent-view-switcher__btn:hover {
    color: var(--oldent-dark);
}

.oldent-view-switcher__btn.is-active {
    background: var(--oldent-bg);
    color: var(--oldent-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.oldent-header__title {
    font-size: 26px;
    font-weight: 800;
    color: var(--oldent-dark);
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.oldent-header__subtitle {
    font-size: 15px;
    color: var(--oldent-muted);
    margin: 0;
}

/* ==========================================================================
   KROKOVÝ UKAZATEL (WIZARD STEPPER)
   ========================================================================== */
.oldent-stepper {
    margin-top: 20px;
}

.oldent-stepper__bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.oldent-stepper__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--oldent-primary), #0ea5e9);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.oldent-stepper__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

.oldent-stepper__item {
    margin: 0;
}

.oldent-stepper__btn {
    width: 100%;
    background: var(--oldent-surface);
    border: 1px solid var(--oldent-border);
    border-radius: 8px;
    padding: 7px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.oldent-stepper__num {
    font-size: 12px;
    font-weight: 800;
    color: var(--oldent-muted);
}

.oldent-stepper__label {
    font-size: 11px;
    color: var(--oldent-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.oldent-stepper__item.is-current .oldent-stepper__btn {
    background: var(--oldent-primary-light);
    border-color: var(--oldent-primary);
}

.oldent-stepper__item.is-current .oldent-stepper__num,
.oldent-stepper__item.is-current .oldent-stepper__label {
    color: var(--oldent-primary-hover);
    font-weight: 700;
}

.oldent-stepper__item.is-completed .oldent-stepper__btn {
    border-color: #86efac;
    background: #f0fdf4;
}

.oldent-stepper__item.is-completed .oldent-stepper__num {
    color: #15803d;
}

/* ==========================================================================
   PŘEPÍNÁNÍ REŽIMU WIZARD vs. SINGLE PAGE
   ========================================================================== */
.oldent-anamneza-wrapper[data-view-mode="wizard"] .oldent-section {
    display: none;
}

.oldent-anamneza-wrapper[data-view-mode="wizard"] .oldent-section.is-active {
    display: block;
    animation: oldentFadeIn 0.22s ease;
}

.oldent-anamneza-wrapper[data-view-mode="wizard"] .oldent-single-submit-bar {
    display: none;
}

.oldent-anamneza-wrapper[data-view-mode="single"] .oldent-stepper,
.oldent-anamneza-wrapper[data-view-mode="single"] .oldent-step-nav {
    display: none;
}

.oldent-anamneza-wrapper[data-view-mode="single"] .oldent-section {
    display: block;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 2px dashed #e2e8f0;
}

.oldent-anamneza-wrapper[data-view-mode="single"] .oldent-single-submit-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

@keyframes oldentFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   SEKCE A VSTUPNÍ POLE
   ========================================================================== */
.oldent-section__header {
    margin-bottom: 20px;
}

.oldent-section__step-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--oldent-primary);
    margin-bottom: 4px;
}

.oldent-section__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--oldent-dark);
    margin: 0 0 6px 0;
}

.oldent-section__desc {
    font-size: 14px;
    color: var(--oldent-muted);
    margin: 0;
}

.oldent-grid {
    display: grid;
    gap: 18px;
}

.oldent-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

.oldent-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.oldent-field {
    display: flex;
    flex-direction: column;
}

.oldent-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--oldent-dark);
    margin-bottom: 6px;
}

.oldent-required {
    color: var(--oldent-error);
    font-weight: 700;
    margin-left: 2px;
}

.oldent-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--oldent-dark);
    background-color: var(--oldent-bg);
    border: 1.5px solid var(--oldent-border);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.oldent-input:focus {
    outline: none;
    border-color: var(--oldent-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.oldent-input--readonly {
    background-color: var(--oldent-surface);
    color: var(--oldent-muted);
    cursor: default;
}

.oldent-field__suboption {
    margin-top: 6px;
}

.oldent-checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--oldent-muted);
    cursor: pointer;
}

.oldent-field__hint {
    font-size: 12px;
    color: var(--oldent-muted);
    margin-top: 4px;
}

.oldent-field__error {
    color: var(--oldent-error);
    font-size: 13px;
    font-weight: 600;
    margin: 6px 0 0 0;
}

.oldent-has-error .oldent-input,
.oldent-has-error.oldent-q-card,
.oldent-has-error.oldent-consent-card,
.oldent-has-error .oldent-signature-pad__canvas-box {
    border-color: var(--oldent-error) !important;
    background-color: #fff5f5;
}

.oldent-quick-actions-bar {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--oldent-primary-light);
    border-left: 4px solid var(--oldent-primary);
    border-radius: 6px;
    font-size: 13.5px;
    color: #0c4a6e;
}

.oldent-section-helper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.oldent-btn-mark-no {
    appearance: none;
    background: var(--oldent-surface);
    border: 1px solid var(--oldent-border);
    color: var(--oldent-text);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.oldent-btn-mark-no:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* ==========================================================================
   KARTY OTÁZEK (1–26) A VOLBY ANO / NE
   ========================================================================== */
.oldent-questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oldent-q-card {
    background: var(--oldent-surface);
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.oldent-q-card:hover {
    border-color: var(--oldent-border);
}

.oldent-q-card--dual {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.oldent-q-card__num-badge {
    font-weight: 800;
    font-size: 15px;
    color: var(--oldent-primary);
    padding-top: 6px;
}

.oldent-q-card__dual-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.oldent-subquestion + .oldent-subquestion {
    padding-top: 14px;
    border-top: 1px dashed var(--oldent-border);
}

.oldent-question-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.oldent-question-row__text {
    flex: 1;
    font-size: 15px;
    color: var(--oldent-dark);
}

.oldent-q-num {
    font-weight: 800;
    color: var(--oldent-primary);
    margin-right: 6px;
}

.oldent-q-title {
    font-weight: 600;
}

.oldent-q-subtitle {
    font-size: 13px;
    color: var(--oldent-muted);
    margin-top: 4px;
}

/* Přepínače ANO / NE */
.oldent-yesno-group {
    display: inline-flex;
    gap: 8px;
    flex-shrink: 0;
}

.oldent-yesno-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.oldent-yesno-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.oldent-yesno-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 700;
    border: 1.5px solid var(--oldent-border);
    border-radius: 8px;
    background: var(--oldent-bg);
    color: var(--oldent-text);
    transition: all 0.15s ease;
}

.oldent-yesno-pill:hover span {
    border-color: #94a3b8;
}

.oldent-yesno-pill--yes input[type="radio"]:checked + span {
    background-color: var(--oldent-yes-bg);
    border-color: var(--oldent-yes-border);
    color: var(--oldent-yes-text);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.oldent-yesno-pill--no input[type="radio"]:checked + span {
    background-color: var(--oldent-no-bg);
    border-color: var(--oldent-no-border);
    color: var(--oldent-no-text);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.oldent-yesno-pill input[type="radio"]:focus-visible + span {
    outline: 2px solid var(--oldent-primary);
    outline-offset: 2px;
}

/* Podmíněná doplňující pole ("Pokud ano, upřesněte:") */
.oldent-conditional-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--oldent-border);
}

.oldent-detail-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--oldent-dark);
    margin-bottom: 6px;
}

/* Mřížka checkboxů (otázky 2, 21, 22) */
.oldent-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.oldent-check-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--oldent-bg);
    border: 1px solid var(--oldent-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--oldent-dark);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.oldent-check-option:hover {
    border-color: var(--oldent-primary);
}

.oldent-check-option input[type="checkbox"] {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    accent-color: var(--oldent-primary);
    flex-shrink: 0;
}

/* ==========================================================================
   SEKCE VIII – SOUHLASY A DIGITÁLNÍ PODPIS
   ========================================================================== */
.oldent-consents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.oldent-consent-card {
    background: var(--oldent-surface);
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
}

.oldent-checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.oldent-checkbox-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--oldent-primary);
    flex-shrink: 0;
}

.oldent-checkbox-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.oldent-checkbox-card__text,
.oldent-consent-text {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--oldent-dark);
}

.oldent-terms-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.oldent-link-btn {
    appearance: none;
    background: var(--oldent-primary-light);
    color: var(--oldent-primary-hover);
    border: 1px solid #bae6fd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.oldent-link-btn:hover {
    background: #bae6fd;
}

.oldent-link-btn--secondary {
    background: var(--oldent-bg);
    color: var(--oldent-text);
    border-color: var(--oldent-border);
}

.oldent-signature-section {
    background: var(--oldent-surface);
    border: 1.5px solid var(--oldent-border);
    border-radius: 12px;
    padding: 22px;
}

.oldent-signature-section__title {
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--oldent-dark);
}

.oldent-signature-meta {
    margin-bottom: 18px;
}

.oldent-signature-pad__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.oldent-btn-clear-sig {
    appearance: none;
    background: var(--oldent-bg);
    border: 1px solid var(--oldent-border);
    color: var(--oldent-text);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.oldent-btn-clear-sig:hover {
    border-color: var(--oldent-error);
    color: var(--oldent-error);
}

.oldent-signature-pad__canvas-box {
    position: relative;
    background: #ffffff;
    border: 2px dashed #94a3b8;
    border-radius: 10px;
    height: 200px;
    overflow: hidden;
    touch-action: none;
}

.oldent-signature-pad__canvas-box.is-signed {
    border-style: solid;
    border-color: var(--oldent-primary);
}

#oldent-signature-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    touch-action: none;
}

.oldent-signature-pad__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    padding: 16px;
}

.oldent-signature-pad__canvas-box.is-signed .oldent-signature-pad__placeholder {
    display: none;
}

/* ==========================================================================
   CLOUDFLARE TURNSTILE
   ========================================================================== */
.oldent-turnstile {
    margin-top: 24px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 65px;
}

.oldent-turnstile #oldent-turnstile-widget {
    min-height: 65px;
    display: flex;
    justify-content: center;
}

.oldent-turnstile .oldent-field__error {
    text-align: center;
    margin-top: 6px;
}

/* ==========================================================================
   TLAČÍTKA A NAVIGACE
   ========================================================================== */
.oldent-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--oldent-border);
}

.oldent-btn {
    appearance: none;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.oldent-btn--primary {
    background: var(--oldent-primary);
    color: #ffffff;
}

.oldent-btn--primary:hover {
    background: var(--oldent-primary-hover);
}

.oldent-btn--secondary {
    background: var(--oldent-surface);
    color: var(--oldent-dark);
    border: 1.5px solid var(--oldent-border);
}

.oldent-btn--secondary:hover {
    background: #e2e8f0;
}

.oldent-btn--outline {
    background: transparent;
    color: var(--oldent-muted);
    border: 1.5px solid var(--oldent-border);
}

.oldent-btn--submit {
    background: #16a34a;
    color: #ffffff;
    padding: 14px 28px;
    font-size: 16px;
}

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

.oldent-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* Upozornění */
.oldent-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14.5px;
    font-weight: 600;
}

.oldent-alert--error {
    background: var(--oldent-error-bg);
    border: 1.5px solid var(--oldent-error);
    color: #991b1b;
}

/* Potvrzovací obrazovka po odeslání */
.oldent-success-screen {
    text-align: center;
    padding: 40px 24px;
}

.oldent-success-screen__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 32px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.oldent-success-screen__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--oldent-dark);
    margin: 0 0 10px 0;
}

.oldent-success-screen__text {
    font-size: 16px;
    color: var(--oldent-muted);
    max-width: 600px;
    margin: 0 auto 24px auto;
}

.oldent-success-screen__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================================================
   MODÁLNÍ OKNO SE SMLUVNÍMI PODMÍNKAMI
   ========================================================================== */
.oldent-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.oldent-modal[hidden] {
    display: none !important;
}

.oldent-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
}

.oldent-modal__dialog {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 14px;
    max-width: 820px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.oldent-modal__header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--oldent-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: var(--oldent-surface);
}

.oldent-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--oldent-dark);
}

.oldent-modal__subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--oldent-muted);
}

.oldent-modal__close {
    appearance: none;
    background: transparent;
    border: 1px solid var(--oldent-border);
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 16px;
    cursor: pointer;
    color: var(--oldent-dark);
}

.oldent-modal__body {
    padding: 24px;
    overflow-y: auto;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--oldent-text);
}

.oldent-terms-article {
    margin-bottom: 20px;
}

.oldent-terms-article__heading {
    font-size: 16px;
    font-weight: 800;
    color: var(--oldent-dark);
    margin: 0 0 8px 0;
}

.oldent-terms-article__intro {
    margin: 0 0 8px 0;
}

.oldent-terms-article__list {
    margin: 0;
    padding-left: 20px;
}

.oldent-terms-article__list li {
    margin-bottom: 6px;
}

.oldent-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--oldent-border);
    background: var(--oldent-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.oldent-modal__footer-right {
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   RESPONZIVITA (TABLET V ČEKÁRNĚ A MOBILNÍ TELEFONY)
   ========================================================================== */
@media (max-width: 768px) {
    .oldent-anamneza-wrapper {
        padding: 18px;
        margin: 12px auto;
    }

    .oldent-stepper__list {
        grid-template-columns: repeat(4, 1fr);
    }

    .oldent-grid--2col,
    .oldent-grid--3col,
    .oldent-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .oldent-question-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .oldent-yesno-group {
        width: 100%;
    }

    .oldent-yesno-pill {
        flex: 1;
    }

    .oldent-yesno-pill span {
        width: 100%;
    }

    .oldent-q-card--dual {
        flex-direction: column;
        gap: 8px;
    }

    .oldent-step-nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .oldent-step-nav .oldent-btn {
        width: 100%;
    }
}


/* Volba podpisu na místě – dostupná alternativa pro zařízení bez pohodlného podpisu. */
.oldent-sign-on-site-option {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--oldent-border);
    border-radius: 10px;
    background: var(--oldent-bg);
}
.oldent-sign-on-site-option .oldent-checkbox-card__text {
    font-weight: 750;
}
.oldent-sign-on-site-option .oldent-field__hint {
    line-height: 1.5;
}
.oldent-signature-pad-wrap[hidden] {
    display: none !important;
}

/* Fluidní rozměry a ochrana před přetečením v úzkých kontejnerech šablony. */
.oldent-anamneza-wrapper {
    width: min(100%, 960px);
    padding: clamp(14px, 3.5vw, 32px);
    margin-inline: auto;
    min-width: 0;
}
.oldent-anamneza-wrapper img,
.oldent-anamneza-wrapper canvas,
.oldent-anamneza-wrapper iframe {
    max-width: 100%;
}
.oldent-anamneza-wrapper input,
.oldent-anamneza-wrapper select,
.oldent-anamneza-wrapper textarea,
.oldent-anamneza-wrapper button {
    max-width: 100%;
}
.oldent-anamneza-wrapper .oldent-grid,
.oldent-anamneza-wrapper .oldent-field,
.oldent-anamneza-wrapper .oldent-section,
.oldent-anamneza-wrapper .oldent-q-card,
.oldent-anamneza-wrapper .oldent-signature-section {
    min-width: 0;
}
.oldent-anamneza-wrapper .oldent-signature-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.oldent-anamneza-wrapper .oldent-input {
    min-width: 0;
}
.oldent-anamneza-wrapper .oldent-modal__dialog {
    width: min(100%, 820px);
}

@media (max-width: 560px) {
    .oldent-anamneza-wrapper {
        border-radius: 8px;
        margin: 8px auto;
        padding: 14px;
    }
    .oldent-header__title {
        font-size: clamp(21px, 6vw, 26px);
        overflow-wrap: anywhere;
    }
    .oldent-header__top {
        align-items: stretch;
    }
    .oldent-view-switcher {
        width: 100%;
    }
    .oldent-view-switcher__btn {
        flex: 1;
        min-width: 0;
    }
    .oldent-stepper__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .oldent-stepper__label {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .oldent-q-card,
    .oldent-consent-card,
    .oldent-signature-section {
        padding: 12px;
    }
    .oldent-signature-meta {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .oldent-signature-pad__header {
        align-items: flex-start;
        flex-direction: column;
    }
    .oldent-signature-pad__canvas-box {
        height: clamp(150px, 42vw, 200px);
    }
    .oldent-modal {
        padding: 8px;
    }
    .oldent-modal__header,
    .oldent-modal__body,
    .oldent-modal__footer {
        padding: 14px;
    }
    .oldent-modal__footer,
    .oldent-modal__footer-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .oldent-modal__footer .oldent-btn,
    .oldent-modal__footer-right .oldent-btn {
        width: 100%;
    }
    .oldent-success-screen {
        padding: 28px 10px;
    }
    .oldent-success-screen__actions {
        flex-direction: column;
    }
    .oldent-success-screen__actions .oldent-btn {
        width: 100%;
    }
}
