/**
 * Temperature Converter Styles
 * High contrast, responsive typography, glassmorphism, dynamic temperature thermometer
 */

/* Background Grid & Ambient */
.temp-grid-bg {
    background-image: radial-gradient(rgba(239, 68, 68, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

html.dark .temp-grid-bg {
    background-image: radial-gradient(rgba(239, 68, 68, 0.09) 1px, transparent 1px);
    background-size: 24px 24px;
}

.temp-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

html.dark .temp-glass {
    background: rgba(24, 24, 27, 0.75);
}

.temp-card {
    background: #ffffff;
    border: 1px solid rgba(228, 228, 231, 0.85);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html.dark .temp-card {
    background: rgba(24, 24, 27, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.temp-card:hover {
    border-color: rgba(239, 68, 68, 0.35);
}

/* Preset buttons */
.temp-chip {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid rgba(228, 228, 231, 0.9);
    background: #ffffff;
    color: #3f3f46;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

html.dark .temp-chip {
    background: rgba(39, 39, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    color: #d4d4d8;
}

.temp-chip:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    transform: translateY(-1px);
}

html.dark .temp-chip:hover {
    border-color: #f87171;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
}

/* Hero display - Robust, auto-fitting, truncation-safe */
.temp-hero-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
    line-height: 1.25;
}

/* Thermometer bar */
.temp-bar-bg {
    height: 0.75rem;
    width: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #3b82f6 0%, #10b981 30%, #f59e0b 60%, #ef4444 100%);
    position: relative;
    overflow: visible;
}

.temp-indicator {
    position: absolute;
    top: 50%;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: #ffffff;
    border: 3px solid #ef4444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -50%);
    transition: left 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Canonical FAQ styling */
.tool-guide {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(228, 228, 231, 0.6);
}

html.dark .tool-guide {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.tg-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ef4444;
}

.tg-title {
    line-height: 1.25;
}

.tg-body {
    max-width: 42rem;
}
