/* ══════════════════════════════════════════════
   EN ISO 7730 Comfort Calculator Styles
   ══════════════════════════════════════════════ */

.comfort-page {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 18px;
}

/* ── Card ── */
.comfort-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.comfort-card-header {
    padding: 4px 10px;
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
}

.comfort-card-header h5,
.comfort-card-header h6 {
    color: #128c59;
    font-weight: 600;
}

.comfort-card-body {
    padding: 8px 10px;
}

/* ── Sections ── */
.comfort-section {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comfort-section:last-of-type {
    border-bottom: none;
}

.comfort-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    color: #374151;
}

.comfort-label-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.comfort-value {
    display: inline-block;
    min-width: 42px;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a472a;
    font-family: 'Segoe UI', monospace;
}

.comfort-unit {
    font-size: 0.75rem;
    color: #6b7280;
    min-width: 28px;
}

/* ── Range inputs (styled green) ── */
.comfort-section .form-range::-webkit-slider-thumb {
    background: #0f973d;
}

.comfort-section .form-range::-moz-range-thumb {
    background: #0f973d;
}

.comfort-section .form-range::-webkit-slider-runnable-track {
    background: #d1fae5;
}

.comfort-section .form-range::-moz-range-track {
    background: #d1fae5;
}

.comfort-section .form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(15, 151, 61, 0.25);
}

/* ── PMV Bar ── */
.comfort-results {
    background: transparent;
    border-radius: 0;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.comfort-pmv-bar-wrapper {
    position: relative;
    height: 28px;
    margin-bottom: 4px;
}

.comfort-pmv-gradient {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(to right,
            #0000ff 0%,
            #00aaff 16.7%,
            #00ff00 33.3%,
            #00ff00 50%,
            #ffff00 66.7%,
            #ff8800 83.3%,
            #ff0000 100%);
}

.comfort-pmv-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 24px;
    background: #000;
    border-radius: 1px;
    transform: translateX(-50%);
    transition: left 0.15s ease;
    left: 50%;
}

.comfort-pmv-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #9ca3af;
    padding: 0 2px;
}

.comfort-pmv-description {
    line-height: 1.4;
}

/* ── Local Discomfort ── */
.comfort-discomfort-col {
    padding: 10px 12px;
    border-left: 1px solid #e0e0e0;
}

.comfort-discomfort-col:first-child {
    border-left: none;
}

@media (max-width: 991.98px) {
    .comfort-discomfort-col:nth-child(odd) {
        border-left: none;
    }
    .comfort-discomfort-col:nth-child(n+3) {
        border-top: 1px solid #e0e0e0;
    }
}

@media (max-width: 767.98px) {
    .comfort-discomfort-col {
        border-left: none !important;
        border-top: 1px solid #e0e0e0;
    }
    .comfort-discomfort-col:first-child {
        border-top: none;
    }
}

.comfort-discomfort-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: #212121;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comfort-discomfort-result {
    text-align: center;
    font-size: 1rem;
    color: #374151;
    padding-top: 6px;
    margin-top: 8px;
}

.comfort-discomfort-result .fw-bold {
    color: #1a472a;
    font-size: 1.15rem;
}

.comfort-discomfort-col .form-label {
    font-size: 0.72rem;
    color: #6b7280;
}

.comfort-discomfort-col .input-group-text {
    font-size: 0.7rem;
    padding: 1px 4px;
    background-color: #fff;
    border-color: #e0e0e0;
}

.comfort-discomfort-col .form-control {
    font-size: 0.78rem;
    padding: 2px 4px;
    background-color: #fff;
    border-color: #e0e0e0;
}

.comfort-discomfort-col .form-select {
    font-size: 0.72rem;
    background-color: #fff;
    border-color: #e0e0e0;
}

.comfort-lbl-sm {
    font-size: 0.7rem !important;
    color: #6b7280;
}

.comfort-ig {
    max-width: 110px;
}

.comfort-ig .form-control {
    padding: 1px 4px;
    font-size: 0.78rem;
}

.comfort-ig .input-group-text {
    padding: 1px 4px;
    font-size: 0.7rem;
    background-color: #fff;
    border-color: #e0e0e0;
}

/* ── Form controls white background ── */
.comfort-page .form-control,
.comfort-page .form-select {
    background-color: #fff;
    border-color: #e0e0e0;
    color: #212121;
}

.comfort-page .form-control:focus,
.comfort-page .form-select:focus {
    border-color: #424242;
    box-shadow: 0 0 0 2px rgba(0,0,0,.08);
}

.comfort-page .input-group-text {
    background-color: #fff;
    border-color: #e0e0e0;
    color: #616161;
}

/* ── Chart ── */
.comfort-chart-wrapper {
    position: relative;
    text-align: center;
}

.comfort-chart-wrapper canvas {
    max-width: 100%;
    cursor: crosshair;
}

.comfort-chart-info {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #374151;
}

.comfort-chart-info .fw-bold {
    color: #1a472a;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .comfort-page {
        padding: 0 8px;
    }

    .comfort-discomfort-box {
        margin-bottom: 8px;
    }
}

@media (max-width: 575.98px) {
    .comfort-card-body {
        padding: 6px;
    }

    .comfort-section-label {
        font-size: 0.8rem;
    }

    .comfort-discomfort-title {
        font-size: 0.72rem;
    }
}
