/* Optimization Details Card Styles */
/* Adapted from uiverse.io design for hint app */

/* Card container for optimization details sections */
.opt-card {
    background: var(--card);
    border-radius: 20px;
    padding: 18px;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.theme-dark .opt-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Header section with title */
.opt-card .header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    background: none !important;
    padding: 0 !important;
    position: static !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.opt-card .title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
}

.opt-card .title img {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(var(--icon-invert, 0%));
}

/* Dark mode icon adjustment */
html.theme-dark .opt-card .title img {
    --icon-invert: 100%;
}

/* Main value display - the highlighted metric */
.opt-card .range {
    margin-bottom: 4px;
}

.opt-card .range-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -0.5px;
}

.opt-card .range-unit {
    font-size: 28px;
    font-weight: 300;
    color: var(--muted);
    margin-left: 4px;
}

/* Label for the main value */
.opt-card .date-range {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 20px;
}

/* Subsection title */
.opt-card .subsection-header--first {
    margin-top: 0;
}

.opt-card .subsection-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-top: 20px;
    margin-bottom: 12px;
}

.opt-card .subsection-header img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(var(--icon-invert, 0%));
}

html.theme-dark .opt-card .subsection-header img {
    --icon-invert: 100%;
}

/* Readings section - list of values */
.opt-card .readings {
    border-top: 1.5px solid var(--line);
    padding-top: 12px;
}

.opt-card .reading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1.5px solid var(--line);
}

.opt-card .reading:last-child {
    border-bottom: none;
}

.opt-card .reading-time {
    font-size: 11px;
    color: var(--muted);
    flex: 1;
}

.opt-card .reading-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--fg);
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    text-align: right;
}

/* Monthly breakdown in reading value */
.opt-card .reading-value .component-monthly {
    font-size: 9px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 2px;
}

/* Red text for taxes/negative values */
.opt-card .reading.text-red .reading-value {
    color: #ff5a76;
}

/* Total divider styling */
.opt-card .reading--total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--line);
}

.opt-card .reading--total .reading-time {
    font-weight: 600;
    color: var(--fg);
    font-size: 12px;
}

.opt-card .reading--total .reading-value {
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .opt-card {
        padding: 14px;
    }

    .opt-card .range-value {
        font-size: 24px;
    }

    .opt-card .range-unit {
        font-size: 22px;
    }

    .opt-card .reading-time {
        font-size: 10px;
    }

    .opt-card .reading-value {
        font-size: 11px;
    }
}
