/* =============================================================================
   VdS GeoRiskReport - Design Tokens
   Brand blue + DINOT typeface, aligned with vds.de
   ============================================================================= */

@font-face {
    font-family: 'DINOT-Regular';
    src: url('../fonts/DINOT-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DINOT-Bold';
    src: url('../fonts/DINOT-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #003e90;
    --color-primary-dark: #002c68;
    --color-primary-light: #e8f0fb;
    --color-accent: #2598d5;
    --color-text: #1f2429;
    --color-text-muted: #6c6e6f;
    --color-border: #dfe1e3;
    --color-bg-page: #f4f6f9;
    --color-surface: #ffffff;
    --color-danger: #d3392c;

    --font-regular: 'DINOT-Regular', Arial, sans-serif;
    --font-bold: 'DINOT-Bold', Arial, sans-serif;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow-card: 0 4px 16px rgba(0, 62, 144, 0.10);
    --shadow-card-hover: 0 8px 22px rgba(0, 62, 144, 0.16);
}

* {
    font-family: var(--font-regular);
    box-sizing: border-box;
}

/* Improved Overall Layout */
body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-page);
    color: var(--color-text);
    line-height: 1.6; /* Improve readability with consistent spacing */
    /* Real sticky-footer pattern: header/main/footer stacked, main grows to
       fill any leftover space. No guessing header/footer heights up front
       (a fixed min-height on .site-main did that before and was often off,
       most noticeably on short pages like login). */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
}
a:visited {
    color: var(--color-primary);
}

label {
    font-family: var(--font-bold);
    font-weight: 700;
    color: var(--color-text);
}

.container {
    max-width: 1100px;
    width: 94%;
    margin: 2.5rem auto;
    padding: 2rem 2.5rem;
    background-color: var(--color-surface);
    border-radius: var(--radius);
    border-top: 4px solid var(--color-primary);
    box-shadow: var(--shadow-card);
}

/* =============================================================================
   Site header / footer (shared across all pages via templates/base.html)
   ============================================================================= */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 500;
}
.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo-link {
    display: inline-flex;
    align-items: center;
}
.site-header .vds-logo {
    height: 44px;
}
.site-header-actions .inline-form {
    margin: 0;
}
.header-link-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.1rem;
    font-family: var(--font-bold);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.header-link-btn:hover {
    background: var(--color-primary-dark);
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: 2.5rem;
}
.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.site-footer-inner a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}
.site-footer-inner a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-bold);
    font-weight: 700;
    color: var(--color-text);
}

h1 {
    text-align: left;
    font-size: 2.1em;
    margin-bottom: 2%;
    color: var(--color-primary);
}

h2 {
    text-align: left;
    font-size: 1.2em;
    margin-bottom: 2%;
    color: var(--color-text);
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column; /* Stack label and input vertically */
    width: 100%;
    margin-bottom: 1rem;
}

/* Inline row for input and button side-by-side */
.inline-row {
    position: relative; /* anchor for .address-suggestions overlay */
    display: flex;
    gap: 8px;
    align-items: stretch; /* make children stretch to same height */
}
.inline-row input[type="text"]{
    flex: 1;
}
.inline-row .submit-btn {
    white-space: nowrap;
}
/* Ensure the inline button matches the input height */
.inline-row input[type="text"],
.inline-row .submit-btn {
    height: 50px; /* match .form-group input height */
    box-sizing: border-box;
}
.inline-row .submit-btn {
    padding: 0 16px; /* horizontal padding while height is fixed */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Address search results dropdown - overlays the map instead of pushing it
   down, starts flush against the search row with no gap/padding above it */
.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0;
    z-index: 1000;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-card-hover);
}
.address-suggestion {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.15s ease;
}
.address-suggestion:last-child {
    border-bottom: none;
}
.address-suggestion:hover {
    background-color: var(--color-primary-light);
}
.address-suggestion-text {
    flex: 1;
}
.address-suggestion-type {
    flex: none;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.form-group label {
    margin-top: 0.5rem; /* Space between label and input */
    margin-bottom: 0.5rem; /* Space between label and input */
    font-size: 95%;
    font-family: var(--font-bold);
    font-weight: 700;
    color: var(--color-text);
}

.form-group .sub-label {
    font-size: 90%;
    font-family: var(--font-regular);
    font-weight: normal;
    color: var(--color-text);
}

.form-group .selection {
    font-size: 95%;
    font-family: var(--font-bold);
    font-weight: 700;
    color: var(--color-text);
}

.form-group .checkbox-text {
    font-family: var(--font-regular);
    font-weight: normal; /* Set font weight to normal */
    color: var(--color-text); /* Set text color to black */
    font-size: small; /* Set font size to small */
}

/* Signup accordion styling */
.signup-container .accordion {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}
.signup-container .accordion-toggle {
    background: var(--color-primary-light);
    border: none;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    font-size: 1rem;
    font-family: var(--font-bold);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.signup-container .accordion-toggle:focus {
    outline: 2px solid var(--color-accent);
}
.signup-container .accordion-panel {
    padding: 12px;
    display: none;
    background: var(--color-surface);
}
.signup-container .accordion-panel.open {
    display: block;
}
.signup-container .accordion-icon {
    width: 1.2em;
    display: inline-block;
    text-align: center;
}

/* Signup checkbox text should be normal weight only in signup */
.signup-container .checkbox-text { font-weight: normal; }

.explanation-text {
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}


.form-group input[type="text"],
.form-group input[type="password"] { /* Added password input styling */
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Smooth transition */
    width: 100%; /* Ensure full width */
    height: 50px; /* Set a fixed height for consistency */
    box-sizing: border-box; /* Include padding in total width */
    background-color: var(--color-surface);
    color: var(--color-text);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus { /* Focus styling for password */
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    outline: none; /* Remove default outline */
}

/* Button Container */
.button-container {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right, consistent with the wizard's Weiter/Zurück buttons */
    margin-top: 1rem;
}

.submit-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1em;
    font-family: var(--font-bold);
    cursor: pointer;
    margin-left: 0; /* Space between buttons */
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 6px rgba(0, 62, 144, 0.25);
}

/* Align the submit button to the left */
.left-align {
    float: left; /* Aligns the button to the left */
}

/* Clearfix for button container to handle floats */
.button-container::after {
    content: "";
    display: table;
    clear: both; /* Clears the float */
}

.submit-btn:hover {
    background-color: var(--color-primary-dark); /* Darken on hover, not lighten */
    box-shadow: 0 4px 10px rgba(0, 62, 144, 0.32);
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.submit-btn:disabled {
    background-color: var(--color-text-muted);
    box-shadow: none;
    cursor: default;
}

/* Styling for the label above the map */
label[for="map"] {
    margin-bottom: 0.5rem; /* Space between label and input */
    font-family: var(--font-bold);
    font-weight: 700;
    color: var(--color-text);
}

/* Map Container */
#map {
    width: 100%; /* Full width of container */
    height: 80vh;
    background-color: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden; /* clip Leaflet's tile grid to the rounded corners */
    margin-top: 1rem;
}

.location-info {
    display: grid;
    /* exactly one row of all 7 fields (columns shrink instead of wrapping) */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1rem 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
@media (max-width: 900px) {
    .location-info {
        /* 7 columns would be unreadable on narrow screens - fall back to wrapping */
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

.location-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.location-item strong.selection {
    font-family: var(--font-bold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
}

.location-item span {
    font-size: 1.05rem;
    color: var(--color-text);
}

.form-group input[type="checkbox"] {
    margin-left: 5px; /* Push the checkbox to the right */
    margin-right: 0; /* Reset right margin */
    cursor: pointer; /* Change cursor to pointer on hover */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 20, 45, 0.55);
}

.modal-content {
    background-color: var(--color-surface);
    margin: 15% auto;
    padding: 24px;
    border-radius: var(--radius);
    border-top: 4px solid var(--color-primary);
    box-shadow: var(--shadow-card-hover);
    width: 80%;
    max-width: 500px;
    position: relative; /* For close button positioning */
}

.close {
    color: var(--color-text-muted);
    position: absolute; /* Position close button at the top right */
    top: 10px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: var(--color-primary);
}

/* Additional Styles for Login Page */
.login-container {
    max-width: 400px; /* Limit width of login form */
    margin: auto; /* Center align */
    padding: 20px; /* Inner spacing */
    background: var(--color-surface); /* White background */
    border-radius: var(--radius); /* Rounded corners */
    box-shadow: var(--shadow-card); /* Shadow */
}

.login-container h1 {
    font-size: 1.8em;
    color: var(--color-primary); /* Same color as main theme */
    text-align: center; /* Center title */
}

.error-message {
    color: var(--color-danger);
    margin-top: 10px;
    text-align: center;
}

.links {
    text-align: center;
    margin-top: 10px;
}

.links a {
    color: var(--color-primary); /* Link color matching theme */
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* "Jetzt registrieren" CTA on the login page: set apart from the plain
   "Passwort vergessen?" link above it so it doesn't read as a footnote. */
.signup-cta {
    margin-top: 0.85rem;
    padding: 0.7rem 0.9rem;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    text-align: center;
}
.signup-cta-lead {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.15rem;
}
.signup-cta a,
.signup-cta a:hover {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}
.signup-cta a:hover {
    color: var(--color-primary-dark);
}

/* Form Field Styling */
.form-row {
    margin-bottom: 1rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-bold);
    font-weight: 700;
    color: var(--color-text);
}

.input-container {
    display: flex;
    flex-direction: column;
}

.input-container input[type="text"],
.input-container input[type="password"],
.input-container input[type="email"],
.input-container select,
.input-container textarea {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--color-surface);
    color: var(--color-text);
}

.input-container input[type="text"]:focus,
.input-container input[type="password"]:focus,
.input-container input[type="email"]:focus,
.input-container select:focus,
.input-container textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    outline: none;
}

.captcha-container {
    display: flex;
    flex-direction: column;  /* input below the image */
    align-items: flex-start;
    gap: 8px;
}

.captcha-container img.captcha {
    width: 245px;         /* größeres Captcha-Bild */
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.captcha-container input[name="captcha_1"],
.captcha-container input[type="text"] {
    font-size: 1rem;          /* etwas größere Eingabe */
    padding: 8px 10px;
    width: 220px;             /* breiteres Eingabefeld */
    margin-left: 0;
}

/* Global spinner overlay to block UI during backend requests */
.spinner-overlay {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(244,246,249,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}
.spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 6px solid var(--color-primary-light);
    border-top-color: var(--color-primary);
    animation: spin 800ms linear infinite;
    box-shadow: 0 4px 12px rgba(0,62,144,0.15);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* VdS logo helper class for consistent sizing */
.vds-logo {
    height: 72px; /* ~50% larger than previous 48px */
}

/* Tooltip styling for inputs and checkboxes */
/* Tooltips are small boxed hints and may wrap to multiple lines. */
.has-tooltip { position: relative; }
.has-tooltip .tooltip {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary-dark);
    color: #fff;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    white-space: normal; /* allow wrapping */
    overflow-wrap: anywhere;
    word-break: break-word;
    pointer-events: none; /* tooltip does not block interaction */
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
    z-index: 21000;
    max-width: 18rem; /* small boxed hint */
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.has-tooltip .tooltip.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

/* Right-side, vertically centered tooltip (used for inputs and checkboxes) */
.has-tooltip.tooltip-right .tooltip {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    min-width: 12rem;      /* Ensure tooltip is wide enough for longer text */
    max-width: 20rem;      /* Allow wrapping but keep a reasonable max width */
    white-space: normal;   /* Allow text to wrap */
    word-break: break-word;
    padding: 8px 12px;     /* More padding for readability */
}

/* Tooltip placed below the input, left-aligned */
.has-tooltip.tooltip-below .tooltip {
    left: 0;
    right: auto;
    top: 100%;
    bottom: auto;
    transform: translateY(8px);
    text-align: left;
    max-width: 36rem;
    padding: 6px 10px;
}
.has-tooltip.tooltip-below .tooltip.visible {
    transform: translateY(8px);
}

/* Reserve horizontal space in text inputs so the tooltip can sit inside the field without overlapping typed text */
.inline-row input[type="text"],
.input-container input[type="text"],
.form-group input[type="text"] {
    padding-right: 1rem; /* reduced: no reserved tooltip area on the right */
    box-sizing: border-box;
}

/* Ensure checkbox labels in the signup page are not bold (keep home checkboxes bold) */
.signup-container .checkbox-text {
    font-family: var(--font-regular);
    font-weight: normal;
    font-size: 0.95rem; /* keep readable size */
}

.toggle-cards,
.product-cards {
    display: flex;
    flex-wrap: wrap;
    /* slightly larger vertical gap so product rows have more breathing room */
    gap: 1.5rem 1rem;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

.toggle-card {
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1rem;
    box-sizing: border-box;
    background-color: var(--color-surface);
    /* allow cards to shrink below their content width on small containers */
    min-width: 0;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    overflow: visible; /* allow caption pseudo-element to appear outside the card */
    line-height: 1.15;
    text-align: center;
}

.toggle-card:hover {
    border-color: var(--color-accent);
    background-color: var(--color-primary-light);
    box-shadow: var(--shadow-card);
}

.toggle-card.active {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
    box-shadow: var(--shadow-card);
}

.card-title {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.hidden-checkbox {
    display: none;
}

/* Optional: Tooltip (caption below card) — styled like .has-tooltip .tooltip.
   Attribute-scoped so cards without data-tooltip (e.g. the described wizard
   product cards) don't get an empty, invisible-but-space-taking pseudo-element
   that shows up as a phantom scrollbar area on hover. */
.toggle-card[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    /* anchored to the bottom edge of the card (keep position unchanged) */
    top: 100%;
    left: 0;
    margin-top: 0.35rem; /* small gap below border */
    background: var(--color-primary-dark);
    color: #fff;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    width: 100%;
    text-align: left;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms;
    z-index: 21000;
    max-width: 18rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.toggle-card[data-tooltip]:hover::after {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Layout rules: first two cards occupy ~50% each and do not grow; remaining cards ~33% each */
.toggle-cards .toggle-card:nth-child(1),
.toggle-cards .toggle-card:nth-child(2) {
    /* two cards per row: account for one horizontal gap (1rem) so total width equals 100% */
    flex: 0 1 calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
}
.toggle-cards .toggle-card:nth-child(n+3) {
    /* three cards per row: account for two horizontal gaps (2 * 1rem) */
    flex: 0 1 calc((100% - 2rem) / 3);
    max-width: calc((100% - 2rem) / 3);
}

/* Product cards: 4 equal-width columns (3 gaps of 1rem between them) */
.product-cards .toggle-card {
    flex: 0 1 calc((100% - 3rem) / 4);
    max-width: calc((100% - 3rem) / 4);
}

/* Responsive fallback: stack cards on narrow screens */
@media (max-width: 900px) {
    .toggle-cards .toggle-card:nth-child(1),
    .toggle-cards .toggle-card:nth-child(2),
    .toggle-cards .toggle-card:nth-child(n+3),
    .product-cards .toggle-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* =============================================================================
   Order wizard (home page): Standort / Produkt / Übersicht steps
   ============================================================================= */

.wizard-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
}
.wizard-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 0.5rem;
    font-family: var(--font-bold);
    font-size: 1rem;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.wizard-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    flex: none;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text);
    font-size: 0.85rem;
    font-family: var(--font-bold);
}
.wizard-tab.active {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.wizard-tab.active .wizard-tab-num {
    background: var(--color-primary);
    color: #fff;
}
.wizard-tab:hover {
    color: var(--color-primary);
}
@media (max-width: 700px) {
    .wizard-tab span:not(.wizard-tab-num) { display: none; }
}

.wizard-step { display: none; }
.wizard-step.active {
    display: block;
    animation: wizard-fade-in 0.2s ease;
}
@keyframes wizard-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.75rem;
    gap: 1rem;
}
.wizard-nav .wizard-back {
    background-color: var(--color-surface);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.wizard-nav .wizard-back:hover {
    background-color: var(--color-primary-light);
}

/* Larger, described product cards for the wizard's "Produkt" step */
.product-cards-large {
    /* override the base .product-cards align-items:flex-start - without this,
       each card is only as tall as its own text, so a shorter description
       (e.g. Premium's) makes that card visibly smaller than its row-mates */
    align-items: stretch;
}
.product-cards-large .toggle-card {
    text-align: left;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 1 calc((100% - 1.5rem) / 2);
    max-width: calc((100% - 1.5rem) / 2);
}
.product-cards-large .card-title {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}
.card-desc {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
.card-check {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}
.toggle-card.active .card-check {
    display: flex;
}
@media (max-width: 700px) {
    .product-cards-large .toggle-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Review cards used on the "Übersicht" step (home wizard) and order_overview.html */
.row {
    display: flex;
    gap: 20px;
    align-items: stretch;
}
@media (max-width: 800px) {
    .row { flex-direction: column; }
}
.card {
    flex: 1;
    background: var(--color-surface);
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}
.card h2, .card h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-top: 0;
}
.no-bullets { list-style: none; padding-left: 0; margin: 0; }
.no-bullets li { padding: 4px 0; }
.muted { color: var(--color-text-muted); font-style: italic; padding: 4px 0; }
.total-row {
    margin-top: 16px;
    text-align: right;
    font-size: 1.2rem;
    font-family: var(--font-bold);
    color: var(--color-primary);
}
.actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--color-border); text-align: left; }
tbody tr:last-child td { border-bottom: none; }
tfoot td { border-top: 2px solid var(--color-border); }
