/* ============================================================
   MujPecovatel Design System - CSS Custom Properties & Base
   ============================================================ */

/* --- Design Tokens --- */
:root {
    /* Brand Colors */
    --mp-primary: #C62828;
    --mp-primary-light: #FFCDD2;
    --mp-primary-dark: #8E0000;
    --mp-on-primary: #FFFFFF;

    --mp-secondary: #37474F;
    --mp-secondary-light: #62727B;
    --mp-on-secondary: #FFFFFF;

    --mp-accent: #00796B;
    --mp-accent-light: #B2DFDB;
    --mp-on-accent: #FFFFFF;

    /* Semantic Colors */
    --mp-destructive: #D32F2F;
    --mp-warning: #F57F17;
    --mp-success: #2E7D32;
    --mp-info: #1565C0;

    /* Surfaces */
    --mp-background: #FAFAFA;
    --mp-surface: #FFFFFF;
    --mp-foreground: #212121;
    --mp-muted: #757575;
    --mp-border: #E0E0E0;

    /* Typography */
    --mp-font-heading: 'Figtree', system-ui, sans-serif;
    --mp-font-body: 'Noto Sans', system-ui, sans-serif;

    --mp-text-h1: 1.875rem;   /* 30px */
    --mp-text-h2: 1.5rem;     /* 24px */
    --mp-text-h3: 1.25rem;    /* 20px */
    --mp-text-body: 1rem;     /* 16px */
    --mp-text-small: 0.9375rem; /* 15px */
    --mp-text-caption: 0.8125rem; /* 13px */

    --mp-leading-tight: 1.3;
    --mp-leading-normal: 1.5;
    --mp-leading-relaxed: 1.75;

    /* Spacing (8px grid) */
    --mp-space-xs: 0.25rem;   /* 4px */
    --mp-space-sm: 0.5rem;    /* 8px */
    --mp-space-md: 1rem;      /* 16px */
    --mp-space-lg: 1.5rem;    /* 24px */
    --mp-space-xl: 2rem;      /* 32px */
    --mp-space-2xl: 3rem;     /* 48px */

    /* Border Radius */
    --mp-radius-sm: 0.5rem;   /* 8px */
    --mp-radius-md: 0.75rem;  /* 12px */
    --mp-radius-lg: 1rem;     /* 16px */
    --mp-radius-full: 9999px;

    /* Shadows (subtle, accessibility-friendly) */
    --mp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --mp-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --mp-transition-fast: 150ms ease-out;
    --mp-transition-normal: 250ms ease-out;

    /* Layout */
    --mp-content-max-width: 1200px;
    --mp-sidebar-width: 260px;
    --mp-bottom-nav-height: 4rem;   /* 64px */
    --mp-touch-target: 3rem;        /* 48px */

    /* Z-index scale */
    --mp-z-base: 0;
    --mp-z-dropdown: 10;
    --mp-z-sticky: 20;
    --mp-z-fixed: 30;
    --mp-z-modal-backdrop: 40;
    --mp-z-modal: 50;
    --mp-z-toast: 100;
}

/* --- Dark Mode ---
   Dark mode tokeny jsou pripraveny pod tridou .mp-theme-dark pro budouci
   explicitni prepinac. Aplikace zamerne NEreaguje na prefers-color-scheme,
   aby byl vychozi vzhled vzdy svetly. */
.mp-theme-dark {
    --mp-primary: #EF5350;
    --mp-primary-light: #4E1A1A;
    --mp-primary-dark: #FF8A80;
    --mp-on-primary: #FFFFFF;

    --mp-secondary: #B0BEC5;
    --mp-secondary-light: #78909C;

    --mp-accent: #4DB6AC;
    --mp-accent-light: #1A3B37;

    --mp-background: #121212;
    --mp-surface: #1E1E1E;
    --mp-foreground: #E0E0E0;
    --mp-muted: #9E9E9E;
    --mp-border: #333333;
}

/* --- CSS Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%; /* 16px base for rem calculations */
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--mp-font-body);
    font-size: var(--mp-text-body);
    line-height: var(--mp-leading-normal);
    color: var(--mp-foreground);
    background-color: var(--mp-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--mp-font-heading);
    line-height: var(--mp-leading-tight);
    margin-top: 0;
    color: var(--mp-foreground);
}

h1 {
    font-size: var(--mp-text-h1);
    font-weight: 700;
    margin-bottom: var(--mp-space-lg);
}

h2 {
    font-size: var(--mp-text-h2);
    font-weight: 600;
    margin-bottom: var(--mp-space-md);
}

h3 {
    font-size: var(--mp-text-h3);
    font-weight: 600;
    margin-bottom: var(--mp-space-md);
}

p {
    margin-top: 0;
    margin-bottom: var(--mp-space-md);
}

a:not(.mp-btn) {
    color: var(--mp-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:not(.mp-btn):hover {
    color: var(--mp-primary-dark);
}

/* --- Focus States (Accessibility) --- */
:focus-visible {
    outline: 3px solid var(--mp-primary);
    outline-offset: 2px;
    border-radius: var(--mp-radius-sm);
}

/* --- Skip Link --- */
.mp-skip-link {
    position: absolute;
    top: -100%;
    left: var(--mp-space-md);
    padding: var(--mp-space-sm) var(--mp-space-md);
    background: var(--mp-primary);
    color: var(--mp-on-primary);
    border-radius: var(--mp-radius-sm);
    font-weight: 500;
    z-index: var(--mp-z-toast);
    text-decoration: none;
}

.mp-skip-link:focus {
    top: var(--mp-space-sm);
}

/* ============================================================
   Layout
   ============================================================ */

/* --- App Shell --- */
.mp-app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.mp-main {
    flex: 1;
    padding: var(--mp-space-md);
    padding-bottom: calc(var(--mp-bottom-nav-height) + var(--mp-space-md));
    max-width: var(--mp-content-max-width);
    width: 100%;
    margin: 0 auto;
}

/* --- Sidebar (tablet/desktop) --- */
.mp-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--mp-sidebar-width);
    background: var(--mp-surface);
    border-right: 1px solid var(--mp-border);
    padding: var(--mp-space-lg) 0;
    z-index: var(--mp-z-fixed);
    overflow-y: auto;
}

.mp-sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    padding: 0 var(--mp-space-lg);
    margin-bottom: var(--mp-space-xl);
    text-decoration: none;
}

.mp-sidebar-brand img {
    width: 40px;
    height: 40px;
}

.mp-sidebar-brand span {
    font-family: var(--mp-font-heading);
    font-size: var(--mp-text-h3);
    font-weight: 700;
    color: var(--mp-primary);
}

.mp-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mp-sidebar-nav li {
    margin-bottom: var(--mp-space-xs);
}

.mp-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    padding: var(--mp-space-sm) var(--mp-space-lg);
    min-height: var(--mp-touch-target);
    color: var(--mp-muted);
    text-decoration: none;
    font-size: var(--mp-text-small);
    font-weight: 400;
    border-radius: 0;
    transition: background var(--mp-transition-fast), color var(--mp-transition-fast);
}

.mp-sidebar-nav a:hover {
    background: var(--mp-primary-light);
    color: var(--mp-foreground);
}

.mp-sidebar-nav a.active {
    color: var(--mp-primary);
    font-weight: 600;
    background: var(--mp-primary-light);
    border-right: 3px solid var(--mp-primary);
}

.mp-sidebar-nav a svg,
.mp-sidebar-nav a .mp-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* --- Bottom Navigation (mobile) --- */
.mp-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mp-bottom-nav-height);
    background: var(--mp-surface);
    border-top: 1px solid var(--mp-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: var(--mp-z-fixed);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mp-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: var(--mp-touch-target);
    min-height: var(--mp-touch-target);
    padding: var(--mp-space-xs);
    color: var(--mp-muted);
    text-decoration: none;
    font-size: var(--mp-text-caption);
    font-weight: 400;
    transition: color var(--mp-transition-fast);
}

.mp-bottom-nav a:hover {
    color: var(--mp-foreground);
}

.mp-bottom-nav a.active {
    color: var(--mp-primary);
    font-weight: 600;
}

.mp-bottom-nav a svg,
.mp-bottom-nav a .mp-icon {
    width: 24px;
    height: 24px;
}

/* --- Top Header (mobile) --- */
.mp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mp-space-sm) var(--mp-space-md);
    min-height: var(--mp-touch-target);
    background: var(--mp-surface);
    border-bottom: 1px solid var(--mp-border);
    position: sticky;
    top: 0;
    z-index: var(--mp-z-sticky);
}

.mp-header-title {
    font-family: var(--mp-font-heading);
    font-size: var(--mp-text-h3);
    font-weight: 700;
    color: var(--mp-primary);
    margin: 0;
}

/* --- Tablet/Desktop layout --- */
@media (min-width: 768px) {
    .mp-sidebar {
        display: flex;
        flex-direction: column;
    }

    .mp-bottom-nav {
        display: none;
    }

    .mp-header {
        display: none;
    }

    .mp-main {
        margin-left: var(--mp-sidebar-width);
        padding: var(--mp-space-xl);
        padding-bottom: var(--mp-space-xl);
    }
}

@media (min-width: 1024px) {
    .mp-main {
        padding: var(--mp-space-2xl);
    }
}

/* ============================================================
   Components
   ============================================================ */

/* --- Buttons --- */
.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mp-space-sm);
    min-height: var(--mp-touch-target);
    padding: var(--mp-space-sm) var(--mp-space-lg);
    font-family: var(--mp-font-body);
    font-size: var(--mp-text-small);
    font-weight: 500;
    line-height: var(--mp-leading-normal);
    border: 2px solid transparent;
    border-radius: var(--mp-radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--mp-transition-fast),
                border-color var(--mp-transition-fast),
                color var(--mp-transition-fast);
    white-space: nowrap;
}

.mp-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mp-btn-primary {
    background: var(--mp-primary);
    color: var(--mp-on-primary);
    border-color: var(--mp-primary);
}

.mp-btn-primary:hover:not(:disabled) {
    background: var(--mp-primary-dark);
    border-color: var(--mp-primary-dark);
    color: var(--mp-on-primary);
}

.mp-btn-secondary {
    background: transparent;
    color: var(--mp-secondary);
    border-color: var(--mp-secondary);
}

.mp-btn-secondary:hover:not(:disabled) {
    background: var(--mp-secondary);
    color: var(--mp-on-secondary);
}

.mp-btn-accent {
    background: var(--mp-accent);
    color: var(--mp-on-accent);
    border-color: var(--mp-accent);
}

.mp-btn-accent:hover:not(:disabled) {
    background: #00695C;
    border-color: #00695C;
    color: var(--mp-on-accent);
}

.mp-btn-danger {
    background: var(--mp-destructive);
    color: #FFFFFF;
    border-color: var(--mp-destructive);
}

.mp-btn-danger:hover:not(:disabled) {
    background: #B71C1C;
    border-color: #B71C1C;
    color: #FFFFFF;
}

.mp-btn-ghost {
    background: transparent;
    color: var(--mp-foreground);
    border-color: transparent;
}

.mp-btn-ghost:hover:not(:disabled) {
    background: var(--mp-border);
    color: var(--mp-foreground);
}

.mp-btn-lg {
    min-height: 3.5rem;
    padding: var(--mp-space-md) var(--mp-space-xl);
    font-size: var(--mp-text-body);
}

.mp-btn-sm {
    min-height: 2.5rem;
    padding: var(--mp-space-xs) var(--mp-space-md);
    font-size: var(--mp-text-caption);
}

.mp-btn-block {
    width: 100%;
}

/* --- Cards --- */
.mp-card {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: var(--mp-space-lg);
}

.mp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--mp-space-md);
}

.mp-card-title {
    font-family: var(--mp-font-heading);
    font-size: var(--mp-text-h3);
    font-weight: 600;
    margin: 0;
}

.mp-card-body {
    font-size: var(--mp-text-body);
}

.mp-card-footer {
    margin-top: var(--mp-space-md);
    padding-top: var(--mp-space-md);
    border-top: 1px solid var(--mp-border);
    display: flex;
    gap: var(--mp-space-sm);
}

/* --- Status Badge --- */
.mp-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--mp-space-xs);
    padding: var(--mp-space-xs) var(--mp-space-sm);
    font-size: var(--mp-text-caption);
    font-weight: 500;
    border-radius: var(--mp-radius-full);
    line-height: 1;
}

.mp-badge-success {
    background: #E8F5E9;
    color: var(--mp-success);
}

.mp-badge-warning {
    background: #FFF8E1;
    color: #E65100;
}

.mp-badge-danger {
    background: #FFEBEE;
    color: var(--mp-destructive);
}

.mp-badge-info {
    background: #E3F2FD;
    color: var(--mp-info);
}

.mp-badge-neutral {
    background: #F5F5F5;
    color: var(--mp-muted);
}

/* Status dot inside badge */
.mp-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--mp-radius-full);
    flex-shrink: 0;
}

.mp-badge-success .mp-badge-dot {
    background: var(--mp-success);
}

.mp-badge-warning .mp-badge-dot {
    background: var(--mp-warning);
}

.mp-badge-danger .mp-badge-dot {
    background: var(--mp-destructive);
}

/* --- Alerts --- */
.mp-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-space-sm);
    padding: var(--mp-space-md);
    border-radius: var(--mp-radius-md);
    font-size: var(--mp-text-body);
    border: 1px solid;
}

.mp-alert-success {
    background: #E8F5E9;
    border-color: #A5D6A7;
    color: #1B5E20;
}

.mp-alert-warning {
    background: #FFF8E1;
    border-color: #FFE082;
    color: #E65100;
}

.mp-alert-danger {
    background: #FFEBEE;
    border-color: #EF9A9A;
    color: #B71C1C;
}

.mp-alert-info {
    background: #E3F2FD;
    border-color: #90CAF9;
    color: #0D47A1;
}

/* --- Form Elements --- */
.mp-form-group {
    margin-bottom: var(--mp-space-md);
}

.mp-label {
    display: block;
    font-size: var(--mp-text-small);
    font-weight: 500;
    color: var(--mp-foreground);
    margin-bottom: var(--mp-space-xs);
}

.mp-input {
    display: block;
    width: 100%;
    min-height: var(--mp-touch-target);
    padding: var(--mp-space-sm) var(--mp-space-md);
    font-family: var(--mp-font-body);
    font-size: var(--mp-text-body);
    color: var(--mp-foreground);
    background: var(--mp-surface);
    border: 2px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    transition: border-color var(--mp-transition-fast);
}

.mp-input::placeholder {
    color: var(--mp-muted);
}

.mp-input:focus {
    outline: none;
    border-color: var(--mp-primary);
    box-shadow: 0 0 0 3px var(--mp-primary-light);
}

.mp-input.mp-input-error {
    border-color: var(--mp-destructive);
}

.mp-input.mp-input-error:focus {
    box-shadow: 0 0 0 3px #FFCDD2;
}

.mp-helper-text {
    font-size: var(--mp-text-caption);
    color: var(--mp-muted);
    margin-top: var(--mp-space-xs);
}

.mp-error-text {
    font-size: var(--mp-text-caption);
    color: var(--mp-destructive);
    margin-top: var(--mp-space-xs);
    display: flex;
    align-items: center;
    gap: var(--mp-space-xs);
}

/* --- Loading Spinner --- */
.mp-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--mp-border);
    border-top-color: var(--mp-primary);
    border-radius: var(--mp-radius-full);
    animation: mp-spin 0.8s linear infinite;
}

.mp-spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.mp-spinner--inline {
    width: 20px;
    height: 20px;
    border-width: 2px;
    border-top-color: currentColor;
}

@keyframes mp-spin {
    to { transform: rotate(360deg); }
}

/* --- Page Loading (centered) --- */
.mp-page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: var(--mp-space-md);
    color: var(--mp-muted);
}

/* --- Empty State --- */
.mp-empty-state {
    text-align: center;
    padding: var(--mp-space-2xl) var(--mp-space-md);
    color: var(--mp-muted);
}

.mp-empty-state svg,
.mp-empty-state .mp-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--mp-space-md);
    opacity: 0.5;
}

.mp-empty-state h3 {
    color: var(--mp-foreground);
    margin-bottom: var(--mp-space-sm);
}

/* --- Utility Classes --- */
.mp-text-primary { color: var(--mp-primary); }
.mp-text-success { color: var(--mp-success); }
.mp-text-warning { color: var(--mp-warning); }
.mp-text-danger { color: var(--mp-destructive); }
.mp-text-muted { color: var(--mp-muted); }
.mp-text-accent { color: var(--mp-accent); }

.mp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Grid Layout helpers --- */
.mp-grid {
    display: grid;
    gap: var(--mp-space-md);
}

.mp-grid-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .mp-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   Blazor-specific overrides
   ============================================================ */

/* Blazor validation */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid var(--mp-success);
    outline-offset: -2px;
}

.invalid {
    outline: 2px solid var(--mp-destructive);
    outline-offset: -2px;
}

.validation-message {
    color: var(--mp-destructive);
    font-size: var(--mp-text-caption);
    margin-top: var(--mp-space-xs);
}

/* Blazor error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: #FFF8E1;
    bottom: 0;
    box-shadow: var(--mp-shadow-md);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: var(--mp-space-md);
    position: fixed;
    width: 100%;
    z-index: var(--mp-z-toast);
    color: #E65100;
    font-size: var(--mp-text-body);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: var(--mp-space-md);
    top: var(--mp-space-sm);
}

.blazor-error-boundary {
    background: #FFEBEE;
    padding: var(--mp-space-md);
    color: var(--mp-destructive);
    border-radius: var(--mp-radius-md);
    border: 1px solid #EF9A9A;
}

.blazor-error-boundary::after {
    content: "Doslo k chybe."
}

/* Blazor loading screen */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--mp-border);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--mp-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-family: var(--mp-font-body);
    font-weight: 600;
    color: var(--mp-foreground);
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Nacitani...");
}

/* ============================================================
   Auth Forms
   ============================================================ */

/* --- Auth Card (centered form card rendered inside MainLayout) --- */
.mp-auth-card {
    width: 100%;
    max-width: 440px;
    margin: var(--mp-space-md) auto;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    padding: var(--mp-space-lg);
}

@media (min-width: 768px) {
    .mp-auth-card {
        margin: var(--mp-space-xl) auto;
        padding: var(--mp-space-xl);
    }
}

.mp-auth-card__header {
    margin-bottom: var(--mp-space-lg);
}

.mp-auth-card__title {
    font-size: var(--mp-text-h2);
    font-weight: 700;
    margin: 0 0 var(--mp-space-xs);
}

.mp-auth-card__subtitle {
    margin: 0;
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
    line-height: var(--mp-leading-relaxed);
}

.mp-auth-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-md);
}

.mp-auth-card__footer {
    margin-top: var(--mp-space-lg);
    padding-top: var(--mp-space-md);
    border-top: 1px solid var(--mp-border);
    text-align: center;
    font-size: var(--mp-text-small);
}

.mp-auth-card__footer p {
    margin: 0;
}

.mp-auth-card__footer .mp-btn {
    margin-top: var(--mp-space-sm);
}

.mp-auth-card__link-row {
    text-align: right;
    margin: 0;
    font-size: var(--mp-text-small);
}

/* --- Auth success state body --- */
.mp-auth-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--mp-space-md);
    padding: var(--mp-space-md) 0;
}

.mp-auth-success p {
    margin: 0;
    line-height: var(--mp-leading-relaxed);
}

/* --- Form check (checkbox row) --- */
.mp-form-check {
    margin-bottom: var(--mp-space-md);
}

.mp-form-check__label {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-space-sm);
    cursor: pointer;
    font-size: var(--mp-text-small);
    line-height: var(--mp-leading-normal);
    color: var(--mp-foreground);
}

.mp-form-check__input {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--mp-primary);
    cursor: pointer;
}

.mp-form-check__label:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Link-style button --- */
.mp-btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--mp-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    font: inherit;
    cursor: pointer;
}

.mp-btn-link:hover {
    color: var(--mp-primary-dark);
}

/* --- Turnstile placeholder --- */
.mp-turnstile-placeholder {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    min-height: 65px;
    padding: var(--mp-space-sm) var(--mp-space-md);
    background: var(--mp-background);
    border: 2px dashed var(--mp-border);
    border-radius: var(--mp-radius-sm);
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
}

.mp-turnstile-placeholder__note {
    display: block;
    font-size: var(--mp-text-caption);
    color: var(--mp-muted);
}

/* ============================================================
   Public Header (anonymous users)
   ============================================================ */

.mp-header--public {
    display: flex;
}

.mp-header__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--mp-space-sm);
    text-decoration: none;
    color: var(--mp-primary);
}

.mp-header__brand:hover {
    color: var(--mp-primary-dark);
}

.mp-header__actions {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
}

.mp-main--public {
    padding-bottom: var(--mp-space-xl);
}

/* Stranky s auth kartou (login, registrace, zapomenute heslo, ...) vyzaduji
   vertikalni vycentrovani karty, aby nevypadala osamocene nahore na stranky. */
.mp-main--public:has(> .mp-auth-card) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: var(--mp-space-xl);
}

@media (min-width: 768px) {
    .mp-header--public {
        display: flex;
        padding: var(--mp-space-md) var(--mp-space-xl);
    }

    .mp-main--public {
        margin-left: 0;
    }
}

/* ============================================================
   Sidebar user footer
   ============================================================ */

.mp-sidebar-user {
    margin-top: auto;
    padding: var(--mp-space-md) var(--mp-space-lg);
    border-top: 1px solid var(--mp-border);
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-sm);
}

.mp-sidebar-user__info {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    font-size: var(--mp-text-small);
    color: var(--mp-muted);
    word-break: break-all;
}

/* ============================================================
   Checkout wizard
   ============================================================ */

.mp-checkout {
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-lg);
    max-width: 1100px;
    margin: 0 auto;
}

.mp-checkout__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mp-space-lg);
}

@media (min-width: 1024px) {
    .mp-checkout__grid {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }
}

.mp-checkout__main {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    padding: var(--mp-space-lg);
    box-shadow: var(--mp-shadow-sm);
}

@media (min-width: 768px) {
    .mp-checkout__main {
        padding: var(--mp-space-xl);
    }
}

.mp-checkout__side {
    position: sticky;
    top: var(--mp-space-lg);
}

.mp-checkout__error {
    margin-top: var(--mp-space-md);
}

.mp-checkout__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mp-space-sm);
    justify-content: flex-end;
    align-items: center;
    margin-top: var(--mp-space-xl);
    padding-top: var(--mp-space-lg);
    border-top: 1px solid var(--mp-border);
}

/* --- Stepper --- */

.mp-stepper {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    padding: var(--mp-space-md) var(--mp-space-md);
    box-shadow: var(--mp-shadow-sm);
}

.mp-stepper__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--mp-space-xs);
    overflow-x: auto;
    scrollbar-width: none;
}

.mp-stepper__list::-webkit-scrollbar { display: none; }

.mp-stepper__item {
    flex: 1 0 auto;
    min-width: 52px;
    position: relative;
}

.mp-stepper__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 22px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: var(--mp-border);
}

.mp-stepper__item--done:not(:last-child)::after {
    background: var(--mp-success);
}

.mp-stepper__button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mp-space-xs);
    background: transparent;
    border: none;
    padding: var(--mp-space-xs);
    cursor: default;
    width: 100%;
    color: var(--mp-muted);
    text-decoration: none;
    font-family: var(--mp-font-body);
}

button.mp-stepper__button {
    cursor: pointer;
}

.mp-stepper__marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--mp-radius-full);
    background: var(--mp-surface);
    border: 2px solid var(--mp-border);
    font-weight: 600;
    font-size: var(--mp-text-small);
    color: var(--mp-muted);
    position: relative;
    z-index: 1;
    transition: all var(--mp-transition-fast);
}

.mp-stepper__item--current .mp-stepper__marker {
    background: var(--mp-primary);
    border-color: var(--mp-primary);
    color: var(--mp-on-primary);
}

.mp-stepper__item--done .mp-stepper__marker {
    background: var(--mp-success);
    border-color: var(--mp-success);
    color: #fff;
}

.mp-stepper__label {
    display: none;
    font-size: var(--mp-text-caption);
    text-align: center;
    color: var(--mp-muted);
    white-space: nowrap;
}

.mp-stepper__item--current .mp-stepper__label {
    color: var(--mp-foreground);
    font-weight: 600;
}

.mp-stepper__item--done .mp-stepper__label {
    color: var(--mp-success);
}

.mp-stepper__mobile-caption {
    margin: var(--mp-space-sm) 0 0;
    text-align: center;
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
}

@media (min-width: 768px) {
    .mp-stepper {
        padding: var(--mp-space-md) var(--mp-space-lg);
    }

    .mp-stepper__label {
        display: block;
    }

    .mp-stepper__mobile-caption {
        display: none;
    }
}

/* --- Step content --- */

.mp-step__header {
    margin-bottom: var(--mp-space-lg);
}

.mp-step__title {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    margin-bottom: var(--mp-space-sm);
}

.mp-step__lead {
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
    max-width: 62ch;
    margin: 0;
}

/* --- Form helpers --- */

.mp-form {
    display: flex;
    flex-direction: column;
}

.mp-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mp-space-md);
    margin-bottom: var(--mp-space-md);
}

@media (min-width: 640px) {
    .mp-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mp-form-group--wide {
        grid-column: 1 / -1;
    }
}

.mp-form-section-title {
    font-size: var(--mp-text-h3);
    margin-top: var(--mp-space-lg);
    margin-bottom: var(--mp-space-md);
    padding-top: var(--mp-space-md);
    border-top: 1px solid var(--mp-border);
}

.mp-form-section-gap {
    margin-top: var(--mp-space-md);
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    cursor: pointer;
}

.mp-textarea {
    resize: vertical;
    min-height: 90px;
    font-family: var(--mp-font-body);
}

.mp-label__optional {
    color: var(--mp-muted);
    font-weight: 400;
    font-size: var(--mp-text-caption);
}

.mp-label__required {
    color: var(--mp-primary);
    margin-left: 2px;
    font-weight: 700;
}

/* Read-only zamcene pole (napr. zeme). Vypada jako input, ale ma ikonu zamku
   a tlumenejsi pozadi, aby uzivatel na prvni pohled videl, ze se nedá menit. */
.mp-input--locked {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    background: var(--mp-background);
    color: var(--mp-muted);
    cursor: not-allowed;
    user-select: none;
}

.mp-input--locked span {
    color: var(--mp-foreground);
    font-weight: 500;
}

.mp-helper-text {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-space-xs);
    color: var(--mp-muted);
    font-size: var(--mp-text-caption);
    margin: var(--mp-space-xs) 0 0;
}

/* --- Cart list (Step 1) --- */

.mp-cart-list {
    list-style: none;
    margin: 0 0 var(--mp-space-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-md);
}

.mp-cart-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: var(--mp-space-md);
    padding: var(--mp-space-md);
    background: var(--mp-background);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
}

.mp-cart-line__image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--mp-radius-sm);
    background: var(--mp-surface);
}

.mp-cart-line__body {
    min-width: 0;
}

.mp-cart-line__name {
    margin: 0 0 var(--mp-space-xs);
    font-size: var(--mp-text-h3);
}

.mp-cart-line__unit {
    margin: 0 0 var(--mp-space-sm);
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
}

.mp-cart-line__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mp-space-sm);
    align-items: center;
}

.mp-cart-line__total {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-xs);
    font-variant-numeric: tabular-nums;
}

.mp-cart-line__total-label {
    font-size: var(--mp-text-caption);
    color: var(--mp-muted);
}

.mp-cart-line__total-value {
    font-size: var(--mp-text-h3);
    font-weight: 600;
    color: var(--mp-foreground);
}

.mp-cart-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--mp-space-md);
    padding: var(--mp-space-md);
    border-top: 1px solid var(--mp-border);
    margin-top: var(--mp-space-lg);
}

.mp-cart-footer__hint {
    display: flex;
    align-items: center;
    gap: var(--mp-space-xs);
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
}

.mp-cart-footer__subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-variant-numeric: tabular-nums;
}

.mp-cart-footer__subtotal strong {
    font-size: var(--mp-text-h2);
    font-weight: 700;
}

/* --- Quantity stepper --- */

.mp-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    background: var(--mp-surface);
    overflow: hidden;
}

.mp-qty-stepper__btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-surface);
    border: none;
    color: var(--mp-foreground);
    cursor: pointer;
    transition: background var(--mp-transition-fast);
}

.mp-qty-stepper__btn:hover:not(:disabled) {
    background: var(--mp-primary-light);
}

.mp-qty-stepper__btn:disabled {
    color: var(--mp-border);
    cursor: not-allowed;
}

.mp-qty-stepper__value {
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: 0 var(--mp-space-xs);
}

/* --- Empty state card --- */

.mp-empty-state--card {
    background: var(--mp-background);
    border: 1px dashed var(--mp-border);
    border-radius: var(--mp-radius-lg);
    padding: var(--mp-space-2xl) var(--mp-space-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mp-space-sm);
}

.mp-empty-state--card h3 {
    margin: var(--mp-space-sm) 0 0;
}

.mp-empty-state--card p {
    color: var(--mp-muted);
    margin: 0 0 var(--mp-space-md);
}

/* --- Recipient card (Step 3) --- */

.mp-recipient-card {
    background: var(--mp-background);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: var(--mp-space-lg);
    margin-bottom: var(--mp-space-md);
}

.mp-recipient-card__header {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    margin-bottom: var(--mp-space-md);
}

.mp-recipient-card__title {
    margin: 0;
    font-size: var(--mp-text-h3);
}

/* --- Radio cards (Step 4, Step 5) --- */

.mp-radio-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mp-space-md);
    margin-bottom: var(--mp-space-lg);
}

@media (min-width: 640px) {
    .mp-radio-cards {
        grid-template-columns: 1fr 1fr;
    }

    .mp-radio-cards--dense {
        grid-template-columns: 1fr 1fr;
    }
}

.mp-radio-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--mp-space-md);
    padding: var(--mp-space-md);
    background: var(--mp-surface);
    border: 2px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    cursor: pointer;
    min-height: 88px;
    transition: all var(--mp-transition-fast);
}

.mp-radio-card:hover {
    border-color: var(--mp-primary-light);
    background: var(--mp-background);
}

.mp-radio-card--selected {
    border-color: var(--mp-primary);
    background: var(--mp-primary-light);
}

.mp-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mp-radio-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--mp-radius-md);
    background: var(--mp-background);
    color: var(--mp-primary);
}

.mp-radio-card--selected .mp-radio-card__icon {
    background: var(--mp-surface);
}

.mp-radio-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mp-radio-card__title {
    font-weight: 600;
    font-size: var(--mp-text-body);
    display: inline-flex;
    align-items: center;
    gap: var(--mp-space-xs);
    flex-wrap: wrap;
}

.mp-radio-card__desc {
    font-size: var(--mp-text-caption);
    color: var(--mp-muted);
    line-height: var(--mp-leading-normal);
}

.mp-radio-card__price {
    font-weight: 700;
    font-size: var(--mp-text-h3);
    color: var(--mp-foreground);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mp-radio-card__price small {
    display: block;
    font-size: var(--mp-text-caption);
    font-weight: 400;
    color: var(--mp-muted);
}

/* --- Pickup point slot --- */

.mp-pickup-slot {
    margin-bottom: var(--mp-space-lg);
}

.mp-pickup-empty {
    background: var(--mp-background);
    border: 1px dashed var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: var(--mp-space-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--mp-space-sm);
}

.mp-pickup-empty p {
    margin: 0;
    color: var(--mp-muted);
}

.mp-pickup-chosen {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-space-sm);
    padding: var(--mp-space-md);
    background: var(--mp-primary-light);
    border-radius: var(--mp-radius-md);
}

.mp-pickup-chosen__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-size: var(--mp-text-small);
}

.mp-pickup-chosen__text strong {
    font-size: var(--mp-text-body);
}

/* --- Modal --- */

.mp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: var(--mp-z-modal-backdrop);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: mp-fade-in var(--mp-transition-fast);
}

@media (min-width: 768px) {
    .mp-modal-backdrop {
        align-items: center;
        padding: var(--mp-space-lg);
    }
}

.mp-modal {
    background: var(--mp-surface);
    border-top-left-radius: var(--mp-radius-lg);
    border-top-right-radius: var(--mp-radius-lg);
    width: 100%;
    max-width: 640px;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    z-index: var(--mp-z-modal);
    animation: mp-slide-up var(--mp-transition-normal);
}

@media (min-width: 768px) {
    .mp-modal {
        border-radius: var(--mp-radius-lg);
        animation: mp-fade-in var(--mp-transition-normal);
    }
}

.mp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mp-space-md) var(--mp-space-lg);
    border-bottom: 1px solid var(--mp-border);
}

.mp-modal__title {
    margin: 0;
    font-size: var(--mp-text-h3);
}

.mp-modal__close {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--mp-muted);
    border-radius: var(--mp-radius-full);
}

.mp-modal__close:hover {
    background: var(--mp-background);
    color: var(--mp-foreground);
}

.mp-modal__body {
    padding: var(--mp-space-lg);
    overflow-y: auto;
    flex: 1;
}

.mp-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--mp-space-sm);
    padding: var(--mp-space-md) var(--mp-space-lg);
    border-top: 1px solid var(--mp-border);
    background: var(--mp-background);
}

@keyframes mp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mp-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* --- Pickup modal internals --- */

.mp-pickup-modal__search {
    margin-bottom: var(--mp-space-md);
}

.mp-pickup-modal__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mp-space-sm);
    padding: var(--mp-space-xl) 0;
    color: var(--mp-muted);
    text-align: center;
}

.mp-pickup-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-sm);
}

.mp-pickup-item {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--mp-space-md);
    padding: var(--mp-space-md);
    background: var(--mp-surface);
    border: 2px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    cursor: pointer;
    text-align: left;
    font-family: var(--mp-font-body);
    min-height: var(--mp-touch-target);
}

.mp-pickup-item:hover {
    border-color: var(--mp-primary-light);
}

.mp-pickup-item--selected {
    border-color: var(--mp-primary);
    background: var(--mp-primary-light);
}

.mp-pickup-item__icon {
    color: var(--mp-primary);
}

.mp-pickup-item__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mp-pickup-item__name {
    font-weight: 600;
}

.mp-pickup-item__address,
.mp-pickup-item__hours {
    font-size: var(--mp-text-caption);
    color: var(--mp-muted);
}

/* --- Switch / auto-topup --- */

.mp-switch {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-space-md);
    padding: var(--mp-space-md);
    background: var(--mp-background);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    cursor: pointer;
    margin-bottom: var(--mp-space-lg);
    min-height: var(--mp-touch-target);
}

.mp-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mp-switch__track {
    flex-shrink: 0;
    width: 52px;
    height: 30px;
    background: var(--mp-border);
    border-radius: var(--mp-radius-full);
    position: relative;
    transition: background var(--mp-transition-fast);
    margin-top: 2px;
}

.mp-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: var(--mp-radius-full);
    box-shadow: var(--mp-shadow-sm);
    transition: transform var(--mp-transition-fast);
}

.mp-switch input:checked + .mp-switch__track {
    background: var(--mp-primary);
}

.mp-switch input:checked + .mp-switch__track::after {
    transform: translateX(22px);
}

.mp-switch__text {
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-xs);
    font-size: var(--mp-text-small);
}

.mp-switch__text strong {
    color: var(--mp-foreground);
}

.mp-switch__text small {
    color: var(--mp-muted);
    font-size: var(--mp-text-caption);
    line-height: var(--mp-leading-normal);
}

/* --- Review sections (Step 6) --- */

.mp-review-section {
    background: var(--mp-background);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: var(--mp-space-md) var(--mp-space-lg);
    margin-bottom: var(--mp-space-md);
}

.mp-review-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mp-space-sm);
    margin-bottom: var(--mp-space-sm);
}

.mp-review-section__header h2 {
    margin: 0;
    font-size: var(--mp-text-h3);
}

.mp-review-section__edit {
    display: inline-flex;
    align-items: center;
    gap: var(--mp-space-xs);
    background: transparent;
    border: none;
    color: var(--mp-primary);
    font-weight: 600;
    font-size: var(--mp-text-small);
    cursor: pointer;
    padding: var(--mp-space-xs) var(--mp-space-sm);
    border-radius: var(--mp-radius-sm);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mp-review-section__edit:hover {
    background: var(--mp-primary-light);
}

.mp-review-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-xs);
}

.mp-review-list li {
    display: flex;
    justify-content: space-between;
    gap: var(--mp-space-sm);
}

.mp-review-list__value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.mp-review-text {
    margin: 0;
    font-size: var(--mp-text-small);
    line-height: var(--mp-leading-relaxed);
}

.mp-review-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--mp-space-md) var(--mp-space-lg);
    background: var(--mp-primary-light);
    border: 2px solid var(--mp-primary);
    border-radius: var(--mp-radius-md);
    margin: var(--mp-space-lg) 0;
}

.mp-review-total span:first-child {
    font-size: var(--mp-text-h3);
    font-weight: 600;
}

.mp-review-total__num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mp-primary-dark);
    font-variant-numeric: tabular-nums;
}

.mp-consent-list {
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-md);
    margin-top: var(--mp-space-lg);
}

.mp-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-space-sm);
    cursor: pointer;
    font-size: var(--mp-text-small);
    line-height: var(--mp-leading-relaxed);
    min-height: var(--mp-touch-target);
    padding: var(--mp-space-xs) 0;
}

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

/* --- Cart summary aside --- */

.mp-summary {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    overflow: hidden;
    box-shadow: var(--mp-shadow-sm);
}

.mp-summary__header {
    padding: var(--mp-space-md) var(--mp-space-lg);
    border-bottom: 1px solid var(--mp-border);
    background: var(--mp-background);
}

.mp-summary__title {
    display: flex;
    align-items: center;
    gap: var(--mp-space-sm);
    margin: 0;
    font-size: var(--mp-text-h3);
}

.mp-summary__body {
    padding: var(--mp-space-md) var(--mp-space-lg);
}

.mp-summary__empty {
    margin: 0;
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
}

.mp-summary__items {
    list-style: none;
    margin: 0 0 var(--mp-space-md);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-sm);
}

.mp-summary__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--mp-space-sm);
    align-items: center;
    font-size: var(--mp-text-caption);
}

.mp-summary__item img {
    border-radius: var(--mp-radius-sm);
    background: var(--mp-background);
}

.mp-summary__item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mp-summary__item-name {
    font-weight: 600;
    color: var(--mp-foreground);
    font-size: var(--mp-text-small);
}

.mp-summary__item-qty {
    color: var(--mp-muted);
}

.mp-summary__item-total {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mp-summary__rows {
    border-top: 1px solid var(--mp-border);
    padding-top: var(--mp-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-xs);
}

.mp-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--mp-text-small);
}

.mp-summary__row small {
    color: var(--mp-muted);
    font-size: var(--mp-text-caption);
    display: block;
}

.mp-summary__num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.mp-summary__pending {
    color: var(--mp-muted);
    font-style: normal;
    font-weight: 400;
    font-size: var(--mp-text-caption);
}

.mp-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--mp-space-md);
    padding-top: var(--mp-space-md);
    border-top: 2px solid var(--mp-border);
    font-size: var(--mp-text-h3);
    font-weight: 700;
}

.mp-summary__total-num {
    font-variant-numeric: tabular-nums;
    color: var(--mp-primary-dark);
}

/* --- Success screen --- */

.mp-order-success {
    max-width: 640px;
    margin: var(--mp-space-xl) auto;
    text-align: center;
    padding: var(--mp-space-xl);
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    box-shadow: var(--mp-shadow-sm);
}

.mp-order-success__badge {
    width: 96px;
    height: 96px;
    margin: 0 auto var(--mp-space-md);
    border-radius: var(--mp-radius-full);
    background: rgba(46, 125, 50, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mp-success);
}

.mp-order-success__lead {
    color: var(--mp-muted);
    font-size: var(--mp-text-h3);
    margin-bottom: var(--mp-space-xl);
}

.mp-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-md);
    text-align: left;
    margin-bottom: var(--mp-space-xl);
}

.mp-timeline__step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--mp-space-md);
    align-items: start;
    padding: var(--mp-space-md);
    background: var(--mp-background);
    border-radius: var(--mp-radius-md);
}

.mp-timeline__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-primary-light);
    color: var(--mp-primary-dark);
    border-radius: var(--mp-radius-full);
}

.mp-timeline__text h2 {
    margin: 0 0 var(--mp-space-xs);
    font-size: var(--mp-text-body);
}

.mp-timeline__text p {
    margin: 0;
    font-size: var(--mp-text-small);
    color: var(--mp-muted);
    line-height: var(--mp-leading-relaxed);
}

.mp-order-success__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mp-space-sm);
    justify-content: center;
}

/* Hide nav on checkout pages to avoid distraction */
.mp-app:has(.mp-checkout) .mp-bottom-nav,
.mp-app:has(.mp-order-success) .mp-bottom-nav {
    display: none;
}

.mp-app:has(.mp-checkout) .mp-main,
.mp-app:has(.mp-order-success) .mp-main {
    padding-bottom: var(--mp-space-xl);
}

/* ============================================================
   Catalog & Watch Card
   ============================================================ */

.mp-catalog-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--mp-space-md);
    padding: var(--mp-space-md) var(--mp-space-lg);
    background: var(--mp-primary-light);
    border-radius: var(--mp-radius-md);
    margin-top: var(--mp-space-md);
}

.mp-catalog-notice__text {
    flex: 1 1 260px;
}

.mp-catalog-notice__text strong {
    display: block;
    color: var(--mp-primary-dark);
    margin-bottom: var(--mp-space-xs);
}

.mp-catalog-notice__text p {
    margin: 0;
    color: #6A1B1B;
    font-size: var(--mp-text-small);
}

.mp-catalog-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mp-space-sm);
}

/* --- Watch card --- */
.mp-watch-card {
    display: flex;
    flex-direction: column;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    overflow: hidden;
    transition: border-color var(--mp-transition-fast);
}

.mp-watch-card:hover {
    border-color: var(--mp-primary-light);
}

.mp-watch-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--mp-background);
    overflow: hidden;
}

.mp-watch-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-watch-card__content {
    flex: 1;
    padding: var(--mp-space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-sm);
}

.mp-watch-card__name {
    font-size: var(--mp-text-h3);
    font-weight: 600;
    margin: 0;
}

.mp-watch-card__tagline {
    margin: 0;
    color: var(--mp-muted);
    font-size: var(--mp-text-small);
}

.mp-watch-card__price {
    display: flex;
    align-items: baseline;
    gap: var(--mp-space-xs);
    margin: var(--mp-space-xs) 0 0;
}

.mp-watch-card__price-value {
    font-family: var(--mp-font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mp-primary);
    font-variant-numeric: tabular-nums;
}

.mp-watch-card__price-currency {
    font-size: var(--mp-text-small);
    color: var(--mp-muted);
    font-weight: 500;
}

.mp-watch-card__description {
    margin: 0;
    line-height: var(--mp-leading-relaxed);
    color: var(--mp-foreground);
    font-size: var(--mp-text-small);
}

.mp-watch-card__features {
    list-style: none;
    margin: var(--mp-space-sm) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mp-space-xs);
}

.mp-watch-card__features li {
    display: flex;
    align-items: flex-start;
    gap: var(--mp-space-sm);
    font-size: var(--mp-text-small);
    line-height: var(--mp-leading-normal);
}

.mp-watch-card__features li svg,
.mp-watch-card__features li .mp-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.mp-watch-card__cta {
    padding: 0 var(--mp-space-lg) var(--mp-space-lg);
}
