/**
 * Teledom Wizard — step-by-step order form styling.
 *
 * Scope: .teledom-wizard (all styles namespaced to avoid clashing with theme CSS).
 */

.teledom-wizard {
    /* ───── Brand palette — matches the flat order-form (public.css :root) ─────
     * Primary:      #0073aa (WordPress-blue, used for buttons / active states)
     * Secondary:    #005a87 (hover / pressed variant of primary)
     * Success:      #46b450 (available dates, confirmations)
     * Danger:       #dc3232 (errors, unavailable)
     * Light gray:   #f7f7f7 (section backgrounds)
     * Border:       #ddd
     * Text:         #333
     * Text muted:   #666
     * Header grad:  #f8f9fa → #e9ecef */
    --tw-bg: #ffffff;
    --tw-fg: #333;
    --tw-muted: #666;
    --tw-border: #ddd;
    --tw-accent: #0073aa;
    --tw-accent-dark: #005a87;
    --tw-accent-fg: #ffffff;
    --tw-success: #46b450;
    --tw-danger: #dc3232;
    --tw-warning: #ffb900;
    --tw-section-bg: #f7f7f7;
    --tw-header-grad-start: #f8f9fa;
    --tw-header-grad-end: #e9ecef;
    --tw-radius: 10px;
    --tw-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    /* Full parent width — iframe already controls max-width via `width: 100%`
     * on #teledom-form. No internal cap needed; wizard fills whatever space
     * the partner's page provides. */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    color: var(--tw-fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.teledom-wizard *,
.teledom-wizard *::before,
.teledom-wizard *::after {
    box-sizing: inherit;
}

/* ─── Hero ─── */

.teledom-wizard-hero {
    position: relative;
    padding: 60px 30px;
    background-size: cover;
    background-position: center;
    text-align: center;
    color: #fff;
    border-radius: var(--tw-radius) var(--tw-radius) 0 0;
    overflow: hidden;
}

.teledom-wizard-hero--plain {
    /* Brand gradient — primary to its darker shade (same palette as flat form) */
    background: linear-gradient(135deg, var(--tw-accent) 0%, var(--tw-accent-dark) 100%);
}

.teledom-wizard-hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--tw-radius);
}

.teledom-wizard-hero h1 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.2;
    color: inherit;
}

.teledom-wizard-hero p {
    margin: 0;
    font-size: 17px;
    opacity: .92;
    color: inherit;
}

.teledom-wizard-preview-banner {
    /* Warning banner — brand yellow tint */
    background: rgba(255, 185, 0, 0.18);
    border: 1px solid var(--tw-warning);
    color: #78350f;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Progress ─── */

.teledom-wizard-progress {
    background: #f9fafb;
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    padding: 20px;
    margin: 20px 0;
}

.teledom-wizard-progress-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    position: relative;
    gap: 8px;
    flex-wrap: wrap;
}

.teledom-wizard-progress-item {
    flex: 1;
    min-width: 100px;
    position: relative;
    text-align: center;
    cursor: default;
    padding: 0;
    opacity: .55;
    transition: opacity .2s;
}

.teledom-wizard-progress-item.is-complete,
.teledom-wizard-progress-item.is-active {
    opacity: 1;
    cursor: pointer;
}

.teledom-wizard-progress-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--tw-border);
    color: var(--tw-muted);
    margin-bottom: 8px;
    transition: all .2s;
}

.teledom-wizard-progress-item.is-complete .teledom-wizard-progress-icon {
    background: var(--tw-success);
    border-color: var(--tw-success);
    color: #fff;
}

.teledom-wizard-progress-item.is-active .teledom-wizard-progress-icon {
    background: var(--tw-accent);
    border-color: var(--tw-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .2);
}

.teledom-wizard-progress-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.teledom-wizard-progress-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

/* ─── Body layout: single column (cart lives in a footer-triggered modal) ─── */

.teledom-wizard-body {
    margin-top: 20px;
}

.teledom-wizard-content {
    background: #fff;
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    padding: 30px;
    box-shadow: var(--tw-shadow);
    min-height: 400px;
}

.teledom-wizard-loading {
    text-align: center;
    color: var(--tw-muted);
    padding: 60px 20px;
}

/* ─── Step title ─── */

.teledom-wizard-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.2;
    color: var(--tw-fg);
}

.teledom-wizard-step-title .dashicons {
    color: var(--tw-accent);
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.teledom-wizard-step-subtitle {
    margin: 0 0 20px;
    color: var(--tw-muted);
    font-size: 15px;
}

.teledom-wizard-step-help {
    /* Soft primary tint for informational help boxes */
    background: rgba(0, 115, 170, 0.08);
    border-left: 3px solid var(--tw-accent);
    color: var(--tw-accent-dark);
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.teledom-wizard-step-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.teledom-wizard-meta-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--tw-muted);
    margin-bottom: 4px;
}

.teledom-wizard-meta-field input,
.teledom-wizard-meta-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tw-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}
.teledom-wizard-time-select {
    font-variant-numeric: tabular-nums;   /* keep 14:00 / 09:30 vertically aligned */
}

/* ───────── European DD.MM.YYYY date widget ─────────
 * Visible text input shows DD.MM.YYYY (Slovak/EU convention); the hidden
 * native <input type="date"> is only used to drive the browser's calendar
 * picker when the 📅 button is clicked (via showPicker()). User can also type
 * directly into the text input; on blur/Enter the JS parses DD.MM.YYYY and
 * pushes an ISO value back into the native input. */
.teledom-wizard-date-ctrl {
    position: relative;
    display: block;
    width: 100%;
}
.teledom-wizard-date-ctrl .teledom-wizard-date-display {
    width: 100%;
    padding-right: 40px;                   /* room for the 📅 button on the right */
    font-variant-numeric: tabular-nums;
    letter-spacing: .3px;
}
.teledom-wizard-date-ctrl .teledom-wizard-date-native {
    /* Visually hidden but still focusable so showPicker() works on it. We
     * can't use display:none — Chromium refuses showPicker() on detached
     * elements. Clip it to a 1×1 transparent square in the corner instead. */
    position: absolute;
    left: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}
.teledom-wizard-date-pick {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--tw-muted, #9ca3af);           /* muted grey — doesn't draw focus */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.teledom-wizard-date-pick:hover,
.teledom-wizard-date-pick:focus-visible {
    color: var(--tw-accent, #111);
    outline: none;
}
.teledom-wizard-date-pick .teledom-wizard-svg-icon {
    display: block;
}

/* Generic icon-on-the-right wrapper, used for the <select> time picker and
 * the <input type="number"> guest-count field. The icon is purely decorative
 * (pointer-events: none) — the real interactive element fills the wrapper. */
.teledom-wizard-icon-ctrl {
    position: relative;
    display: block;
    width: 100%;
}
.teledom-wizard-icon-ctrl > select,
.teledom-wizard-icon-ctrl > input {
    width: 100%;
    padding-right: 34px;                        /* room for the icon */
}
.teledom-wizard-icon-ctrl > select {
    /* Hide the native dropdown arrow so our icon doesn't collide with it.
     * The <select> is still fully clickable and opens the dropdown on click. */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.teledom-wizard-icon-ornament {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: var(--tw-muted, #9ca3af);
    pointer-events: none;                       /* click goes through to the input/select */
    display: inline-flex;
    align-items: center;
}

/* "+ Iný dátum ukončenia" / "← Jeden deň" toggle — inline ghost link-style button */
.teledom-wizard-meta-toggle {
    display: flex;
    align-items: flex-end;
}
.teledom-wizard-date-toggle-btn {
    background: transparent;
    border: 1px dashed var(--tw-border);
    color: var(--tw-accent);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}
.teledom-wizard-date-toggle-btn:hover {
    border-color: var(--tw-accent);
    background: rgba(0, 115, 170, 0.08);
}

/* ─── Product grid ───
 * Cards themselves reuse .product-card / .product-image / .product-info / .product-footer /
 * .product-price / .btn-add-to-cart from public.css — same markup as the flat form, so any
 * design updates flow through automatically. Only the grid wrapper + per-card availability
 * badge + in-cart quantity controls are wizard-specific.
 */

.teledom-wizard-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.teledom-wizard-card.is-in-cart {
    border-color: var(--tw-success);
    background: rgba(70, 180, 80, 0.08);        /* brand success tint */
}
.teledom-wizard-card.is-unavailable {
    opacity: .65;
    background: rgba(220, 50, 50, 0.06);        /* brand danger tint */
    border-color: rgba(220, 50, 50, 0.4);
}
.teledom-wizard-card.is-unavailable:hover {
    transform: none;
    box-shadow: none;
}
.teledom-wizard-card.is-checking {
    opacity: .85;
}

/* Availability status band — sits directly under .product-footer (below Add button).
 * Full-width strip inside the card, small text so it doesn't crowd the design.
 */
.teledom-wizard-card .teledom-wizard-availability {
    display: block;
    margin: 6px 10px 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    letter-spacing: .1px;
}
.teledom-wizard-availability--available {
    /* Same success palette used by the flat form's #d4edda / #155724 alert */
    background: #d4edda;
    color: #155724;
}
.teledom-wizard-availability--unavailable {
    /* Same danger palette used by the flat form's #f8d7da / #721c24 alert */
    background: #f8d7da;
    color: #721c24;
}
.teledom-wizard-availability--checking {
    background: var(--tw-section-bg);
    color: var(--tw-muted);
    font-weight: normal;
}
.teledom-wizard-availability--needs-date {
    background: rgba(255, 185, 0, 0.18);       /* brand warning tint */
    color: #78350f;
    font-weight: normal;
}

/* Wizard card footer — single row: price (left) · button (right).
 * Qty badge lives OUTSIDE the footer (see below), so appearing/disappearing never
 * shifts the price or the button.
 */
.teledom-wizard-card {
    position: relative;          /* anchor for the absolutely-positioned qty badge */
}
.teledom-wizard-card .product-footer {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.teledom-wizard-card .product-footer .product-price-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
}
.teledom-wizard-card .product-footer .btn-add-to-cart {
    flex: 0 0 auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Qty badge — floats in the top-right corner of the card.
 * Doesn't participate in flex layout, so adding/removing it doesn't shift anything.
 */
.teledom-wizard-card-qty-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #d4edda;                            /* brand success tint */
    color: #155724;
    border: 1px solid rgba(70, 180, 80, 0.5);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(70, 180, 80, .2);
    pointer-events: none;         /* don't block clicks on .product-image beneath */
}
.teledom-wizard-card-qty-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

/* ─── Footer cart toggle button ───
 * Wider pill: [icon + badge]  Akcia  ·  27,46 €
 * Badge floats in the upper-right, clear of the cart icon so it never overlaps.
 */
.teledom-wizard-cart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 10px;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--tw-border);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--tw-fg);
    transition: all .15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    justify-content: flex-start;
    /* Flex-auto margins center the toggle between left-side items (prev + step indicator)
     * and right-side items (Ďalej / Odoslať) without needing a wrapper. */
    margin: 0 auto;
}
.teledom-wizard-cart-toggle:hover {
    border-color: var(--tw-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.teledom-wizard-cart-toggle.has-items {
    border-color: var(--tw-success);
    background: rgba(70, 180, 80, 0.08);
}

/* Icon disc */
.teledom-wizard-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tw-accent);
    color: #fff;
    flex-shrink: 0;
    margin: 0 2px 0 0;
}
.teledom-wizard-cart-toggle.has-items .teledom-wizard-cart-icon {
    background: var(--tw-success);
}
.teledom-wizard-cart-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Count badge — small pill floating at the top-right corner of the icon disc */
.teledom-wizard-cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--tw-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    border: 2px solid #fff;
    box-sizing: content-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    display: none;
    letter-spacing: -.3px;
}
.teledom-wizard-cart-toggle.has-items .teledom-wizard-cart-badge {
    display: block;
}

.teledom-wizard-cart-toggle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    flex: 1;                         /* take remaining room — keeps button fixed-width */
}
.teledom-wizard-cart-toggle-label {
    font-size: 11px;
    color: var(--tw-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 2px;
}
.teledom-wizard-cart-toggle-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--tw-fg);
    letter-spacing: -.2px;
}
.teledom-wizard-cart-toggle.has-items .teledom-wizard-cart-toggle-total {
    color: var(--tw-success);
}

/* ─── Cart modal ───
 * Hidden by default via [hidden]. Inner cart-sidebar DOM is unchanged from flat form,
 * so .cart-*, .promo-code-*, .product-card styles from public.css apply.
 */
.teledom-wizard-cart-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.teledom-wizard-cart-modal[hidden] {
    display: none;
}
.teledom-wizard-cart-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    cursor: pointer;
    animation: teledomWizardFadeIn .15s ease;
}
.teledom-wizard-cart-modal-dialog {
    position: relative;
    max-width: 900px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: var(--tw-radius);
    box-shadow: 0 20px 50px rgba(0,0,0,.3);
    padding: 20px;
    animation: teledomWizardSlideUp .2s ease;
}
.teledom-wizard-cart-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tw-muted);
    transition: all .15s;
    z-index: 2;
}
.teledom-wizard-cart-modal-close:hover {
    background: var(--tw-danger);
    color: #fff;
}
.teledom-wizard-cart-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}
body.teledom-wizard-cart-modal-open {
    overflow: hidden;
}

/* ─── Cart sidebar sizing reset (wizard only) ───
 * Flat form enforces `.cart-sidebar { min-height: 530px; max-height: calc(100vh - 200px); overflow-y: auto; }`
 * so the sidebar visually matches the products-column height beside it and scrolls when tall.
 *
 * In the wizard the cart lives INSIDE its own modal dialog
 * (`.teledom-wizard-cart-modal-dialog`) which already caps height at
 * `calc(100vh - 40px)` and has `overflow-y: auto`. So the sidebar's own
 * cap + scroll is redundant — it creates a nested scroll container and
 * leaves empty space below the summary on small carts. Let the content
 * flow naturally; if the whole modal body exceeds viewport, the MODAL
 * dialog handles the scroll (single scrollbar, not double). */
.teledom-wizard .cart-sidebar {
    min-height: 0;
    max-height: none;
    overflow: visible;
}

/* ─── Cart items rendered as a compact one-row-per-item table ───
 * Wizard overrides #cart-items content (flat-form card layout) with this table
 * so the whole order is scannable at a glance. Data-index attributes on
 * qty/remove buttons match flat-form contract so delegated handlers still work.
 */
.teledom-wizard-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}
.teledom-wizard-cart-table thead th {
    text-align: center;
    padding: 8px 10px;
    background: var(--tw-section-bg);
    border-bottom: 2px solid var(--tw-border);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--tw-muted);
    white-space: nowrap;
}
.teledom-wizard-cart-table thead th.wc-col-name { text-align: left; }
.teledom-wizard-cart-table thead th.wc-col-price,
.teledom-wizard-cart-table thead th.wc-col-subtotal,
.teledom-wizard-cart-table thead th.wc-col-total { text-align: right; }
.teledom-wizard-cart-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.teledom-wizard-cart-table tbody tr:last-child td {
    border-bottom: none;
}
.teledom-wizard-cart-table tbody tr:hover {
    background: #fafbfc;
}
.teledom-wizard-cart-table td.wc-col-name {
    text-align: left;
    font-weight: 600;
    color: var(--tw-fg);
    max-width: 280px;
}
.teledom-wizard-cart-table td.wc-col-name .wc-name-meta {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--tw-muted);
    margin-top: 2px;
}
.teledom-wizard-cart-table td.wc-col-unit { text-align: center; color: var(--tw-muted); }
.teledom-wizard-cart-table td.wc-col-price,
.teledom-wizard-cart-table td.wc-col-subtotal { text-align: right; white-space: nowrap; }
.teledom-wizard-cart-table td.wc-col-vat { text-align: center; color: var(--tw-muted); }
.teledom-wizard-cart-table td.wc-col-total { text-align: right; white-space: nowrap; }
.teledom-wizard-cart-table td.wc-col-total strong { color: var(--tw-fg); font-size: 15px; }
.teledom-wizard-cart-table td.wc-col-qty {
    text-align: center;
    white-space: nowrap;
    /* Force inline-flex layout on the three children regardless of what public.css sets */
    font-size: 0; /* kills inline whitespace between buttons */
}
/* Flex row that keeps ── / [input] / + together, so .wc-qty-duration can sit
 * on a second line below without breaking the button row. */
.teledom-wizard-cart-table td.wc-col-qty .wc-qty-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
/* "× 6,5 hodín" badge beneath the qty controls — shows the duration multiplier
 * that's hidden in the price math for bookable items. Small + muted so it
 * reads as supplementary info, not a duplicate quantity. */
.teledom-wizard-cart-table td.wc-col-qty .wc-qty-duration {
    display: block;
    font-size: 11px;
    color: var(--tw-muted);
    margin-top: 3px;
    letter-spacing: .2px;
    font-variant-numeric: tabular-nums;
}
.teledom-wizard-cart-table td.wc-col-qty .cart-qty-decrease,
.teledom-wizard-cart-table td.wc-col-qty .cart-qty-increase {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 24px;
    height: 24px;
    border: 1px solid var(--tw-border);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    box-sizing: border-box;
    margin: 0;
}
.teledom-wizard-cart-table td.wc-col-qty .cart-qty-decrease:hover,
.teledom-wizard-cart-table td.wc-col-qty .cart-qty-increase:hover {
    background: var(--tw-accent);
    color: #fff;
    border-color: var(--tw-accent);
}
.teledom-wizard-cart-table td.wc-col-qty input.cart-qty,
.teledom-wizard-cart-table td.wc-col-qty .cart-qty {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 44px;
    min-width: 44px;
    height: 24px;
    padding: 0 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    margin: 0 4px;
    border: 1px solid var(--tw-border);
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    -moz-appearance: textfield;
    appearance: textfield;
}
/* Hide native number-input spinners (we have +/- buttons) */
.teledom-wizard-cart-table td.wc-col-qty input.cart-qty::-webkit-outer-spin-button,
.teledom-wizard-cart-table td.wc-col-qty input.cart-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.teledom-wizard-cart-table td.wc-col-qty input.cart-qty:focus {
    outline: 2px solid var(--tw-accent);
    outline-offset: -1px;
    border-color: var(--tw-accent);
}
/* Actions column — holds edit-date + remove buttons side by side. Edit button
 * only appears for bookable items (with dateInfo), remove is always present. */
.teledom-wizard-cart-table th.wc-col-actions,
.teledom-wizard-cart-table td.wc-col-actions {
    text-align: center;
    width: 80px;
    white-space: nowrap;
}
.teledom-wizard-cart-table td.wc-col-actions .cart-item-edit-date,
.teledom-wizard-cart-table td.wc-col-actions .cart-item-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--tw-muted);
    padding: 4px 6px;
    margin: 0 1px;
    border-radius: 4px;
    transition: color .15s ease, background .15s ease;
    vertical-align: middle;
}
.teledom-wizard-cart-table td.wc-col-actions .cart-item-edit-date:hover {
    color: var(--tw-accent);
    background: rgba(0, 115, 170, 0.08);
}
.teledom-wizard-cart-table td.wc-col-actions .cart-item-remove:hover {
    color: var(--tw-danger);
    background: rgba(220, 50, 50, 0.08);
}
.teledom-wizard-cart-table td.wc-col-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

@media (max-width: 700px) {
    .teledom-wizard-cart-table {
        font-size: 12px;
    }
    .teledom-wizard-cart-table thead th,
    .teledom-wizard-cart-table tbody td {
        padding: 6px 4px;
    }
    .teledom-wizard-cart-table th.wc-col-unit,
    .teledom-wizard-cart-table td.wc-col-unit,
    .teledom-wizard-cart-table th.wc-col-vat,
    .teledom-wizard-cart-table td.wc-col-vat {
        display: none; /* hide unit + VAT columns on narrow screens */
    }
}

@keyframes teledomWizardFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes teledomWizardSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Footer navigation ─── */

.teledom-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    box-shadow: var(--tw-shadow);
    position: sticky;
    bottom: 10px;
    z-index: 10;
}

.teledom-wizard-step-indicator {
    color: var(--tw-muted);
    font-size: 14px;
    text-align: left;
}

.teledom-wizard-step-indicator strong {
    color: var(--tw-fg);
}

/* ─── Buttons ─── */

.teledom-wizard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
    font-family: inherit;
    text-decoration: none;
}

.teledom-wizard-btn--primary {
    background: var(--tw-accent);
    color: #fff;
}
.teledom-wizard-btn--primary:hover {
    background: var(--tw-accent-dark);
}
.teledom-wizard-btn--primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.teledom-wizard-btn--ghost {
    background: #fff;
    color: var(--tw-muted);
    border-color: var(--tw-border);
}
.teledom-wizard-btn--ghost:hover {
    border-color: var(--tw-fg);
    color: var(--tw-fg);
}

/* ─── Summary step (final) ─── */

.teledom-wizard-step--summary .teledom-wizard-cart-review {
    background: #f9fafb;
    border: 1px solid var(--tw-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.teledom-wizard-cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.teledom-wizard-cart-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--tw-border);
    font-size: 14px;
}

.teledom-wizard-cart-list li:last-child {
    border-bottom: none;
}

.teledom-wizard-contact-form h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

/* Promo code UI reuses .promo-code-* classes from assets/css/public.css
 * (TeledomPromoCode module owns both the DOM and the visual layer).
 * Only add a little spacing around the promo section inside the wizard summary. */
.teledom-wizard-step--summary #promo-code-section {
    margin-bottom: 25px;
}

/* Discount line in the sticky sidebar — server-calculated discount comes from
 * TeledomPromoCode.getDiscountAmountWithVat() and we mirror it here. */
.teledom-wizard-summary-line.teledom-wizard-summary-discount {
    color: #155724;                              /* brand success dark */
    background: rgba(70, 180, 80, 0.08);         /* brand success tint */
    margin: 4px -8px;
    padding: 6px 8px;
    border-radius: 4px;
    border-bottom: none;
}

.teledom-wizard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
}

.teledom-wizard-field {
    display: flex;
    flex-direction: column;
}

.teledom-wizard-field--full {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.teledom-wizard-field label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--tw-fg);
}

.teledom-wizard-field input,
.teledom-wizard-field textarea,
.teledom-wizard-field select {
    padding: 10px 12px;
    border: 1px solid var(--tw-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    width: 100%;
}

.teledom-wizard-field input:focus,
.teledom-wizard-field textarea:focus {
    outline: 2px solid var(--tw-accent);
    outline-offset: -1px;
    border-color: var(--tw-accent);
}

/* ─── Success state ─── */

.teledom-wizard-success {
    text-align: center;
    padding: 60px 20px;
}

.teledom-wizard-success .dashicons {
    font-size: 72px;
    width: 72px;
    height: 72px;
    color: var(--tw-success);
}

.teledom-wizard-success h2 {
    margin: 20px 0 10px;
    font-size: 28px;
    color: var(--tw-fg);
}

.teledom-wizard-success p {
    font-size: 16px;
    color: var(--tw-muted);
    max-width: 500px;
    margin: 10px auto;
}

.teledom-wizard-empty {
    text-align: center;
    color: var(--tw-muted);
    padding: 40px 20px;
    font-size: 15px;
}

/* ─── Mobile ─── */

@media (max-width: 900px) {
    .teledom-wizard-progress-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .teledom-wizard-progress-item {
        min-width: 80px;
    }
    .teledom-wizard-progress-label {
        font-size: 11px;
    }
    .teledom-wizard-hero h1 {
        font-size: 26px;
    }
    .teledom-wizard-hero p {
        font-size: 15px;
    }
    .teledom-wizard-content {
        padding: 20px 15px;
    }
    .teledom-wizard-footer {
        flex-wrap: wrap;
        gap: 10px;
    }
    .teledom-wizard-step-indicator {
        order: -1;
        flex-basis: 100%;
        text-align: center;
    }
    .teledom-wizard-cart-toggle {
        flex: 1 1 100%;
        justify-content: center;
    }
    .teledom-wizard-cart-modal-dialog {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

@media (max-width: 500px) {
    .teledom-wizard-products {
        grid-template-columns: 1fr;
    }
    .teledom-wizard-step-title {
        font-size: 22px;
    }
}

/* ───────── Summary step — contact / billing / payment / GDPR ─────────
 * Most of the visual styling comes from public.css (.customer-type-option,
 * .payment-option, .terms-agreement etc., which are loaded on the wizard page
 * via enqueue_public_assets). These wizard-scoped rules just fix layout:
 * spacing between sections, responsive grid for radio options, and the
 * billing wrapper DOM-move that happens when customer_type switches. */
.teledom-wizard-step--summary .teledom-wizard-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--tw-border, #e0e0e0);
}
.teledom-wizard-step--summary .teledom-wizard-summary-basic {
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--tw-accent, #0073aa);
}
.teledom-wizard-step--summary .teledom-wizard-summary-basic h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--tw-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.teledom-wizard-step--summary .teledom-wizard-summary-basic p {
    margin: 4px 0;
    font-size: 14px;
}
.teledom-wizard-step--summary h3 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #333;
}
.teledom-wizard-step--summary h3 .dashicons {
    margin-right: 5px;
    color: var(--tw-accent, #0073aa);
}

/* Customer type options: 2 columns on desktop, stack on mobile */
.teledom-wizard-step--summary .customer-type-selection {
    margin-top: 0;                                /* first section shouldn't get double spacing */
    padding-top: 0;
    border-top: none;
}
.teledom-wizard-step--summary .customer-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .teledom-wizard-step--summary .customer-type-options {
        grid-template-columns: 1fr;
    }
}

/* Billing 2-col (zip + city) + 3-col (ico/dic/ic_dph) responsive grids */
.teledom-wizard-step--summary .teledom-wizard-row-2 {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 15px;
}
.teledom-wizard-step--summary .teledom-wizard-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}
@media (max-width: 600px) {
    .teledom-wizard-step--summary .teledom-wizard-row-2,
    .teledom-wizard-step--summary .teledom-wizard-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Form group basics — form-group class comes from public.css but we add
 * a thin wrapper to guarantee consistent spacing in the wizard context. */
.teledom-wizard-step--summary .form-group {
    margin-bottom: 12px;
}
.teledom-wizard-step--summary .form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: #333;
}
.teledom-wizard-step--summary .form-group input[type="text"],
.teledom-wizard-step--summary .form-group input[type="email"],
.teledom-wizard-step--summary .form-group input[type="tel"],
.teledom-wizard-step--summary .form-group select,
.teledom-wizard-step--summary .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tw-border, #e0e0e0);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.teledom-wizard-step--summary .form-group .field-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--tw-muted, #6b7280);
}
.teledom-wizard-step--summary .form-group .req {
    color: var(--tw-danger, #d63638);
}

/* Inline per-field error message — sits directly under the input/select so the
 * user sees exactly what's wrong without scrolling or reading a toast. Class
 * name mirrors public.js's `.field-error` (red border, styled in public.css)
 * so we don't need to duplicate that rule — just add the message styling. */
.teledom-wizard-step--summary .field-error-msg {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--tw-danger, #d63638);
    line-height: 1.3;
}
/* Swap the regular field-hint for the error message when both would be shown,
 * so two lines of small text don't stack under the input. */
.teledom-wizard-step--summary .form-group:has(.field-error-msg) .field-hint {
    display: none;
}

/* ───────── Footer-anchored notification host ─────────
 * Wizard re-uses the flat form's `.teledom-messages` styles from public.css
 * (colored blocks with border + shadow for .teledom-error / .teledom-success /
 * .teledom-info). This block only overrides positioning — the host is pinned
 * right above the sticky footer via JS-applied `position: fixed` so the
 * notification lands next to the button the user just clicked.
 *
 * Slide-up animation mirrors how flat-form notifications feel when they appear. */
@keyframes teledomWizardMsgSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.teledom-wizard-messages {
    animation: teledomWizardMsgSlideUp 0.22s ease-out;
}
/* Clicking on the notification (e.g. a link inside) should work, but the
 * gap area around it shouldn't eat clicks on underlying content. */
.teledom-wizard-messages > * {
    pointer-events: auto;
}

/* ───────── Summary items table (final step) ─────────
 * Mirrors flat-form's summary-table layout so the customer sees the same
 * review block they'd see in the flat checkout. Dense but readable. */
.teledom-wizard-summary-items {
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid var(--tw-border, #e0e0e0);
    border-radius: 8px;
}
.teledom-wizard-summary-items h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--tw-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.teledom-wizard-summary-items h4 .dashicons {
    color: var(--tw-accent, #0073aa);
    margin-right: 4px;
}
.teledom-wizard-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.teledom-wizard-summary-table th {
    padding: 8px 10px;
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 2px solid var(--tw-border, #e5e7eb);
}
.teledom-wizard-summary-table td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}
.teledom-wizard-summary-table .txt-left   { text-align: left; }
.teledom-wizard-summary-table .txt-center { text-align: center; }
.teledom-wizard-summary-table .txt-right  { text-align: right; }
.teledom-wizard-summary-table .summary-item-meta {
    display: block;
    color: var(--tw-muted, #6b7280);
    font-size: 11px;
    margin-top: 2px;
}
.teledom-wizard-summary-table .summary-total-row td {
    background: #dcfce7;
    border-bottom: none;
    padding: 12px 10px;
}
.teledom-wizard-summary-table .summary-grand-total {
    font-size: 16px;
    color: var(--tw-accent, #0073aa);
}

/* Mobile: stacked pseudo-card layout instead of horizontal scroll */
@media (max-width: 600px) {
    .teledom-wizard-summary-table {
        font-size: 12px;
    }
    .teledom-wizard-summary-table th,
    .teledom-wizard-summary-table td {
        padding: 6px 6px;
    }
}

/* ───────── Success screen icon + action buttons polish ─────────
 * Success-screen DOM reuses flat-form's class names (.success-icon,
 * .order-number-display, .success-actions, .btn-edit-order, .btn-new-order)
 * — base colors/hover comes from public.css. We scale down sizing here
 * because the flat-form values (padding 13-15px, font 16px) are designed
 * for the prominent standalone thank-you page, which is too big for the
 * compact wizard body. */

/* Scope all overrides under .teledom-wizard so we don't affect flat-form
 * pages. (.teledom-wizard is the wizard root class.) */
.teledom-wizard .success-actions {
    margin-top: 24px;
    gap: 10px;
}
.teledom-wizard .success-actions .btn-edit-order,
.teledom-wizard .success-actions .btn-new-order {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    padding: 9px 18px;                   /* was 13-15px 28-30px in public.css */
    font-size: 14px;                     /* was 16px */
    border-radius: 6px;
}
.teledom-wizard .success-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
/* Disable the translateY(-2px) hover "lift" — fine on the standalone page
 * but jarring on a compact success card. Keep the color change. */
.teledom-wizard .success-actions .btn-edit-order:hover,
.teledom-wizard .success-actions .btn-new-order:hover {
    transform: none;
}

/* GDPR block — link should stand out */
.teledom-wizard-step--summary .terms-agreement {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}
.teledom-wizard-step--summary .terms-agreement a {
    color: var(--tw-accent, #0073aa);
    text-decoration: underline;
}
