/* EasyToolio Voltage Drop Calculator — Engineering Dark & Light Theme */

:root {
    --vd-electric-cyan: #06b6d4;
    --vd-electric-glow: rgba(6, 182, 212, 0.25);
    --vd-copper: #f59e0b;
    --vd-aluminium: #94a3b8;
}

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

.dark .apple-glass {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(255, 255, 255, 0.08);
}

.apple-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dark .apple-card {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.dark .apple-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.15);
}

/* Glass Workspace Cards */
.vd-glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(228, 228, 231, 0.8);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
}

.dark .vd-glass-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
}

.vd-result-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 1.5rem;
    box-shadow: 0 15px 35px -10px rgba(6, 182, 212, 0.08);
}

.dark .vd-result-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 40px -15px rgba(6, 182, 212, 0.15);
}

/* ==========================================================================
   Segmented Buttons & Toggle Controls (Driven by aria-pressed)
   ========================================================================== */

.vd-seg-group {
    display: flex;
    background: #f4f4f5;
    border: 1px solid rgba(228, 228, 231, 0.9);
    border-radius: 0.75rem;
    padding: 0.25rem;
    gap: 0.25rem;
}

.dark .vd-seg-group {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}

.vd-seg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0%;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1.5px solid transparent !important;
    background: transparent !important;
    color: #475569 !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.dark .vd-seg-btn {
    color: #94a3b8 !important;
}

.vd-seg-btn:hover {
    color: #0891b2 !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

.dark .vd-seg-btn:hover {
    color: #22d3ee !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.vd-seg-btn:focus-visible {
    outline: 2px solid #06b6d4 !important;
    outline-offset: 1px;
}

/* Active Segmented Button */
.vd-seg-btn[aria-pressed="true"],
.vd-seg-btn.is-active {
    background: #ffffff !important;
    border: 1.5px solid #0891b2 !important;
    border-color: #0891b2 !important;
    color: #0891b2 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.dark .vd-seg-btn[aria-pressed="true"],
.dark .vd-seg-btn.is-active {
    background: rgba(6, 182, 212, 0.2) !important;
    border: 1.5px solid rgba(6, 182, 212, 0.5) !important;
    border-color: rgba(6, 182, 212, 0.5) !important;
    color: #22d3ee !important;
    font-weight: 700 !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2) !important;
}

/* Explicit Inactive State to Guarantee no lingering border or background */
.vd-seg-btn[aria-pressed="false"],
.vd-seg-btn:not([aria-pressed="true"]):not(.is-active) {
    background: transparent !important;
    border: 1.5px solid transparent !important;
    border-color: transparent !important;
    color: #475569 !important;
    box-shadow: none !important;
}

.dark .vd-seg-btn[aria-pressed="false"],
.dark .vd-seg-btn:not([aria-pressed="true"]):not(.is-active) {
    background: transparent !important;
    border: 1.5px solid transparent !important;
    border-color: transparent !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Conductor Material Selection Buttons (Copper vs Aluminium)
   ========================================================================== */

.vd-mat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.15s ease;
    border: 1.5px solid rgba(228, 228, 231, 0.9) !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

.vd-mat-btn span {
    color: inherit !important;
}

.dark .vd-mat-btn {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #f1f5f9 !important;
}

.vd-mat-btn:hover {
    border-color: #06b6d4 !important;
    color: #0891b2 !important;
    background: #ecfeff !important;
}

.vd-mat-btn:hover span {
    color: #0891b2 !important;
}

.dark .vd-mat-btn:hover {
    border-color: rgba(6, 182, 212, 0.45) !important;
    color: #22d3ee !important;
    background: rgba(6, 182, 212, 0.12) !important;
}

.dark .vd-mat-btn:hover span {
    color: #22d3ee !important;
}

.vd-mat-btn:focus-visible {
    outline: 2px solid #06b6d4 !important;
    outline-offset: 2px;
}

/* Copper Active State */
.vd-mat-btn#mat-copper[aria-pressed="true"],
.vd-mat-btn#mat-copper.is-active {
    background: #fffbeb !important;
    border: 1.5px solid #f59e0b !important;
    border-color: #f59e0b !important;
    color: #b45309 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2) !important;
}

.vd-mat-btn#mat-copper[aria-pressed="true"] span,
.vd-mat-btn#mat-copper.is-active span {
    color: #b45309 !important;
}

.dark .vd-mat-btn#mat-copper[aria-pressed="true"],
.dark .vd-mat-btn#mat-copper.is-active {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1.5px solid #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
    color: #fbbf24 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

.dark .vd-mat-btn#mat-copper[aria-pressed="true"] span,
.dark .vd-mat-btn#mat-copper.is-active span {
    color: #fbbf24 !important;
}

/* Aluminium Active State */
.vd-mat-btn#mat-aluminium[aria-pressed="true"],
.vd-mat-btn#mat-aluminium.is-active {
    background: #f0fdfa !important;
    border: 1.5px solid #0891b2 !important;
    border-color: #0891b2 !important;
    color: #0f766e !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(15, 118, 110, 0.2) !important;
}

.vd-mat-btn#mat-aluminium[aria-pressed="true"] span,
.vd-mat-btn#mat-aluminium.is-active span {
    color: #0f766e !important;
}

.dark .vd-mat-btn#mat-aluminium[aria-pressed="true"],
.dark .vd-mat-btn#mat-aluminium.is-active {
    background: rgba(6, 182, 212, 0.18) !important;
    border: 1.5px solid rgba(6, 182, 212, 0.6) !important;
    border-color: rgba(6, 182, 212, 0.6) !important;
    color: #22d3ee !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25) !important;
}

.dark .vd-mat-btn#mat-aluminium[aria-pressed="true"] span,
.dark .vd-mat-btn#mat-aluminium.is-active span {
    color: #22d3ee !important;
}

/* Explicit Inactive Material Button State (Guarantees High Contrast) */
.vd-mat-btn[aria-pressed="false"],
.vd-mat-btn:not([aria-pressed="true"]):not(.is-active) {
    border: 1.5px solid rgba(228, 228, 231, 0.9) !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.vd-mat-btn[aria-pressed="false"] span,
.vd-mat-btn:not([aria-pressed="true"]):not(.is-active) span {
    color: #0f172a !important;
}

.dark .vd-mat-btn[aria-pressed="false"],
.dark .vd-mat-btn:not([aria-pressed="true"]):not(.is-active) {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #f1f5f9 !important;
}

.dark .vd-mat-btn[aria-pressed="false"] span,
.dark .vd-mat-btn:not([aria-pressed="true"]):not(.is-active) span {
    color: #f1f5f9 !important;
}

/* ==========================================================================
   Preset Chips (Voltage, Drop %, Temperature)
   ========================================================================== */

.vd-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.55rem;
    font-size: 0.6875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid rgba(228, 228, 231, 0.9) !important;
    background: #f4f4f5 !important;
    color: #334155 !important;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.dark .vd-chip {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

.vd-chip:hover {
    border-color: #0891b2 !important;
    color: #0e7490 !important;
    background: #cffafe !important;
    font-weight: 600 !important;
}

.dark .vd-chip:hover {
    border-color: rgba(6, 182, 212, 0.5) !important;
    color: #67e8f9 !important;
    background: rgba(6, 182, 212, 0.15) !important;
}

.vd-chip[aria-pressed="true"],
.vd-chip.is-active {
    background: #0891b2 !important;
    border-color: #0891b2 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(8, 145, 178, 0.25) !important;
}

.dark .vd-chip[aria-pressed="true"],
.dark .vd-chip.is-active {
    background: rgba(6, 182, 212, 0.25) !important;
    border-color: #06b6d4 !important;
    color: #22d3ee !important;
    font-weight: 700 !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.3) !important;
}

/* Explicit inactive chip state */
.vd-chip[aria-pressed="false"],
.vd-chip:not([aria-pressed="true"]):not(.is-active) {
    border: 1px solid rgba(228, 228, 231, 0.9) !important;
    background: #f4f4f5 !important;
    color: #334155 !important;
}

.dark .vd-chip[aria-pressed="false"],
.dark .vd-chip:not([aria-pressed="true"]):not(.is-active) {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

/* Top Quick Preset Buttons */
.vd-quick-preset-btn {
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(228, 228, 231, 0.8) !important;
    background: #f8fafc !important;
    color: #334155 !important;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none !important;
}

.dark .vd-quick-preset-btn {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #94a3b8 !important;
}

.vd-quick-preset-btn:hover {
    border-color: #0891b2 !important;
    color: #0e7490 !important;
    background: #cffafe !important;
}

.dark .vd-quick-preset-btn:hover {
    border-color: rgba(6, 182, 212, 0.4) !important;
    color: #22d3ee !important;
    background: rgba(6, 182, 212, 0.1) !important;
}

/* ==========================================================================
   Range Sliders
   ========================================================================== */

.vd-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e4e4e7;
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
    margin: 0.5rem 0 0.15rem 0;
    transition: background 0.2s ease;
}

.dark .vd-range-slider {
    background: rgba(255, 255, 255, 0.12);
}

.vd-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #06b6d4;
    border: 2.5px solid #ffffff;
    box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.25);
    cursor: grab;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .vd-range-slider::-webkit-slider-thumb {
    border-color: #0f172a;
}

.vd-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #0891b2;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25);
}

.vd-range-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.vd-range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #06b6d4;
    border: 2.5px solid #ffffff;
    box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.25);
    cursor: grab;
}

/* Stepper Buttons */
.vd-step-btn {
    width: 26px;
    height: 26px;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    color: #475569;
    border: 1px solid #e4e4e7;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.15s ease;
    cursor: pointer;
    outline: none !important;
}

.vd-step-btn:hover {
    background: #06b6d4;
    color: #ffffff;
    border-color: #06b6d4;
}

.dark .vd-step-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #d4d4d8;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .vd-step-btn:hover {
    background: #06b6d4;
    color: #ffffff;
    border-color: #06b6d4;
}

/* ==========================================================================
   Input Wrappers & Seamless Input Fields (Fixes Screenshot 8 Glitch)
   ========================================================================== */

.vd-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #d4d4d8;
    border-radius: 0.75rem;
    padding: 0 0.5rem;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    overflow: hidden;
    transition: all 0.2s ease;
}

.dark .vd-input-wrapper {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.14);
}

.vd-input-wrapper:hover {
    border-color: #a1a1aa;
}

.vd-input-wrapper:focus-within {
    border-color: #06b6d4 !important;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15) !important;
}

.dark .vd-input-wrapper:focus-within {
    background: rgba(15, 23, 42, 0.95);
    border-color: #06b6d4 !important;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25) !important;
}

/* Neutralize global Tailwind input rules (44px min-height, border, padding) so the number sits cleanly */
.vd-input-field,
input.vd-input-field[type='number'] {
    width: 100% !important;
    min-width: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 0.35rem 0 0 !important;
    margin: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-align: right !important;
    font-feature-settings: "tnum" !important;
    font-variant-numeric: tabular-nums !important;
    -moz-appearance: textfield !important;
}

.dark .vd-input-field,
.dark input.vd-input-field[type='number'] {
    color: #f8fafc !important;
}

@media (pointer: coarse), (max-width: 640px) {
    .vd-input-field,
    input.vd-input-field[type='number'] {
        font-size: 16px !important;
    }
}

.vd-input-field::-webkit-outer-spin-button,
.vd-input-field::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* ==========================================================================
   Locked Wire Gauge Dropdown State & Tooltip
   ========================================================================== */

#select-wire-size:disabled {
    cursor: not-allowed;
    background-color: rgba(244, 244, 245, 0.7);
    color: #94a3b8;
    border-color: rgba(228, 228, 231, 0.8);
}

.dark #select-wire-size:disabled {
    background-color: rgba(15, 23, 42, 0.4);
    color: #64748b;
    border-color: rgba(255, 255, 255, 0.05);
}

#wire-size-select-wrap.is-locked {
    position: relative;
    cursor: not-allowed;
}

#wire-size-select-wrap.is-locked::after {
    content: attr(data-locked-msg);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    white-space: normal;
    width: max-content;
    max-width: 290px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 50;
}

#wire-size-select-wrap.is-locked::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s;
    z-index: 51;
}

#wire-size-select-wrap.is-locked:hover::after,
#wire-size-select-wrap.is-locked:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.vd-locked-badge {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Schematic Wire Diagram & Progress
   ========================================================================== */

.circuit-schematic-box {
    background: radial-gradient(circle at top center, rgba(6, 182, 212, 0.06), transparent 70%), rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(228, 228, 231, 0.8);
    border-radius: 1rem;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.dark .circuit-schematic-box {
    background: radial-gradient(circle at top center, rgba(6, 182, 212, 0.06), transparent 70%), rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Stat Chips */
.vd-stat-chip {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.vd-stat-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.3);
}

/* Table Enhancements */
.vd-table-container {
    max-height: 380px;
    overflow-y: auto;
}

.vd-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.vd-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 9999px;
}

.dark .vd-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.vd-table-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 9999px;
}

.dark .vd-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.vd-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.5);
}

/* ==========================================================================
   Accessible Field Tooltips (Health Tool Standard)
   ========================================================================== */

.ht-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.ht-tooltip-wrap.ht-open {
    z-index: 9999 !important;
}

.vd-stat-chip:has(.ht-tooltip-wrap.ht-open),
.vd-stat-chip.has-open-tooltip {
    z-index: 100 !important;
    position: relative !important;
}

.ht-tooltip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 9999px;
    font-size: 11px;
    line-height: 1;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, transform 0.15s ease;
}

/* 36px touch zone for mobile fingertips */
.ht-tooltip-btn::before {
    content: '';
    position: absolute;
    top: -9px;
    bottom: -9px;
    left: -9px;
    right: -9px;
}

.ht-tooltip-btn:hover,
.ht-tooltip-btn:focus-visible {
    color: #06b6d4;
    outline: none;
    transform: scale(1.15);
}

.dark .ht-tooltip-btn {
    color: #71717a;
}

.dark .ht-tooltip-btn:hover,
.dark .ht-tooltip-btn:focus-visible {
    color: #22d3ee;
}

.ht-tooltip-box {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: 280px;
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
    line-height: 1.4;
    font-weight: 400;
    text-align: left;
    color: #ffffff;
    background: rgba(24, 24, 27, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 9999;
}

.ht-tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--ht-arrow-x, 50%);
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(24, 24, 27, 0.98) transparent transparent transparent;
}

.ht-tooltip-box.ht-placement-bottom {
    bottom: auto;
    top: calc(100% + 8px);
}

.ht-tooltip-box.ht-placement-bottom::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent rgba(24, 24, 27, 0.98) transparent;
}

.ht-tooltip-wrap:hover .ht-tooltip-box,
.ht-tooltip-wrap:focus-within .ht-tooltip-box,
.ht-tooltip-wrap.ht-open .ht-tooltip-box {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto !important;
}

.ht-tooltip-box.align-left {
    left: 0;
    transform: translateX(0) translateY(4px);
}

.ht-tooltip-box.align-left::after {
    left: var(--ht-arrow-x, 12px);
    transform: none;
}

.ht-tooltip-wrap:hover .ht-tooltip-box.align-left,
.ht-tooltip-wrap:focus-within .ht-tooltip-box.align-left,
.ht-tooltip-wrap.ht-open .ht-tooltip-box.align-left {
    transform: translateX(0) translateY(0);
}

.ht-tooltip-box.align-right {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(4px);
}

.ht-tooltip-box.align-right::after {
    left: auto;
    right: var(--ht-arrow-x, 12px);
    transform: none;
}

.ht-tooltip-wrap:hover .ht-tooltip-box.align-right,
.ht-tooltip-wrap:focus-within .ht-tooltip-box.align-right,
.ht-tooltip-wrap.ht-open .ht-tooltip-box.align-right {
    transform: translateX(0) translateY(0);
}

@media (max-width: 640px) {
    .ht-tooltip-box,
    .ht-tooltip-box.align-left,
    .ht-tooltip-box.align-right {
        max-width: min(280px, calc(100vw - 32px)) !important;
        font-size: 0.72rem !important;
        line-height: 1.4 !important;
        padding: 0.5rem 0.75rem !important;
        z-index: 9999 !important;
    }
    .ht-tooltip-wrap.ht-open .ht-tooltip-box,
    .ht-tooltip-wrap.ht-open .ht-tooltip-box.align-left,
    .ht-tooltip-wrap.ht-open .ht-tooltip-box.align-right {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* Section Eyebrow Labels */
.ht-eyebrow {
    color: #0891b2 !important;
}

.dark .ht-eyebrow {
    color: #22d3ee !important;
}

html body .tool-guide .tg-eyebrow {
    color: #0891b2 !important;
}

html.dark body .tool-guide .tg-eyebrow {
    color: #22d3ee !important;
}
