/* Shared styles for Howdens AI Kitchen Designer */

/* Accessibility: skip-to-content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 100000;
    padding: 8px 16px;
    background: #C20016;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Accessibility: keyboard focus indicators (WCAG 2.4.7) */
:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 0;
}

/* Accessibility: screen-reader only utility */
.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;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }

.cat-card {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #1e293b;
    width: 200px;
    flex-shrink: 0;
}
.cat-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.cat-card.selected { border-color: #C20016; box-shadow: 0 0 20px rgba(194,0,22,0.3); }
.cat-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    background: #1e293b;
    transition: transform 0.2s;
}
.cat-card:hover img { transform: scale(1.05); }
.cat-card.cover-img img { object-fit: cover; background: none; }

.pathway-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.pathway-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.btn-howdens {
    background: #1a3a6b;
    color: white;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}
.btn-howdens:hover { background: #244e8a; transform: translateY(-1px); }

.btn-howdens-outline {
    background: transparent;
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-howdens-outline:hover { background: rgba(255,255,255,0.1); }

.step-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; transition: all 0.3s; }
.step-dot.active { background: #C20016; color: white; }
.step-dot.done { background: #065f46; color: #6ee7b7; }
.step-dot.pending { background: #1e293b; color: #6b7280; border: 2px solid #334155; }
.step-line { height: 2px; flex: 1; transition: background 0.3s; }
.step-line.done { background: #065f46; }
.step-line.pending { background: #334155; }

.upload-zone {
    border: 3px dashed #334155;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #C20016;
    background: rgba(194,0,22,0.05);
}

.thumb-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #334155;
    background: #1e293b;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}
.thumb-btn:hover { border-color: #64748b; color: white; }
.thumb-btn.active-up { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,0.1); }
.thumb-btn.active-down { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }

/* ── Colour swatches ───────────────────────────────────────── */
.swatch-row { display:flex; flex-wrap:wrap; gap:8px; padding:4px 0; }
.swatch-item { display:flex; flex-direction:column; align-items:center; cursor:pointer; gap:4px; }
.swatch-circle {
    width:40px; height:40px; border-radius:50%;
    border:3px solid transparent;
    transition:border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    flex-shrink:0;
}
.swatch-item:hover .swatch-circle { transform:scale(1.1); }
.swatch-item.selected .swatch-circle {
    border-color:#fff;
    box-shadow:0 0 0 2px #C20016;
    transform:scale(1.1);
}
.swatch-default-circle {
    background: repeating-linear-gradient(
        45deg, #334155 0px, #334155 4px, #1e293b 4px, #1e293b 8px
    );
    border:2px dashed #475569;
}
.swatch-item.selected .swatch-default-circle { border-color:#94a3b8; }
.swatch-name { font-size:9px; color:#94a3b8; text-align:center; max-width:48px; line-height:1.2; word-break:break-word; }
.swatch-item.selected .swatch-name { color:#fff; }

/* ── Two-tone split swatch preview ────────────────────────────── */
.two-tone-preview {
    display:flex; align-items:center; gap:12px;
    padding:8px 12px; margin-top:8px;
    background:rgba(15,23,42,0.5); border:1px solid rgba(255,255,255,0.08);
    border-radius:10px; transition:opacity 0.2s;
}
.two-tone-preview.hidden { display:none; }
.split-swatch {
    width:48px; height:48px; border-radius:50%;
    border:2px solid rgba(255,255,255,0.15);
    overflow:hidden; flex-shrink:0; position:relative;
}
.split-swatch-top, .split-swatch-bottom {
    position:absolute; left:0; right:0; height:50%;
}
.split-swatch-top { top:0; }
.split-swatch-bottom { bottom:0; }
.split-swatch-divider {
    position:absolute; top:50%; left:0; right:0;
    height:1px; background:rgba(255,255,255,0.3);
}
.two-tone-labels { display:flex; flex-direction:column; gap:2px; }
.two-tone-labels .tt-label { font-size:10px; color:#94a3b8; display:flex; align-items:center; gap:4px; }
.two-tone-labels .tt-dot { width:8px; height:8px; border-radius:50%; border:1px solid rgba(255,255,255,0.2); flex-shrink:0; }
.two-tone-labels .tt-label strong { color:#e2e8f0; font-weight:600; }

/* ── Finish tab strip (Matt / Gloss / Textured / Natural) ───── */
.finish-tabs {
    display:flex; flex-wrap:wrap; gap:6px;
    padding:4px 0 8px 0;
}
.finish-tab {
    display:inline-flex; align-items:center; gap:4px;
    padding:4px 12px; border-radius:20px;
    background:#1e293b; border:1.5px solid #334155;
    font-size:11px; color:#94a3b8; cursor:pointer;
    transition:all 0.15s; white-space:nowrap;
    font-weight:600; letter-spacing:0.02em;
}
.finish-tab:hover { border-color:#64748b; color:#fff; }
.finish-tab.selected {
    background:#C20016; border-color:#C20016; color:#fff;
}
.finish-tab-count {
    font-size:10px; opacity:0.75;
}

/* ── Lighting chips ──────────────────────────────────────────── */
.lighting-row { display:flex; flex-wrap:wrap; gap:6px; padding:4px 0; }
.lighting-chip {
    display:inline-flex; align-items:center; gap:5px;
    padding:5px 10px; border-radius:20px;
    background:#1e293b; border:1.5px solid #334155;
    font-size:11px; color:#94a3b8; cursor:pointer;
    transition:all 0.15s; white-space:nowrap;
}
.lighting-chip:hover { border-color:#64748b; color:#fff; }
.lighting-chip.selected {
    background:#C20016; border-color:#C20016; color:#fff;
    font-weight:700;
}

/* ── Two-tone toggle ─────────────────────────────────────────── */
.tt-toggle {
    display:inline-flex; border-radius:20px;
    background:#1e293b; border:1.5px solid #334155;
    padding:2px; cursor:pointer; user-select:none;
    transition:border-color 0.2s;
}
.tt-toggle:hover { border-color:#64748b; }
.tt-half {
    padding:4px 14px; border-radius:16px;
    font-size:11px; font-weight:700;
    transition:all 0.2s; white-space:nowrap;
}
.tt-half-off { color:#64748b; }
.tt-half-on  { color:#64748b; }
.tt-half-off.active { background:#334155; color:#e2e8f0; }
.tt-half-on.active  { background:#16a34a; color:#fff; }

/* ── Decision Confidence Boosters ───────────────────────────── */
.dcb-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    padding-bottom: 4px;
    border-top: 1px solid #334155;
}
.dcb-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Disclaimer overlay (shared) */
.disclaimer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.disclaimer-card {
    width: 100%;
    max-width: 680px;
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #334155;
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.6);
}
.disclaimer-header {
    background: #C20016;
    color: #fff;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 28px;
}
.disclaimer-body {
    padding: 24px 22px 22px;
}
.disclaimer-note {
    border: 1px solid #334155;
    background: rgba(30, 41, 59, 0.65);
    border-radius: 14px;
    padding: 14px;
}
.disclaimer-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 640px) {
    .disclaimer-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Component Hotspot Overlay ──────────────────────────────── */
.hotspot-wrap {
    position: relative;
}
.hotspot-wrap .hotspot-toggle {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(15,27,43,0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}
.hotspot-wrap .hotspot-toggle:hover {
    background: rgba(15,27,43,0.95);
    border-color: rgba(255,255,255,0.3);
}
.hotspot-wrap .hotspot-toggle.loading {
    pointer-events: none;
    opacity: 1;
    background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(99,102,241,0.25));
    border-color: rgba(99,102,241,0.6);
    color: #c7d2fe;
    padding-right: 14px;
    overflow: hidden;
    animation: hotspot-pulse 1.8s ease-in-out infinite;
}
.hotspot-wrap .hotspot-toggle.loading::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    animation: hotspot-shimmer 2s ease-in-out infinite;
}
@keyframes hotspot-pulse {
    0%, 100% { border-color: rgba(99,102,241,0.4); box-shadow: 0 0 6px rgba(99,102,241,0.15); }
    50%      { border-color: rgba(99,102,241,0.8); box-shadow: 0 0 14px rgba(99,102,241,0.35); }
}
@keyframes hotspot-shimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}
.hotspot-wrap .hotspot-toggle.judging {
    pointer-events: none;
    opacity: 0.6;
    border-color: rgba(250,204,21,0.4);
    color: rgba(250,204,21,0.8);
}
.hotspot-wrap .hotspot-toggle i { font-size: 10px; }

/* ── Hotspot "+" buttons ───────────────────────────────────── */
.hotspot-plus {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    background: rgba(15,27,43,0.85);
    backdrop-filter: blur(4px);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 5;
    box-shadow: 0 0 0 3px rgba(15,27,43,0.3), 0 2px 8px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 28px;
    text-align: center;
    padding-bottom: 1px;
}
.hotspot-plus .hp-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.4);
    animation: hotspot-ping 2s ease-out infinite;
}
@keyframes hotspot-ping {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2); opacity: 0; }
}
.hotspot-plus:hover {
    transform: translate(-50%, -50%) scale(1.15);
    border-color: #60a5fa;
    background: rgba(59,130,246,0.7);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.25), 0 0 16px rgba(59,130,246,0.3);
    z-index: 10;
}
.hotspot-plus .hp-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15,27,43,0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 4px 8px;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    color: #e2e8f0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 25;
}
.hotspot-plus:hover .hp-tooltip { opacity: 1; }
.hotspot-plus.has-change {
    border-color: #22c55e;
    background: rgba(34,197,94,0.7);
}
.hotspot-plus.has-change:hover {
    background: rgba(34,197,94,0.85);
    border-color: #4ade80;
}
.hotspot-plus.carousel-open {
    border-color: #60a5fa;
    background: rgba(59,130,246,0.7);
    z-index: 10;
}

/* ── Carousel popup ────────────────────────────────────────── */
.carousel-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 18;
}
.carousel-popup {
    position: absolute;
    z-index: 20;
    background: rgba(15,27,43,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    max-width: min(420px, 92%);
    min-width: 200px;
}
.carousel-popup .cp-title {
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
    padding: 0 2px;
}
.carousel-popup .cp-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.carousel-popup .cp-scroll::-webkit-scrollbar { height: 4px; }
.carousel-popup .cp-scroll::-webkit-scrollbar-track { background: transparent; }
.carousel-popup .cp-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.carousel-card {
    flex-shrink: 0;
    width: 80px;
    cursor: pointer;
    border-radius: 10px;
    border: 2px solid transparent;
    background: rgba(30,41,59,0.6);
    padding: 0;
    overflow: hidden;
    transition: all 0.2s;
    text-align: center;
    position: relative;
}
.carousel-card:hover {
    border-color: rgba(255,255,255,0.3);
    background: rgba(30,41,59,0.9);
}
.carousel-card.cc-selected {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.15);
}
.carousel-card.cc-staged {
    border-color: #22c55e;
    background: rgba(34,197,94,0.15);
}
/* Fixed-size clipping wrapper — isolates transform:scale to this box so the
   zoomed image cannot bleed into the name row below. */
.carousel-card .cc-img {
    position: relative;
    width: 100%;
    height: 72px;
    overflow: hidden;
    background: #1e293b;
}
.carousel-card .cc-img.cc-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #64748b;
}
.carousel-card .cc-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.00);
    transition: transform 0.15s ease-out;
}

/* ── Thumbnail rendering strategy (two modes) ─────────────────────────────

   1. "Texture / panel" categories (flooring, frontals): the source photo
      IS the product — there's no whitespace around it. object-fit:cover
      fills the card edge-to-edge; minor aspect cropping is acceptable
      because the material is homogeneous.

   2. "Isolated product on white" categories (sinks, taps, handles, ovens,
      dishwashers, fridge_freezers): Howdens product photography shoots the
      item dead-centre on a white studio background. object-fit:contain
      guarantees the FULL product is visible; the container background is
      set to white so the letterbox blends into the photo's native
      backdrop and doesn't look like a frame.

   Previous approach used object-fit:cover + transform:scale for every
   category. That clipped tap spouts, oven handles, and sink rims. Users
   asked for the whole product to be visible — contain + white delivers
   that cleanly. */
.carousel-card[data-cat="frontals"] .cc-img img {
    object-fit: cover;
    transform: scale(1.00);
}
/* Flooring source photos have some whitespace around the plank sample; the
   pattern itself is homogeneous (herringbone / plank repeat) so zooming in
   and cropping is lossless visually. User feedback: "flooring can be zoomed
   to fit the whole thing as it's just squares, it doesn't need the
   whitespace". */
.carousel-card[data-cat="flooring"] .cc-img img {
    object-fit: cover;
    transform: scale(1.20);
}

.carousel-card[data-cat="sinks"] .cc-img,
.carousel-card[data-cat="taps"] .cc-img,
.carousel-card[data-cat="handles"] .cc-img,
.carousel-card[data-cat="ovens"] .cc-img,
.carousel-card[data-cat="dishwashers"] .cc-img,
.carousel-card[data-cat="fridge_freezers"] .cc-img {
    background: #ffffff;
}
.carousel-card[data-cat="sinks"] .cc-img img,
.carousel-card[data-cat="taps"] .cc-img img,
.carousel-card[data-cat="handles"] .cc-img img,
.carousel-card[data-cat="ovens"] .cc-img img,
.carousel-card[data-cat="dishwashers"] .cc-img img,
.carousel-card[data-cat="fridge_freezers"] .cc-img img {
    object-fit: contain;
    transform: scale(1.00);
}
.carousel-card .cc-name {
    font-size: 9px;
    color: #e2e8f0;
    padding: 4px 6px 6px;
    background: rgba(15,23,42,0.75);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.carousel-card .cc-check {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #22c55e;
    color: white;
    font-size: 9px;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 0 2px rgba(15,23,42,0.6);
}
.carousel-card.cc-staged .cc-check { display: flex; }

/* "Keep original" skip card */
.carousel-card.cc-skip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 96px;
}
.carousel-card.cc-skip .cc-skip-icon {
    font-size: 20px;
    color: #64748b;
    margin-bottom: 4px;
}

/* ── Finish tab row inside the hotspot colour carousel ────── */
.carousel-popup .cp-finish-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 8px 0;
}
.carousel-popup .cp-finish-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 10px;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.02em;
}
.carousel-popup .cp-finish-tab:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.carousel-popup .cp-finish-tab.selected {
    background: #C20016;
    border-color: #C20016;
    color: #fff;
}
.carousel-popup .cp-finish-count { font-size: 9px; opacity: 0.75; }

/* ── Colour swatch carousel (two-tone) ────────────────────── */
.carousel-popup .cp-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding-top: 24px;
}
.colour-swatch-card {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.colour-swatch-card:hover { border-color: rgba(255,255,255,0.4); transform: scale(1.1); }
.colour-swatch-card.cs-selected { border-color: #3b82f6; }
.colour-swatch-card.cs-staged { border-color: #22c55e; }
.colour-swatch-card .cs-tooltip {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15,27,43,0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 2px 6px;
    white-space: nowrap;
    font-size: 9px;
    color: #e2e8f0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 30;
}
.colour-swatch-card:hover .cs-tooltip { opacity: 1; }

/* ── Pending changes bar ───────────────────────────────────── */
.pending-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    background: rgba(15,27,43,0.9);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 6px 10px;
    margin-top: 6px;
}
.pending-bar .pb-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 10px;
    color: #93c5fd;
}
.pending-bar .pb-pill .pb-remove {
    cursor: pointer;
    color: #f87171;
    font-size: 9px;
    margin-left: 2px;
}
.pending-bar .pb-pill .pb-remove:hover { color: #ef4444; }
.pending-bar .pb-generate {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #C20016;
    border: none;
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}
.pending-bar .pb-generate:hover { background: #a80013; }
.pending-bar .pb-generate i { font-size: 10px; }

/* ── Generating overlay (shown after carousel Generate click) ── */
.carousel-generating-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.80);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 20;
    border-radius: inherit;
}
.cgo-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cgo-spin 0.8s linear infinite;
}
@keyframes cgo-spin { to { transform: rotate(360deg); } }
.cgo-text {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.02em;
}

/* Skeleton loading placeholders */
@keyframes skeleton-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}
.skeleton-card {
    aspect-ratio: 1;
    border-radius: 12px;
}
.skeleton-text {
    height: 14px;
    margin-top: 8px;
    width: 70%;
    border-radius: 4px;
}
.skeleton-text-sm {
    height: 10px;
    margin-top: 4px;
    width: 50%;
    border-radius: 4px;
}

/* ── Before/After Slider (shared) ─────────────────────────── */
.ba-slider-v2 {
    position: relative; overflow: hidden;
    cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
.ba-slider-v2 .ba-after {
    display: block; width: 100%; height: auto;
    pointer-events: none;
}
.ba-slider-v2 .ba-before {
    position: absolute; inset: 0;
    clip-path: inset(0 50% 0 0);
}
.ba-slider-v2 .ba-before img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; pointer-events: none;
}
.ba-slider-v2 .ba-handle {
    position: absolute; top: 0; bottom: 0; left: 50%;
    width: 3px; background: #fff; transform: translateX(-50%);
    z-index: 10; box-shadow: 0 0 8px rgba(0,0,0,0.5);
}
.ba-slider-v2 .ba-handle::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.95); border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5'%3E%3Cpath d='M8 4l-6 8 6 8'/%3E%3Cpath d='M16 4l6 8-6 8'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center; background-size: 20px;
}
.ba-slider-v2 .ba-label {
    position: absolute; bottom: 8px; padding: 2px 10px;
    background: rgba(0,0,0,0.6); color: #fff; font-size: 11px;
    font-weight: 600; border-radius: 4px; z-index: 5;
    letter-spacing: 0.5px; text-transform: uppercase;
    transition: opacity 0.15s ease;
}
.ba-slider-v2 .ba-label-before { left: 8px; }
.ba-slider-v2 .ba-label-after { right: 8px; }
