/* WebXR Phase 1: AR / VR / Look around controls for the recovery hookup lab only.
   Kept out of style.css so the shared stylesheet (immutable, ?v=47 on every page) is untouched. */

.lab-xr-row[hidden],
.lab-xr-row [hidden],
.lab-xr-overlay[hidden] { display: none !important; }

.lab-xr-row {
    display: grid;
    gap: 6px;
    padding: 10px 14px 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
    background: rgba(15, 23, 42, 0.86);
}

.lab-xr-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lab-xr-buttons button,
.lab-xr-overlay button {
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 11px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.12);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.lab-xr-buttons button:hover,
.lab-xr-buttons button:focus-visible { border-color: #38bdf8; background: rgba(14, 165, 233, 0.2); transform: translateY(-1px); }
.lab-xr-buttons button:disabled { opacity: 0.55; cursor: progress; transform: none; }
.lab-xr-buttons [data-xr-action="exit-look"] { border-color: rgba(251, 191, 36, 0.45); color: #fde68a; background: rgba(245, 158, 11, 0.1); }

.lab-xr-note,
.lab-xr-status {
    margin: 0;
    color: #94a3b8;
    font-size: 0.66rem;
    line-height: 1.45;
}

.lab-xr-status { color: #fde68a; }
.lab-xr-status:empty { display: none; }

/* Phone AR: the browser shows this element full screen over the camera (dom-overlay). */
.lab-xr-overlay {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    color: #f8fafc;
    pointer-events: none;
}

.lab-xr-overlay-top,
.lab-xr-overlay-steps {
    display: grid;
    gap: 8px;
    pointer-events: auto;
}

.lab-xr-overlay-actions { display: flex; gap: 8px; justify-content: flex-end; }
.lab-xr-overlay [data-xr-action="exit-xr"] { border-color: rgba(251, 191, 36, 0.5); color: #fde68a; background: rgba(8, 18, 37, 0.82); }
.lab-xr-overlay [data-xr-action="scale"] { background: rgba(8, 18, 37, 0.82); }

.lab-xr-hint {
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(8, 18, 37, 0.78);
    font-size: 0.8rem;
    line-height: 1.4;
}

.lab-xr-hint:empty { display: none; }

.lab-xr-overlay .lab-step-readout { background: rgba(8, 18, 37, 0.84); }
.lab-xr-overlay .lab-step-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.lab-xr-overlay .lab-step-controls .lab-step-full { grid-column: auto; }
.lab-xr-overlay .lab-step-controls button { min-height: 46px; padding: 5px; background: rgba(8, 18, 37, 0.84); }
.lab-xr-overlay .lab-step-controls button > small { display: none; }

body.theme-light .lab-xr-row { background: rgba(255, 255, 255, 0.9); }
body.theme-light .lab-xr-buttons button { color: #0c4a6e; background: rgba(14, 165, 233, 0.08); }
body.theme-light .lab-xr-note { color: #475569; }
body.theme-light .lab-xr-status { color: #92400e; }

@media (prefers-reduced-motion: reduce) {
    .lab-xr-buttons button { transition: none; }
    .lab-xr-buttons button:hover,
    .lab-xr-buttons button:focus-visible { transform: none; }
}
