/* ── Photo Viewer: Thermal Controls ─────────────────────────── */

/* Thermal metadata section */
.pv-meta-thermal {
    border-left: 3px solid #ff6b35;
    padding-left: 6px;
}

.pv-meta-thermal .pv-meta-title {
    color: #ff6b35;
}

.pv-meta-thermal .pv-meta-title i {
    margin-right: 4px;
    font-size: 11px;
}

/* Palette selector */
.pv-thermal-palette {
    width: 100%;
    padding: 2px 4px;
    font-size: 11px;
    border: 1px solid #444;
    border-radius: 3px;
    background: #2a2a2a;
    color: #ddd;
    cursor: pointer;
    margin-top: 2px;
}

.pv-thermal-palette:focus {
    outline: none;
    border-color: #ff6b35;
}

.pv-thermal-palette option {
    background: #2a2a2a;
    color: #ddd;
}

/* ── Temperature Range Section ──────────────────────────────── */

.pv-thermal-range-section {
    margin-top: 6px;
    padding: 4px 0;
}

.pv-thermal-range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.pv-thermal-range-header .pv-meta-label {
    font-size: 10px;
}

.pv-thermal-range-reset {
    background: none;
    border: 1px solid #555;
    border-radius: 3px;
    color: #aaa;
    padding: 1px 5px;
    font-size: 10px;
    cursor: pointer;
    line-height: 1;
}

.pv-thermal-range-reset:hover {
    color: #ff6b35;
    border-color: #ff6b35;
}

.pv-thermal-range-values {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #ccc;
    margin-bottom: 4px;
}

.pv-thermal-tmin-input,
.pv-thermal-tmax-input {
    width: 52px;
    padding: 1px 3px;
    font-size: 10px;
    border: 1px solid #444;
    border-radius: 2px;
    background: #2a2a2a;
    color: #ff6b35;
    font-family: monospace;
    text-align: right;
}

.pv-thermal-tmin-input:focus,
.pv-thermal-tmax-input:focus {
    outline: none;
    border-color: #ff6b35;
}

/* Dual-range slider */
.pv-thermal-range-slider {
    position: relative;
    height: 20px;
    margin: 2px 0 4px;
}

.pv-thermal-range-slider input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
}

.pv-thermal-range-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: #333;
}

.pv-thermal-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff6b35;
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: auto;
    margin-top: -5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pv-thermal-range-slider input[type="range"]::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: #333;
    border: none;
}

.pv-thermal-range-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff6b35;
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Hide track of top slider (max) so bottom track shows through */
.pv-thermal-rmax::-webkit-slider-runnable-track {
    background: transparent !important;
}

.pv-thermal-rmax::-moz-range-track {
    background: transparent !important;
}

/* ── Thermal Parameters Section ─────────────────────────────── */

.pv-thermal-params-section {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #3a3a3a;
}

.pv-thermal-params-section .pv-meta-title {
    font-size: 10px;
    color: #ff6b35;
    margin-bottom: 4px;
}

.pv-thermal-param {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 3px;
}

.pv-thermal-param label {
    font-size: 10px;
    color: #888;
    width: 65px;
    flex-shrink: 0;
}

.pv-thermal-param input[type="number"] {
    flex: 1;
    min-width: 0;
    padding: 2px 4px;
    font-size: 10px;
    border: 1px solid #444;
    border-radius: 2px;
    background: #2a2a2a;
    color: #ddd;
    font-family: monospace;
}

.pv-thermal-param input[type="number"]:focus {
    outline: none;
    border-color: #ff6b35;
}

.pv-thermal-unit {
    font-size: 10px;
    color: #666;
    width: 16px;
    flex-shrink: 0;
}

/* Recalculate button */
.pv-thermal-recalculate {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 4px 8px;
    font-size: 10px;
    border: 1px solid #ff6b35;
    border-radius: 3px;
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    cursor: pointer;
    transition: background 0.15s;
}

.pv-thermal-recalculate:hover {
    background: rgba(255, 107, 53, 0.25);
}

.pv-thermal-recalculate:disabled {
    opacity: 0.6;
    cursor: wait;
}

.pv-thermal-recalculate i {
    margin-right: 4px;
}

/* ── Temperature Cursor Readout ─────────────────────────────── */

.pv-thermal-readout {
    position: absolute;
    bottom: 60px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #ff6b35;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: monospace;
    pointer-events: none;
    z-index: 1001;
    display: none;
    border: 1px solid rgba(255, 107, 53, 0.4);
}

.pv-thermal-readout.visible {
    display: block;
}

/* Thermal badge in filmstrip thumbnails */
.pv-filmstrip-thermal-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 107, 53, 0.85);
    color: #fff;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
    pointer-events: none;
}
