/* ─── Photo Inspection Mode ─── */

/* Active inspection button */
.photo-inspect-btn.active,
.viewer-toolbar-btn[data-tool="photo-inspect"].active {
    background: rgba(255, 193, 7, 0.3);
    border-color: #ffc107;
    color: #ffd54f;
}

/* Photo inspect type badge in right panel */
.vrp-type-badge.type-photo-inspect {
    background: rgba(255, 193, 7, 0.2);
    color: #ffd54f;
}

/* Clickable photo rows in right panel */
.vrp-row-clickable {
    cursor: pointer;
    transition: background 0.15s;
}
.vrp-row-clickable:hover {
    background: rgba(255, 193, 7, 0.15);
}
.vrp-row-clickable .vrp-row-label {
    text-decoration: underline;
    text-decoration-color: rgba(255, 193, 7, 0.4);
}

/* Inspection crosshair cursor */
.viewer-geo-container.photo-inspect-cursor,
.viewer-potree-container.photo-inspect-cursor {
    cursor: crosshair !important;
}

/* ─── Photo Viewer Overlay (provisional) ─── */

.photo-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.photo-viewer-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.photo-viewer-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.photo-viewer-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-family: monospace;
}
.photo-viewer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.7;
}
.photo-viewer-close:hover {
    opacity: 1;
}

.photo-viewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    overflow: hidden;
    min-height: 0;
}
.photo-viewer-prev,
.photo-viewer-next {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.photo-viewer-prev:hover,
.photo-viewer-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.photo-viewer-canvas-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
}
.photo-viewer-canvas {
    max-width: 100%;
    max-height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.photo-viewer-loading {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ─── Pylon Switch Dialog ─── */
.pv-switch-dialog-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-switch-dialog {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 20px 24px;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.pv-switch-dialog-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pv-switch-dialog-title i {
    color: #FF9800;
}

.pv-switch-dialog-msg {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 16px;
}

.pv-switch-dialog-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pv-switch-dialog-actions .btn {
    text-align: left;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 4px;
}

.pv-switch-dialog-actions .btn i {
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.pv-switch-dialog-actions .btn.pv-switch-focused {
    outline: 2px solid #fff;
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.12);
}

/* ─── Reference photo button (additive, distinct from illustration star) ─── */
.photo-viewer-ref-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
}
.photo-viewer-ref-btn:hover {
    opacity: 1;
}
.photo-viewer-ref-btn.active {
    opacity: 1;
}

/* ─── Component pins: palette panel (reference photo) ─── */
.photo-viewer-comp-panel,
.photo-viewer-comp-assign {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.pv-comp-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    padding: 4px 10px 6px;
    line-height: 1.3;
}

.pv-comp-palette,
.pv-comp-assign-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px;
}

.pv-comp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #ddd;
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.pv-comp-chip:hover {
    background: rgba(255, 255, 255, 0.12);
}
.pv-comp-chip.selected {
    background: rgba(79, 195, 247, 0.2);
    border-color: #4FC3F7;
    color: #fff;
}
.pv-comp-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.pv-comp-chip-name {
    white-space: nowrap;
}

.pv-comp-count {
    background: rgba(79, 195, 247, 0.25);
    color: #4FC3F7;
    border-radius: 10px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 600;
}

.pv-comp-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 10px;
}

/* ─── Component assign (detail photo) ─── */
.pv-comp-assign-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 8px;
    font-size: 12px;
    color: #ddd;
}
.pv-comp-assign-empty {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}
.pv-comp-assign-name {
    font-weight: 600;
    color: #fff;
}
.pv-comp-assign-clear {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0 2px;
    margin-left: auto;
}
.pv-comp-assign-clear:hover {
    color: #ff6b6b;
}

/* ─── Component pin markers on the image ─── */
.pv-comp-pin-wrap {
    background: transparent;
    border: none;
}
.pv-comp-pin {
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pv-comp-pin-letter {
    transform: rotate(45deg);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
.pv-comp-pin-pulse {
    animation: pv-comp-pin-pulse 0.6s ease-in-out 2;
}
@keyframes pv-comp-pin-pulse {
    0%, 100% { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(79, 195, 247, 0.5); }
}
.pv-pin-tooltip {
    font-size: 11px;
}

/* Crosshair cursor on the map when a component is armed for placement */
.photo-viewer-map-wrap.pv-comp-placing .photo-viewer-map {
    cursor: crosshair;
}

