/* Deal cards (Part 5 §5.3). Every rule is scoped under the cards' root class .oa-cards, so Bootstrap's reboot and
   utilities cannot restyle a card, and every value comes from the --oa-* custom properties that SiteThemeFactory emits
   on the root's style attribute (the fallbacks below are the §5.3.1 fallback column). No web fonts. M6b (user decision
   2026-10-01): the image slot shows the item's https image (object-fit cover in the theme's aspect), else the tinted
   block; the header shows the site's https logo, else its initials. The cards root is a size container, so the row variant reacts to the pane width. */

.oa-cards {
    container-type: inline-size;
    color: var(--oa-ink, #1F2328);
    font-family: var(--oa-font-family, system-ui, "Segoe UI", Arial, sans-serif);
    font-size: var(--oa-font-size, 14px);
    line-height: 1.35;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: var(--oa-radius-card, 8px);
    background: var(--oa-surface, #FFFFFF);
    overflow: hidden;
}

.oa-cards * {
    box-sizing: border-box;
}

/* Header: shell colours, the site's logo or its initials on the primary colour. */
.oa-cards .oa-cards-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 8px 12px;
    background: var(--oa-shell-bg, #F6F8FA);
    color: var(--oa-shell-ink, #1F2328);
}

.oa-cards .oa-site-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--oa-radius-button, 6px);
    background: var(--oa-primary, #1F6FEB);
    color: var(--oa-on-primary, #FFFFFF);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.oa-cards .oa-site-initials.oa-deleted {
    background: #8C959F;
}

.oa-cards .oa-cards-site {
    font-weight: 700;
}

.oa-cards .oa-cards-query {
    font-style: italic;
    overflow-wrap: anywhere;
}

.oa-cards .oa-cards-count {
    margin-left: auto;
    white-space: nowrap;
}

.oa-cards .oa-cards-json-toggle {
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.oa-cards .oa-cards-json {
    flex-basis: 100%;
    margin: 0;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.oa-cards .oa-repaired-chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: #FFF4CE;
    color: #6B4E00;
    border: 1px solid #E3B341;
    font-size: 12px;
}

.oa-cards .oa-cards-notes {
    flex-basis: 100%;
    margin: 0;
    font-size: 11px;
    opacity: 0.85;
}

.oa-cards .oa-cards-fallback {
    margin: 8px 12px 0;
    padding: 6px 10px;
    border: 1px solid #E3B341;
    border-radius: 6px;
    background: #FFF8E1;
    color: #6B4E00;
}

.oa-cards .oa-cards-empty {
    margin: 0;
    padding: 12px;
    color: var(--oa-muted, #656D76);
}

.oa-cards .oa-cards-footer {
    display: flex;
    justify-content: center;
    padding: 8px 12px 12px;
}

.oa-cards .oa-load-more {
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: var(--oa-radius-button, 6px);
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-ink, #1F2328);
    padding: 4px 14px;
    cursor: pointer;
}

.oa-cards .oa-load-more:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Body: the variant decides the layout. */
.oa-cards .oa-cards-body {
    padding: 12px;
}

.oa-cards.oa-variant-card .oa-cards-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--oa-card-width, 300px)), var(--oa-card-width, 300px)));
    gap: 12px;
}

.oa-cards.oa-variant-row .oa-cards-body {
    display: flex;
    flex-direction: column;
    max-width: var(--oa-card-width, 300px);
}

.oa-cards .oa-similar > summary {
    cursor: pointer;
    color: var(--oa-muted, #656D76);
    padding: 4px 0;
}

.oa-cards .oa-similar .oa-card {
    opacity: 0.6;
}

/* One card. */
.oa-cards .oa-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.oa-cards.oa-variant-card .oa-card {
    background: var(--oa-surface, #FFFFFF);
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: var(--oa-radius-card, 8px);
    box-shadow: var(--oa-shadow-card, 0 1px 3px rgba(0,0,0,.12));
    overflow: hidden;
    padding-bottom: 10px;
    transition: box-shadow 0.15s ease-in-out;
}

.oa-cards.oa-variant-card .oa-card:hover {
    box-shadow: var(--oa-shadow-elevated, 0 8px 24px rgba(0,0,0,.18));
}

.oa-cards.oa-variant-card .oa-card > :not(.oa-card-image):not(.oa-card-media):not(.oa-ai-marker):not(.oa-sponsored):not(.oa-ask):not(.oa-pick-choose),
.oa-cards.oa-variant-card .oa-card-body > * {
    margin-left: 10px;
    margin-right: 10px;
}

.oa-cards.oa-variant-card .oa-card.oa-image-left {
    display: grid;
    grid-template-columns: 40% 1fr;
    padding-bottom: 0;
}

.oa-cards .oa-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 10px;
    min-width: 0;
}

.oa-cards.oa-variant-row .oa-card {
    padding: var(--oa-space-row-padding, 10px 0);
    border-bottom: 1px solid var(--oa-border, #D0D7DE);
    background: transparent;
}

/* The image slot: the item's image (cover), or a tinted block when there is none or it failed to load. */
.oa-cards .oa-card-image,
.oa-cards .oa-card-media {
    background: var(--oa-shell-bg, #F6F8FA);
    aspect-ratio: var(--oa-image-aspect, 16 / 9);
    width: 100%;
    overflow: hidden;
}

.oa-cards .oa-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.oa-cards .oa-site-logo {
    display: inline-block;
    height: 24px;
    max-width: 120px;
    object-fit: contain;
    border-radius: var(--oa-radius-button, 6px);
    background: var(--oa-surface, #FFFFFF);
}

.oa-cards .oa-card-media {
    height: 100%;
    aspect-ratio: auto;
    min-height: 120px;
}

.oa-cards .oa-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.oa-cards .oa-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: var(--oa-radius-badge, var(--oa-radius-pill, 999px));
    font-size: var(--oa-badge-size, 11px);
    font-weight: 700;
    line-height: 1.5;
}

/* User finding 2026-10-01: a structuredApi deal's match level (exact / relaxed), so relaxed results never look exact. */
.oa-cards .oa-match {
    align-self: flex-start;
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    padding: 0 7px;
    border: 1px solid currentColor;
    border-radius: var(--oa-radius-badge, var(--oa-radius-pill, 999px));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.oa-cards .oa-match-exact {
    color: var(--oa-ui-success, #1a7f37);
    background: var(--oa-ui-success-bg, #dafbe1);
}

.oa-cards .oa-match-relaxed {
    color: var(--oa-ui-warning, #9a6700);
    background: var(--oa-ui-warning-bg, #fff8c5);
}

/* Hotfix M7c3 (flow-after-sim-fix.md row Q.4): a card above the asked price or with other nights - a neutral badge in place of
   "Točno podudaranje" (the semantic neutral tone, like the "Promovirano" badge). */
.oa-cards .oa-match-limit {
    border-color: var(--oa-ui-neutral-border, #d0d7de);
    color: var(--oa-ui-neutral, #57606a);
    background: var(--oa-ui-neutral-bg, #eaeef2);
}

/* Hotfix M7c3 (flow-after-sim-fix.md row Y, user decision 2026-10-07): the Administrator-only "Promovirano" badge of a pushed
   card - small and neutral (the semantic neutral tone), shaped like the match badge; users never get it. */
.oa-cards .oa-pushed {
    align-self: flex-start;
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    padding: 0 7px;
    border: 1px solid var(--oa-ui-neutral-border, #d0d7de);
    border-radius: var(--oa-radius-badge, var(--oa-radius-pill, 999px));
    color: var(--oa-ui-neutral, #57606a);
    background: var(--oa-ui-neutral-bg, #eaeef2);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.oa-cards .oa-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.oa-cards .oa-title {
    margin: 0;
    font-size: var(--oa-title-size, inherit);
    font-weight: var(--oa-title-weight, 600);
    color: var(--oa-ink, #1F2328);
    overflow-wrap: anywhere;
}

.oa-cards .oa-title a {
    color: var(--oa-link, var(--oa-price-color, inherit));
    text-decoration: none;
}

.oa-cards .oa-title a:visited {
    color: var(--oa-link-visited, var(--oa-link, inherit));
}

.oa-cards .oa-title a:hover {
    text-decoration: underline;
    color: var(--oa-primary-hover, var(--oa-link, inherit));
}

.oa-cards .oa-place {
    color: var(--oa-muted, #656D76);
}

.oa-cards .oa-price,
.oa-cards .oa-full-price {
    display: inline-block;
    margin-right: 8px;
}

.oa-cards .oa-price {
    font-size: var(--oa-price-size, 16px);
    font-weight: var(--oa-price-weight, 700);
    color: var(--oa-price-color, var(--oa-ink, #1F2328));
}

.oa-cards .oa-full-price {
    color: var(--oa-muted, #656D76);
    text-decoration: line-through;
}

.oa-cards .oa-price-per-unit {
    font-weight: 700;
    color: var(--oa-price-per-unit-color, var(--oa-ink, #1F2328));
}

.oa-cards .oa-meta {
    font-size: var(--oa-meta-size, 12px);
    font-weight: var(--oa-meta-weight, 400);
    color: var(--oa-meta-color, var(--oa-muted, #656D76));
}

/* Addendum H.0 "UI" (M7h): the site's domain profile card fields - a compact label/value list in the site theme. */
.oa-cards .oa-card-fields {
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    gap: 2px 8px;
    margin: 2px 0 0;
    font-size: var(--oa-meta-size, 12px);
    line-height: 1.4;
}

.oa-cards .oa-card-field {
    display: contents;
}

.oa-cards .oa-card-field dt {
    margin: 0;
    color: var(--oa-meta-color, var(--oa-muted, #656D76));
    overflow-wrap: anywhere;
}

.oa-cards .oa-card-field dd {
    margin: 0;
    min-width: 0;
    color: var(--oa-ink, #1F2328);
    overflow-wrap: anywhere;
}

.oa-cards .oa-description {
    margin: 0;
    font-size: var(--oa-description-size, inherit);
    line-height: var(--oa-description-line-height, 1.35);
    color: var(--oa-description-color, var(--oa-ink, #1F2328));
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oa-cards .oa-cta {
    display: block;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: var(--oa-radius-button, 6px);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
}

.oa-cards .oa-ai-marker {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    padding: 0 5px;
    border-radius: 4px;
    background: #9A6700;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
}

.oa-cards .oa-sponsored {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.oa-cards .oa-ask {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 1;
    display: none;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: var(--oa-radius-button, 6px);
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-ink, #1F2328);
    padding: 1px 8px;
    font-size: 12px;
    cursor: pointer;
}

.oa-cards .oa-card:hover .oa-ask,
.oa-cards .oa-card:focus-within .oa-ask {
    display: inline-block;
}

/* A narrow pane turns each row into the site's mobile card (§5.3.3). */
@container (max-width: 767px) {
    .oa-cards.oa-variant-row .oa-cards-body {
        max-width: none;
        gap: 10px;
    }

    .oa-cards.oa-variant-row .oa-card {
        background: var(--oa-surface, #FFFFFF);
        border: 1px solid var(--oa-card-border, var(--oa-border, #D0D7DE));
        border-radius: var(--oa-radius-card, 8px);
        box-shadow: var(--oa-shadow-card, 0 1px 3px rgba(0,0,0,.12));
        padding: var(--oa-space-mobile-card-padding, 10px);
    }
}

/* Addendum O.3 (M7m): the card carousel of a Workspace card widget - fixed-width slides (about 280 px, the site's card
   width within 240-320 px; at most 85 % of a narrow widget), CSS scroll-snap, a visible scrollbar on desktop, native swipe
   on touch, prev / next buttons and the "x / N" position (js/oa-carousel.js keeps them in step and adds is-static when
   every slide fits, which hides the bar). A row-variant site (GoHome) shows each row as the site's mobile card. */
.oa-cards {
    --oa-carousel-card-width: clamp(240px, var(--oa-card-width, 280px), 320px);
}

.oa-cards.oa-variant-row {
    --oa-carousel-card-width: 280px;
}

.oa-cards .oa-carousel {
    position: relative;
}

.oa-cards .oa-carousel-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px 12px 0;
}

.oa-cards .oa-carousel.is-static .oa-carousel-bar {
    display: none;
}

.oa-cards .oa-carousel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: 50%;
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-ink, #1F2328);
    cursor: pointer;
}

.oa-cards .oa-carousel-button:hover:not(:disabled) {
    border-color: var(--oa-primary, #1F6FEB);
    color: var(--oa-primary, #1F6FEB);
}

.oa-cards .oa-carousel-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.oa-cards .oa-carousel-position {
    min-width: 4.5em;
    text-align: center;
    color: var(--oa-muted, #656D76);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.oa-cards .oa-carousel-track {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 12px;
    padding: 8px 12px 12px;
    scrollbar-width: thin;
}

.oa-cards .oa-carousel-slide {
    display: flex;
    flex: 0 0 min(var(--oa-carousel-card-width), 85%);
    min-width: 0;
    scroll-snap-align: start;
}

.oa-cards .oa-carousel-slide > .oa-card {
    flex: 1 1 auto;
    width: 100%;
}

.oa-cards.oa-variant-row .oa-carousel-slide > .oa-card {
    background: var(--oa-surface, #FFFFFF);
    border: 1px solid var(--oa-card-border, var(--oa-border, #D0D7DE));
    border-radius: var(--oa-radius-card, 8px);
    box-shadow: var(--oa-shadow-card, 0 1px 3px rgba(0,0,0,.12));
    padding: var(--oa-space-mobile-card-padding, 10px);
}

.oa-cards .oa-carousel-button:focus-visible,
.oa-cards .oa-carousel-track:focus-visible,
.oa-cards .oa-cards-mode:focus-visible,
.oa-cards .oa-cards-pill:focus-visible {
    outline: 2px solid var(--oa-ui-focus, #0969DA);
    outline-offset: 2px;
}

/* The carousel <-> grid toggle in the header (O.3). */
.oa-cards .oa-cards-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--oa-radius-button, 6px);
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.oa-cards .oa-cards-mode:hover:not(:disabled) {
    border-color: currentColor;
}

.oa-cards .oa-cards-mode:disabled {
    opacity: 0.45;
    cursor: default;
}

/* "Prikaži još 10" / "Prikaži sve (N)" (O.7) - round pills over the fetched cards, no site request. */
.oa-cards .oa-cards-more {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 4px 12px 12px;
}

.oa-cards .oa-cards-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 4px 14px;
    border: 1px solid var(--oa-primary, #1F6FEB);
    border-radius: 999px;
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-primary, #1F6FEB);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.oa-cards .oa-cards-pill .rzi {
    font-size: 18px;
}

.oa-cards .oa-cards-pill:hover:not(:disabled) {
    background: var(--oa-primary, #1F6FEB);
    color: var(--oa-on-primary, #FFFFFF);
}

.oa-cards .oa-cards-pill:disabled {
    opacity: 0.5;
    cursor: default;
}

/* "Moj izbor: 3 od 30" (O.6) and the refused sort (O.5). */
.oa-cards .oa-cards-selection {
    margin: 0;
    padding: 8px 12px 0;
    font-weight: 600;
}

.oa-cards .oa-cards-sort-note,
.oa-cards .oa-cards-availability-note {
    margin: 0;
    padding: 8px 12px 0;
    color: var(--oa-muted, #656D76);
    font-size: 12px;
}

/* The sort control in the header (O.5): a compact native select (keyboard and screen readers as the browser gives them). */
.oa-cards .oa-cards-sort {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    color: inherit;
}

.oa-cards .oa-cards-sort .rzi {
    font-size: 18px;
}

.oa-cards .oa-cards-sort-select {
    max-width: 14em;
    min-height: 28px;
    padding: 2px 6px;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: var(--oa-radius-button, 6px);
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-ink, #1F2328);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.oa-cards .oa-cards-sort-select:focus-visible {
    outline: 2px solid var(--oa-ui-focus, #0969DA);
    outline-offset: 2px;
}

.oa-cards .oa-cards-sort-select:disabled {
    opacity: 0.5;
    cursor: default;
}

/* The chat's item pick (O.4): candidate cards are ringed in the primary colour with an always visible "Odaberi" button. */
.oa-cards .oa-card.is-pick {
    outline: 3px solid var(--oa-ui-accent, var(--oa-primary, #1F6FEB));
    outline-offset: 1px;
    padding-top: 40px;
}

.oa-cards .oa-card .oa-pick-choose {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 2px 12px;
    border: 1px solid var(--oa-ui-accent, var(--oa-primary, #1F6FEB));
    border-radius: 999px;
    background: var(--oa-ui-accent, var(--oa-primary, #1F6FEB));
    color: var(--oa-ui-on-accent, #FFFFFF);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.oa-cards .oa-card .oa-pick-choose .rzi {
    font-size: 16px;
}

.oa-cards .oa-card .oa-pick-choose:focus-visible {
    outline: 2px solid var(--oa-ui-focus, #0969DA);
    outline-offset: 2px;
}

.oa-cards .oa-card .oa-pick-choose:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* M7x (canvas-maximize.md): a card widget shown on the whole canvas is a grid with as many columns as fit - the card
   variant's grid already is; a row-variant site (GoHome) shows each row as the site's mobile card in that grid. */
.oa-cards.oa-cards--maximized.oa-variant-row .oa-cards-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--oa-carousel-card-width)), 1fr));
    gap: 12px;
    max-width: none;
}

.oa-cards.oa-cards--maximized.oa-variant-row .oa-card {
    background: var(--oa-surface, #FFFFFF);
    border: 1px solid var(--oa-card-border, var(--oa-border, #D0D7DE));
    border-radius: var(--oa-radius-card, 8px);
    box-shadow: var(--oa-shadow-card, 0 1px 3px rgba(0,0,0,.12));
    padding: var(--oa-space-mobile-card-padding, 10px);
}

@media (prefers-reduced-motion: reduce) {
    .oa-cards .oa-carousel-track {
        scroll-behavior: auto;
    }
}

/* Citation target flash (oa-ui.js initCitations adds the class for 1.6 s). */
.oa-cards .oa-flash {
    animation: oa-card-flash 1.6s ease-out;
}

@keyframes oa-card-flash {
    0% {
        box-shadow: 0 0 0 3px var(--oa-primary, #1F6FEB);
    }

    100% {
        box-shadow: var(--oa-shadow-card, 0 1px 3px rgba(0,0,0,.12));
    }
}

/* Addendum V.1.6 (M7j): the visible "Detalji" button of a Workspace card - never hover-only like the Ask button, outlined in
   the site's own colours (never the workspace accent as text, rule 12a), 44 px on a coarse pointer (below), off while an
   answer streams. */
.oa-cards .oa-card-actions {
    display: flex;
    align-items: center;
    margin-top: 6px;
}

.oa-cards .oa-card-open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 2px 10px;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: var(--oa-radius-button, 6px);
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-ink, #1F2328);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.oa-cards .oa-card-open .rzi {
    font-size: 16px;
}

.oa-cards .oa-card-open:hover:not(:disabled) {
    border-color: var(--oa-primary, #1F6FEB);
}

.oa-cards .oa-card-open:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Addendum V.1.4 (M7j): a card's photo strip and a focus card's gallery (CardGallery + js/oa-gallery.js) in the same slot as a
   card's one image: CSS scroll-snap, a hidden scrollbar, prev / next on hover and keyboard focus (always on a coarse pointer),
   the position chip, the focus ring; a photo that failed hides its slide. In a sliding card row (touch "buttons") the photo
   track never scrolls by touch - a swipe moves the cards; elsewhere a swipe moves the photos and never jumps to the next card. */
.oa-cards .oa-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.oa-cards .oa-gallery-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--oa-shell-bg, #F6F8FA);
}

.oa-cards .oa-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.oa-cards .oa-gallery-track::-webkit-scrollbar {
    display: none;
}

/* V-D3 (the M7j review): in a sliding card row the photo track is not user-scrollable (overflow-x hidden) and contains nothing,
   so a horizontal swipe that starts on a photo chains to the card row and moves the cards. No touch-action here: the browser
   intersects touch-action down the tree, so "pan-y" on the track would stop the card row's own horizontal pan as well. */
.oa-cards .oa-gallery[data-oa-gallery-touch="buttons"] .oa-gallery-track {
    overflow-x: hidden;
    overscroll-behavior-x: auto;
}

.oa-cards .oa-gallery-slide {
    position: relative;
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    scroll-snap-align: start;
}

.oa-cards .oa-gallery-slide[hidden],
.oa-cards .oa-gallery-thumb[hidden] {
    display: none;
}

.oa-cards .oa-gallery--card .oa-gallery-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

/* The focus card never shows a photo larger than its natural size: a small thumbnail stays sharp on the tinted block. */
.oa-cards .oa-gallery--focus .oa-gallery-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 0;
}

.oa-cards .oa-gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #FFFFFF;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.oa-cards .oa-gallery-button {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: 50%;
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-ink, #1F2328);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.15s ease-in-out;
}

.oa-cards .oa-gallery-prev {
    left: 6px;
}

.oa-cards .oa-gallery-next {
    right: 6px;
}

.oa-cards .oa-gallery:hover .oa-gallery-button,
.oa-cards .oa-gallery:focus-within .oa-gallery-button {
    opacity: 1;
}

.oa-cards .oa-gallery:hover .oa-gallery-button:disabled,
.oa-cards .oa-gallery:focus-within .oa-gallery-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.oa-cards .oa-gallery-position {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 1;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #FFFFFF;
    font-size: 11px;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
}

.oa-cards .oa-gallery--focus .oa-gallery-position {
    top: 6px;
    bottom: auto;
}

.oa-cards .oa-gallery.is-single .oa-gallery-button,
.oa-cards .oa-gallery.is-single .oa-gallery-position,
.oa-cards .oa-gallery.is-empty .oa-gallery-button,
.oa-cards .oa-gallery.is-empty .oa-gallery-position {
    display: none;
}

.oa-cards .oa-gallery-thumbs {
    display: flex;
    gap: 6px;
    padding-top: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.oa-cards .oa-gallery-thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 42px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: var(--oa-shell-bg, #F6F8FA);
    overflow: hidden;
    cursor: pointer;
}

.oa-cards .oa-gallery-thumb[aria-current="true"] {
    border-color: var(--oa-ink, #1F2328);
}

.oa-cards .oa-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oa-cards .oa-gallery-button:focus-visible,
.oa-cards .oa-gallery-thumb:focus-visible,
.oa-cards .oa-card-open:focus-visible,
.oa-cards .oa-focus-more:focus-visible,
.oa-cards .oa-focus-ask:focus-visible,
.oa-cards .oa-focus-cta:focus-visible,
.oa-cards .oa-focus-table-scroll:focus-visible {
    outline: 2px solid var(--oa-ui-focus, #0969DA);
    outline-offset: 2px;
}

/* Addendum V.1.3 (M7j): the focus card of one item (ItemFocusView) in the site's look - two columns from 720 px of widget width
   (the gallery about 55 %, the facts beside it), else one column; maximized, the gallery takes the full width. */
.oa-cards .oa-focus-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 12px;
    min-width: 0;
}

.oa-cards .oa-focus-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

@container (min-width: 720px) {
    .oa-cards .oa-focus-top.has-gallery {
        grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    }
}

.oa-cards.oa-focus--maximized .oa-focus-top.has-gallery {
    grid-template-columns: minmax(0, 1fr);
}

.oa-cards .oa-focus-gallery .oa-gallery {
    height: auto;
}

.oa-cards .oa-focus-gallery .oa-gallery-viewport {
    height: auto;
    aspect-ratio: var(--oa-image-aspect, 16 / 9);
}

.oa-cards.oa-focus--maximized .oa-focus-gallery .oa-gallery-viewport {
    max-height: 70vh;
}

.oa-cards .oa-focus-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.oa-cards .oa-focus-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.oa-cards .oa-focus-header .oa-match,
.oa-cards .oa-focus-header .oa-pushed {
    margin-top: 0;
}

.oa-cards .oa-focus-partner {
    display: inline-block;
    padding: 0 8px;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: 999px;
    background: var(--oa-shell-bg, #F6F8FA);
    color: var(--oa-ink, #1F2328);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

.oa-cards .oa-focus-ai {
    padding: 0 5px;
    border-radius: 4px;
    background: #9A6700;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
}

.oa-cards .oa-focus-title {
    font-size: calc(var(--oa-title-size, 16px) * 1.15);
}

.oa-cards .oa-focus-subtitle {
    margin: 0;
    color: var(--oa-muted, #656D76);
    overflow-wrap: anywhere;
}

.oa-cards .oa-focus-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}

.oa-cards .oa-focus-facts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.oa-cards .oa-focus-fact-list,
.oa-cards .oa-focus-table,
.oa-cards .oa-focus-list,
.oa-cards .oa-focus-text {
    font-size: 13px;
}

.oa-cards .oa-focus-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.oa-cards .oa-focus-heading {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--oa-ink, #1F2328);
}

.oa-cards .oa-focus-table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.oa-cards .oa-focus-table {
    width: 100%;
    border-collapse: collapse;
}

.oa-cards .oa-focus-table th,
.oa-cards .oa-focus-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--oa-border, #D0D7DE);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.oa-cards .oa-focus-table th {
    font-weight: 600;
    color: var(--oa-muted, #656D76);
    white-space: nowrap;
}

.oa-cards .oa-focus-table .oa-focus-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* A long description (more than 6 lines or 420 characters) shows 6 lines until "Prikaži više"; a short one shows whole. */
.oa-cards .oa-focus-text {
    line-height: 1.4;
}

.oa-cards .oa-focus-text.is-clamped {
    max-height: calc(6 * 1.4em);
    overflow: hidden;
}

/* The gallery script hides "Prikaži više" while the clamped text fits its 6 lines (a wide widget). */
.oa-cards .oa-focus-more[hidden] {
    display: none;
}

.oa-cards .oa-focus-text p {
    margin: 0 0 6px;
}

.oa-cards .oa-focus-list {
    margin: 0;
    padding-left: 18px;
}

.oa-cards .oa-focus-more {
    align-self: flex-start;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--oa-link, var(--oa-ink, #1F2328));
    text-decoration: underline;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

/* The mini map (MapView Compact) is chrome: its height is in oneagent.css, next to the map frame's own rule (L.0: this file
   styles the card classes only). */

.oa-cards .oa-focus-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.oa-cards .oa-focus-cta {
    display: inline-block;
    margin-top: 0;
}

.oa-cards .oa-focus-ask {
    min-height: 32px;
    padding: 4px 14px;
    border: 1px solid var(--oa-border, #D0D7DE);
    border-radius: var(--oa-radius-button, 6px);
    background: var(--oa-surface, #FFFFFF);
    color: var(--oa-ink, #1F2328);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.oa-cards .oa-focus-ask:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (prefers-reduced-motion: reduce) {
    .oa-cards .oa-gallery-track {
        scroll-behavior: auto;
    }

    .oa-cards .oa-gallery-button {
        transition: none;
    }
}

/* Coarse pointers: the photo buttons always show and every V.1 control is a 44 px target. */
@media (pointer: coarse) {
    .oa-cards .oa-gallery-button {
        width: 44px;
        height: 44px;
        opacity: 1;
    }

    .oa-cards .oa-gallery-button:disabled {
        opacity: 0.4;
    }

    .oa-cards .oa-card-open,
    .oa-cards .oa-focus-more,
    .oa-cards .oa-focus-ask,
    .oa-cards .oa-focus-cta {
        min-height: 44px;
    }

    .oa-cards .oa-gallery-thumb {
        min-width: 44px;
        min-height: 44px;
    }
}
