/* HeatTransferLab Custom Styles */
.heat-lab-container {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.bg-gradient-danger-subtle {
    background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 50%, #fecaca 100%);
}

/* Tab Navigation */
.heat-lab-container .nav-pills .nav-link {
    color: #4b5563;
    transition: all 0.2s ease-in-out;
}

.heat-lab-container .nav-pills .nav-link:hover {
    background-color: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.heat-lab-container .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ==================== Virtual Thermometer Styles ==================== */
.thermometers-stage {
    background: radial-gradient(circle at center, #ffffff 0%, #f3f4f6 100%);
}

.thermometer-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thermometer {
    position: relative;
    width: 28px;
    height: 260px;
}

.thermometer-glass {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thermometer-stem {
    position: relative;
    width: 18px;
    height: 210px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid #9ca3af;
    border-radius: 10px 10px 0 0;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15), 0 2px 5px rgba(0,0,0,0.08);
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.thermometer-stem::before {
    /* Glass highlight glare */
    content: '';
    position: absolute;
    top: 6px;
    left: 2px;
    width: 3px;
    bottom: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    z-index: 5;
    pointer-events: none;
}

.thermometer-level {
    position: absolute;
    bottom: 0;
    width: 8px;
    background: linear-gradient(90deg, #ff4d4f 0%, #d9363e 50%, #b81414 100%);
    border-radius: 4px 4px 0 0;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.5);
}

.thermometer.lab .thermometer-level {
    background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 50%, #052c65 100%);
    box-shadow: 0 0 6px rgba(13, 110, 253, 0.5);
}

.thermometer-bulb {
    position: relative;
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 35% 35%, #ff7875 0%, #d9363e 45%, #820014 100%);
    border-radius: 50%;
    border: 2px solid #9ca3af;
    margin-top: -6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    z-index: 3;
}

.thermometer.lab .thermometer-bulb {
    background: radial-gradient(circle at 35% 35%, #6ea8fe 0%, #0d6efd 45%, #052c65 100%);
}

/* Clinical Kink Notch */
.thermometer-kink {
    position: absolute;
    bottom: 12px;
    left: -4px;
    right: -4px;
    height: 10px;
    border-top: 2px dashed #dc3545;
    border-bottom: 2px dashed #dc3545;
    background: rgba(220, 53, 69, 0.12);
    z-index: 6;
}

.kink-label {
    position: absolute;
    left: 22px;
    top: -5px;
    font-size: 10px;
    font-weight: 700;
    color: #dc3545;
    background: #fff;
    padding: 0 4px;
    border-radius: 3px;
    border: 1px solid #dc3545;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.thermometer-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 210px;
    padding-left: 6px;
    font-size: 0.72rem;
    line-height: 1.1;
}

.scale-mark {
    position: relative;
    padding-left: 8px;
}

.scale-mark::before {
    content: '-';
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Canvas styling */
.canvas-container canvas {
    touch-action: none;
    user-select: none;
}

/* Dark mode compatibility */
[data-bs-theme="dark"] .bg-gradient-danger-subtle {
    background: linear-gradient(135deg, #2b1115 0%, #3e161c 50%, #4c1d24 100%);
    color: #f8d7da;
}

[data-bs-theme="dark"] .thermometers-stage {
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .thermometer-stem {
    background: rgba(30, 41, 59, 0.85);
    border-color: #475569;
}

[data-bs-theme="dark"] .kink-label {
    background: #1e293b;
    color: #ff7875;
    border-color: #ff7875;
}
