/**
 * cardexx Showroom v2 - 3D Perspective Grid
 * Premium brand showcase with live adjustment controls
 */

/* ================================================================
   RESET & BASE
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
    overflow: hidden;
}

:root {
    --panel-shift: 0%;
}

/* ================================================================
   SHOWROOM CONTAINER
   ================================================================ */

#showroom-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ================================================================
   BACKGROUND IMAGE
   ================================================================ */

#showroom-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/showroom/showroom_wall_drivecharts_20260412e.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ================================================================
   LOGO GRID (3D Perspective)
   ================================================================ */

#logo-grid {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 1%;
    
    /* Default position - will be adjusted via JS */
    left: var(--grid-x, 52%);
    top: var(--grid-y, 18%);
    width: var(--grid-w, 42%);
    height: var(--grid-h, 62%);
    
    /* 3D Transform */
    transform-style: preserve-3d;
    perspective: var(--perspective, 800px);
    transform: 
        translateX(var(--panel-shift, 0%))
        perspective(var(--perspective, 800px))
        rotateY(var(--rotate-y, -15deg))
        skewX(var(--skew-x, 0deg))
        skewY(var(--skew-y, 0deg));
    transition: transform 0.4s ease;
    
    z-index: 10;
}

/* ================================================================
   LOGO CELLS
   ================================================================ */

.logo-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* CRITICAL: Clip logos to cell boundaries, allow overflow only on hover */
    overflow: hidden;
    transition: z-index 0s;
    /* Prevent cell from growing */
    min-width: 0;
    min-height: 0;
}

.logo-cell.empty {
    pointer-events: none;
}

.logo-cell .logo-wrapper {
    /* Fixed size container - doesn't grow with logo */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Smoother, less bouncy transition to reduce flickering */
    transition: transform 0.25s ease-out;
    will-change: transform;
}

.logo-cell img {
    /* Logo fills cell based on scale - NO padding/margin */
    width: calc(var(--logo-scale, 70%) * var(--individual-scale, 1));
    height: calc(var(--logo-scale, 70%) * var(--individual-scale, 1));
    max-width: none;  /* Remove max constraints */
    max-height: none;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: 
        filter 0.3s ease,
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Position adjustments only - scale is in width/height */
    transform: 
        translateX(var(--offset-x, 0px))
        translateY(var(--offset-y, 0px));
}

.logo-cell[data-brand="audi"] img,
.logo-cell[data-brand="jaguar"] img,
.logo-cell[data-brand="lexus"] img {
    filter:
        drop-shadow(0 4px 14px rgba(0, 0, 0, 0.56))
        contrast(1.72)
        brightness(0.58)
        saturate(1.02);
}

.logo-cell[data-brand="bentley"] img {
    filter:
        drop-shadow(0 4px 14px rgba(0, 0, 0, 0.52))
        contrast(1.72)
        brightness(0.56)
        saturate(1.02);
}

.logo-cell[data-brand="lamborghini"] img {
    filter:
        drop-shadow(0 4px 16px rgba(0, 0, 0, 0.52))
        contrast(1.42)
        brightness(0.86)
        saturate(1.22);
}

.logo-cell[data-brand="porsche"] img {
    filter:
        drop-shadow(0 4px 14px rgba(0, 0, 0, 0.42))
        contrast(1.18)
        brightness(1.02)
        saturate(1.06);
}

/* ================================================================
   HOVER EFFECT - Progressive scale based on distance to center
   ================================================================ */

.logo-cell:hover {
    z-index: 100;
    /* Allow overflow on hover so logo can grow beyond cell */
    overflow: visible;
}

.logo-cell:hover .logo-wrapper {
    transform: scale(var(--hover-scale, 2));
}

.logo-cell:hover img {
    filter: 
        drop-shadow(0 8px 25px rgba(0, 0, 0, 0.5))
        brightness(1.1);
}

/* Neighbor cells get partial scale */
.logo-cell.neighbor-1 {
    overflow: visible;
}

.logo-cell.neighbor-1 .logo-wrapper {
    transform: scale(1.3);
    z-index: 50;
}

.logo-cell.neighbor-2 {
    overflow: visible;
}

.logo-cell.neighbor-2 .logo-wrapper {
    transform: scale(1.1);
    z-index: 40;
}

/* ================================================================
   SELECTED STATE
   ================================================================ */

.logo-cell.selected {
    z-index: 90;
}

.logo-cell.selected img {
    filter: 
        drop-shadow(0 0 15px rgba(212, 175, 55, 0.6))
        brightness(1.1);
}

/* ================================================================
   PODIUM AREA
   ================================================================ */

#podium-area {
    position: absolute;
    bottom: 8%;
    left: 25%;
    width: 30%;
    height: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 120;
    isolation: isolate;
}

/* White circular background - HIDDEN (logo now sits on podium base, no floating glow) */
#podium-bg {
    display: none;
}

/* SOCKEL L - Brand Logo - HIDDEN (replaced by model text) */
#podium-logo-wrapper {
    display: none !important;
}

/* Debug: show SOCKEL L trapezoid boundary */
.showroom-debug #podium-logo-wrapper {
    outline: 2px dashed rgba(212, 175, 55, 0.9);
    outline-offset: 2px;
    background: rgba(212, 175, 55, 0.15);
}
.showroom-debug #podium-logo-wrapper::before {
    content: 'SOCKEL L (Logo)';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) rotateY(8deg) rotateX(-68deg);
    font-size: 11px;
    color: #D4AF37;
    background: rgba(0,0,0,0.9);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 600;
}

#podium-logo {
    /* Fill square parent container - auto-scales any logo */
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
    transition: opacity 0.4s ease;
}

#podium-logo.visible {
    opacity: 1;
}

#podium-logo.rotating {
    animation: none; /* Disable rotation - logo sits static on podium base */
}

/* PODIUM TOP - Car Image (on podium surface) */
/* Uses CSS custom props set on :root by JS: --podium-vehicle-x, --podium-vehicle-y, --podium-vehicle-scale */
/* v119: shifted further right (38%) to center on podium surface visually */
.podium-car {
    position: fixed;
    left: var(--podium-vehicle-x, 40%);
    top: var(--podium-vehicle-y, 55%);
    width: min(28vw, 360px);
    max-width: 360px;
    transform: translate(-50%, -50%) scale(var(--podium-vehicle-scale, 1));
    pointer-events: auto;
    transition: all 0.4s ease;
    z-index: 140;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(14, 14, 14, 0.78), rgba(14, 14, 14, 0.52));
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    isolation: isolate;
}

/* Car image fades in when visible, but container always accepts clicks for nav */
.podium-car #podium-car-image {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.podium-car.visible #podium-car-image {
    opacity: 1;
}

/* Debug: show PODIUM TOP boundary */
.showroom-debug .podium-car {
    outline: 2px dashed rgba(0, 200, 100, 0.9);
    outline-offset: 2px;
    background: rgba(0, 200, 100, 0.1);
}
.showroom-debug .podium-car::before {
    content: 'PODIUM TOP (Car)';
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #00C864;
    background: rgba(0,0,0,0.9);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 600;
}

#podium-car-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.55));
}

/* Brand logo left of car image - white oval background */
/* v119: Shows immediately when brand selected, logo fills 85% of oval */
.podium-brand-logo {
    position: absolute;
    left: calc(-190px - 1cm);
    top: 50%;
    transform: translateY(-50%);
    width: 190px;
    height: 190px;
    background: radial-gradient(circle at 35% 30%, rgba(54, 54, 54, 0.94), rgba(16, 16, 16, 0.92));
    backdrop-filter: blur(8px);
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 145;
    pointer-events: none;
    overflow: hidden;
}

/* Show logo as soon as brand is selected (via .brand-selected class on .podium-car) */
.podium-car.brand-selected .podium-brand-logo {
    opacity: 1;
}

/* Logo bitmap is alpha-cropped at runtime, then drawn into the circle with a
   normalized footprint so every selected brand reads at the same visual size. */
.podium-brand-logo img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform: none;
    filter: brightness(1.04) contrast(1.08) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.28));
}

.podium-brand-logo[data-brand="audi"] img,
.podium-brand-logo[data-brand="bentley"] img,
.podium-brand-logo[data-brand="aston-martin"] img,
.podium-brand-logo[data-brand="lexus"] img,
.podium-brand-logo[data-brand="jaguar"] img {
    filter: brightness(1.34) contrast(1.22) drop-shadow(0 3px 7px rgba(0, 0, 0, 0.34));
}

/* SOCKEL L - Model Text - HIDDEN (v119: variant shows inside car image instead) */
#podium-model-text {
    display: none !important;
}

/* Wandschrank logo hidden state when selected */
.logo-cell.brand-active {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.logo-cell.brand-active img {
    opacity: 0 !important;
    filter: grayscale(1) brightness(0.5);
}

/* Podium text labels (variant only - brand text removed, logo used instead) */
.podium-text {
    position: absolute;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    z-index: 3;
}

.podium-text.visible {
    opacity: 1;
}

/* SOCKEL L - Model Text - HIDDEN (replaced by #podium-model-text) */
.podium-text-brand {
    display: block !important;
    left: 38%;
    top: auto;
    right: auto;
    bottom: 7.4%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #f3d15f;
    background: rgba(12, 12, 12, 0.74);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 999px;
    padding: 6px 14px;
    z-index: 31;
}

/* Vehicle text - HIDDEN (not needed on podium) */
.podium-text-vehicle {
    display: none !important;
}

/* Vehicle Navigation - Inside PODIUM TOP image area, top corners */
.vehicle-nav-bar {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 150;
}

.vehicle-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 56px;
    padding: 0;
    background: rgba(8, 8, 8, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 999px;
    color: #D4AF37;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.32);
}

.vehicle-nav-btn:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: #D4AF37;
    color: #f5df87;
}

#vehicle-nav-prev {
    left: -17px;
}

#vehicle-nav-next {
    right: -17px;
}

.vehicle-nav-label {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 151;
}

.vehicle-nav-label.visible {
    opacity: 1;
}

.podium-car.preview-mode .vehicle-nav-label {
    left: auto;
    right: 16px;
    bottom: -12px;
    transform: none;
    font-size: 10px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(8, 8, 8, 0.86);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 999px;
    padding: 5px 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.podium-preview-browser {
    position: absolute;
    inset: 14px 16px 14px;
    display: none;
    z-index: 146;
    pointer-events: auto;
}

.podium-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    height: 100%;
}

.podium-preview-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 0;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.78), rgba(10, 10, 10, 0.56));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.podium-preview-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(212, 175, 55, 0.42);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.podium-preview-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
    border-radius: 10px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08), rgba(255,255,255,0.01));
}

.podium-preview-caption {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-preview-caption small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: rgba(212, 175, 55, 0.82);
}

/* Empty state placeholder - inside podium-car */
.podium-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.podium-car.visible .podium-placeholder {
    opacity: 0;
}

.podium-car.preview-mode .podium-placeholder {
    opacity: 0;
}

.podium-placeholder p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    margin: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

/* Variant Text - Positioned at bottom center of car image (inside podium-car) */
.podium-text-variant {
    position: absolute;
    left: 50%;
    bottom: 7.4%;
    right: auto;
    top: auto;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 2px 8px rgba(0,0,0,0.95);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    z-index: 151;
}

.podium-car.preview-mode .podium-text-variant {
    max-width: calc(100% - 132px);
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 16px;
    padding-right: 16px;
}

/* Debug: show SOCKEL R trapezoid boundary */
.showroom-debug .podium-text-variant {
    outline: 2px dashed rgba(100, 150, 255, 0.9);
    outline-offset: 2px;
    background: rgba(100, 150, 255, 0.15);
    padding: 10px 20px;
}
.showroom-debug .podium-text-variant::after {
    content: 'SOCKEL R (Variant)';
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%) rotateY(-8deg) rotateX(-68deg);
    font-size: 11px;
    color: #6496FF;
    background: rgba(0,0,0,0.9);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0;
    font-weight: 600;
}

/* Podium scale adjustment for non-square logos */
#podium-logo[data-aspect="wide"] {
    /* Wide logos get height boost */
    height: calc(var(--podium-logo-size, 250px) * var(--podium-scale, 1));
}

#podium-logo[data-aspect="tall"] {
    /* Tall logos get width boost */
    width: calc(var(--podium-logo-size, 250px) * var(--podium-scale, 1));
}

@keyframes rotate360 {
    from { transform: perspective(600px) rotateY(0deg); }
    to { transform: perspective(600px) rotateY(360deg); }
}

/* ================================================================
   CONTROL PANEL
   ================================================================ */

#control-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 320px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Production: hide calibration panel unless debug flag is set */
#control-panel {
    display: none;
}

.showroom-debug #control-panel {
    display: block;
}

.showroom-debug-clean #control-panel {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

#control-panel.collapsed {
    width: 50px;
    height: 50px;
    overflow: hidden;
}

#control-panel.collapsed #panel-content {
    display: none;
}

#toggle-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 6px;
    color: #D4AF37;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

#toggle-panel:hover {
    background: rgba(212, 175, 55, 0.4);
}

#panel-content {
    padding: 50px 15px 15px;
}

#panel-content h3 {
    color: #D4AF37;
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.control-panel__hint {
    margin: -6px 0 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    line-height: 1.45;
}

.control-panel__hint code,
#control-status code {
    color: #F0D980;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: 'Monaco', monospace;
}

.control-section {
    margin-bottom: 20px;
    scroll-margin-top: 18px;
    border-radius: 10px;
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.control-section.control-section--active {
    background: rgba(212, 175, 55, 0.08);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.22);
    padding: 10px 10px 8px;
}

.control-section h4 {
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.slider-row label {
    width: 70px;
    font-size: 0.8rem;
    color: #aaa;
}

.slider-row input[type="range"] {
    flex: 1;
    height: 4px;
    accent-color: #D4AF37;
    cursor: pointer;
}

.slider-row .value {
    width: 50px;
    font-size: 0.75rem;
    color: #D4AF37;
    text-align: right;
    font-family: 'Monaco', monospace;
}

.control-section select {
    width: 100%;
    padding: 8px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    margin-bottom: 10px;
}

.control-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.control-actions button {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #D4AF37;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-actions button:hover {
    background: rgba(212, 175, 55, 0.3);
}

.control-actions--secondary {
    margin-top: 8px;
    padding-top: 0;
    border-top: 0;
}

.control-meta {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#control-status {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    line-height: 1.45;
}

#control-status[data-tone="success"] {
    color: #E8DFA9;
}

#control-status[data-tone="warn"] {
    color: #F4C785;
}

#export-output {
    width: 100%;
    min-height: 148px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(8, 8, 8, 0.62);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    line-height: 1.45;
    font-family: 'Monaco', 'Menlo', monospace;
    white-space: pre;
}

/* ================================================================
   DEBUG MODE
   ================================================================ */

.debug-mode .logo-cell {
    outline: 1px solid rgba(0, 255, 0, 0.5);
}

.debug-mode #logo-grid {
    outline: 2px solid red;
}

.debug-mode .logo-cell::after {
    content: attr(data-index);
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 10px;
    color: lime;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 4px;
    border-radius: 2px;
}

.showroom-debug-clean #podium-logo-wrapper,
.showroom-debug-clean .podium-car,
.showroom-debug-clean .podium-text-variant {
    outline-color: rgba(212, 175, 55, 0.48);
}

.showroom-debug-clean #podium-logo-wrapper::before,
.showroom-debug-clean .podium-car::before,
.showroom-debug-clean .podium-text-variant::after {
    color: rgba(248, 240, 206, 0.94);
    background: rgba(10, 10, 10, 0.82);
    border: 1px solid rgba(212, 175, 55, 0.22);
}

.showroom-debug-clean .podium-text-variant {
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 14px;
}

.showroom-debug-clean .podium-text-variant::after {
    color: #D4AF37;
}

.showroom-debug-clean #showroom-container.debug-mode #logo-grid {
    outline: 1px solid rgba(212, 175, 55, 0.62) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.showroom-debug-clean #showroom-container.debug-mode .logo-cell {
    outline: 1px solid rgba(212, 175, 55, 0.22) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.showroom-debug-clean #showroom-container.debug-mode .logo-cell::after {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(10, 10, 10, 0.68);
    border: 1px solid rgba(212, 175, 55, 0.18);
}

.showroom-debug-clean .logo-cell,
.showroom-debug-clean .logo-wrapper,
.showroom-debug-clean .logo-cell img {
    background: transparent !important;
}

.showroom-debug [data-calibration-target] {
    cursor: pointer;
}

.showroom-debug [data-calibration-target]:hover {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.showroom-debug #podium-text-vehicle[data-calibration-target]:hover,
.showroom-debug #podium-text-brand[data-calibration-target]:hover,
.showroom-debug #podium-text-variant[data-calibration-target]:hover {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.28);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
    #control-panel {
        width: 100%;
        max-width: none;
        top: auto;
        bottom: 0;
        right: 0;
        border-radius: 12px 12px 0 0;
        max-height: 50vh;
    }
    
    #control-panel.collapsed {
        width: 100%;
        height: 50px;
    }
}
