/**
 * Sunburn Calculator Styles
 * 일광화상 계산기 전용 스타일
 *
 * @package Zipper
 */

#sbcCalculator {
    --sbc-accent: #d4af37;
    --sbc-accent-dark: #8a6500;
    --sbc-ink: #2d2a26;
    --sbc-muted: #6f6a63;
    --sbc-line: #e8e4dc;
    --sbc-soft: #faf8f1;
    --sbc-danger: #c2410c;
    --sbc-danger-bg: #fff3e9;
    --sbc-safe: #15803d;
    --sbc-safe-bg: #edfdf3;
    --sbc-watch: #b7791f;
    --sbc-watch-bg: #fff8db;
}

.sbc-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

.sbc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--sbc-accent-dark);
    font-size: 13px;
    font-weight: 700;
}

.sbc-eyebrow i,
.sbc-auto-pill i,
.sbc-panel-head i,
.sbc-input-note i,
.sbc-disclaimer i {
    color: var(--sbc-accent);
}

.sbc-lead {
    margin: 0;
    color: var(--sbc-muted);
    font-size: 14px;
    line-height: 1.62;
}

.sbc-header-note {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 190px;
    padding: 14px 16px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(255, 248, 219, 0.85));
    color: var(--sbc-accent-dark);
    box-shadow: 0 8px 20px rgba(138, 101, 0, 0.08);
}

.sbc-header-note span,
.sbc-header-note small {
    font-size: 12px;
    line-height: 1.4;
}

.sbc-header-note strong {
    color: var(--sbc-ink);
    font-size: 15px;
    line-height: 1.35;
}

#sbcCalculator .tool-layout-split {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

#sbcCalculator .tool-layout-input {
    max-width: 360px;
}

#sbcCalculator .tool-layout-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sbc-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--sbc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.sbc-result-panel {
    padding: 16px;
}

.sbc-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.sbc-panel-head h3 {
    margin: 2px 0 0;
    color: var(--sbc-ink);
    font-size: 16px;
    line-height: 1.35;
}

.sbc-panel-head-compact {
    align-items: center;
}

.sbc-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sbc-accent-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.sbc-auto-pill,
.sbc-day-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.sbc-auto-pill {
    background: rgba(212, 175, 55, 0.12);
    color: var(--sbc-accent-dark);
}

.sbc-day-pill {
    background: #f7f2e8;
    color: #6f5a25;
}

.sbc-field-grid,
.sbc-chip-grid,
.sbc-metric-grid,
.sbc-condition-grid {
    display: grid;
    gap: 10px;
}

.sbc-field-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sbc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sbc-field label,
.sbc-label-row {
    color: #5f5a56;
    font-size: 13px;
    font-weight: 700;
}

.sbc-input-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.sbc-input-box input,
.sbc-select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--sbc-line);
    border-radius: 10px;
    background: #fff;
    color: var(--sbc-ink);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sbc-input-box input {
    padding: 10px 12px;
}

.sbc-select {
    padding: 10px 38px 10px 12px;
    line-height: 1.35;
}

.sbc-input-box input:hover,
.sbc-select:hover {
    border-color: #d4c67a;
}

.sbc-input-box input:focus,
.sbc-select:focus {
    outline: none;
    border-color: var(--sbc-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.sbc-unit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--sbc-line);
    border-radius: 10px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.sbc-help-text {
    margin: 0;
    color: #7a756d;
    font-size: 12px;
    line-height: 1.5;
}

.sbc-control-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sbc-chip-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sbc-uv-preset {
    text-align: center;
}

.sbc-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 8px 6px;
    border: 1px solid var(--sbc-line);
    border-radius: 12px;
    background: #fff;
    color: #5f5a56;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    transition: all 0.2s ease;
}

.sbc-chip strong {
    color: var(--sbc-ink);
    font-family: "Courier New", monospace;
    font-size: 15px;
}

.sbc-chip:hover,
.sbc-chip.is-active {
    border-color: var(--sbc-accent);
    background: rgba(212, 175, 55, 0.12);
    color: var(--sbc-accent-dark);
}

.sbc-chip.is-active strong {
    color: var(--sbc-accent-dark);
}

.sbc-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sbc-actions .tool-btn {
    width: 100%;
    min-height: 42px;
}

.sbc-validation-message {
    min-height: 18px;
    margin: -2px 0 0;
    color: var(--sbc-danger);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.sbc-validation-message:empty {
    display: none;
}

.sbc-input-note,
.sbc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
}

.sbc-input-note {
    padding: 12px;
    background: #faf8f1;
    color: #6f5a25;
}

.sbc-input-note p {
    margin: 0;
}

.sbc-main-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    background: linear-gradient(135deg, #fffdf7 0%, #fff8df 100%);
    box-shadow: 0 12px 30px rgba(138, 101, 0, 0.10);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sbc-main-card.is-safe {
    border-color: rgba(21, 128, 61, 0.28);
    background: linear-gradient(135deg, #f7fff9 0%, #ecfdf3 100%);
}

.sbc-main-card.is-watch {
    border-color: rgba(183, 121, 31, 0.35);
    background: linear-gradient(135deg, #fffdf2 0%, #fff8db 100%);
}

.sbc-main-card.is-danger,
.sbc-main-card.is-extreme {
    border-color: rgba(194, 65, 12, 0.35);
    background: linear-gradient(135deg, #fff9f3 0%, #fff0e5 100%);
}

.sbc-main-card.is-invalid {
    border-color: rgba(127, 29, 29, 0.25);
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.sbc-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.sbc-status-badge,
.sbc-risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
}

.sbc-status-badge {
    background: rgba(212, 175, 55, 0.16);
    color: var(--sbc-accent-dark);
}

.sbc-risk-badge {
    background: #fff;
    color: var(--sbc-ink);
    box-shadow: inset 0 0 0 1px rgba(45, 42, 38, 0.08);
}

.sbc-risk-badge.is-safe,
.sbc-status-badge.is-safe {
    background: var(--sbc-safe-bg);
    color: var(--sbc-safe);
}

.sbc-risk-badge.is-watch,
.sbc-status-badge.is-watch,
.sbc-risk-badge.is-caution,
.sbc-status-badge.is-caution {
    background: var(--sbc-watch-bg);
    color: var(--sbc-watch);
}

.sbc-risk-badge.is-danger,
.sbc-status-badge.is-danger,
.sbc-risk-badge.is-extreme,
.sbc-status-badge.is-extreme,
.sbc-risk-badge.is-invalid,
.sbc-status-badge.is-invalid {
    background: var(--sbc-danger-bg);
    color: var(--sbc-danger);
}

.sbc-value-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sbc-value-label {
    color: #6f5a25;
    font-size: 13px;
    font-weight: 800;
}

.sbc-main-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--sbc-ink);
    font-family: "Courier New", monospace;
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.sbc-main-value small {
    color: var(--sbc-muted);
    font-family: inherit;
    font-size: 20px;
    letter-spacing: 0;
}

.sbc-summary,
.sbc-note-text {
    margin: 0;
    color: #5f5a56;
    font-size: 14px;
    line-height: 1.62;
}

.sbc-budget {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sbc-budget-track {
    position: relative;
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(45, 42, 38, 0.1);
}

.sbc-budget-fill {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e 0%, #d4af37 60%, #f97316 82%, #dc2626 100%);
    transition: width 0.24s ease;
}

.sbc-budget-label,
.sbc-formula {
    color: #6f5a25;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.sbc-formula {
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.sbc-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.sbc-metric-card,
.sbc-condition-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--sbc-line);
    border-radius: 14px;
    background: #fff;
}

.sbc-metric-card span,
.sbc-condition-item span {
    color: #7a756d;
    font-size: 12px;
    font-weight: 800;
}

.sbc-metric-card strong,
.sbc-condition-item strong {
    color: var(--sbc-ink);
    font-family: "Courier New", monospace;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    word-break: keep-all;
}

.sbc-condition-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.sbc-condition-item strong {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
}

.sbc-action-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    color: #5f5a56;
    font-size: 14px;
    line-height: 1.55;
}

.sbc-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--sbc-line);
    border-radius: 12px;
    background: #fff;
}

.sbc-summary-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
    font-size: 14px;
}

.sbc-summary-table th,
.sbc-summary-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0ece4;
    text-align: left;
    vertical-align: top;
}

.sbc-summary-table tr:last-child th,
.sbc-summary-table tr:last-child td {
    border-bottom: 0;
}

.sbc-summary-table th {
    width: 42%;
    background: #faf9f7;
    color: #5f5a56;
    font-weight: 800;
}

.sbc-summary-table td {
    color: var(--sbc-ink);
    font-family: "Courier New", monospace;
    font-weight: 800;
}

.sbc-disclaimer {
    padding: 13px 14px;
    border: 1px solid #f1d6bf;
    background: #fff8f1;
    color: #8a4b18;
}

@media (max-width: 1100px) {
    #sbcCalculator .tool-layout-split {
        grid-template-columns: 1fr;
    }

    #sbcCalculator .tool-layout-input {
        max-width: none;
    }
}

@media (max-width: 900px) {
    .sbc-intro {
        grid-template-columns: 1fr;
    }

    .sbc-header-note {
        min-width: 0;
    }

    .sbc-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .sbc-intro {
        margin-bottom: 14px;
    }

    .sbc-panel,
    .sbc-main-card {
        padding: 16px;
    }

    .sbc-field-grid-two,
    .sbc-condition-grid,
    .sbc-actions {
        grid-template-columns: 1fr;
    }

    .sbc-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sbc-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .sbc-panel-head-compact {
        flex-direction: row;
        align-items: center;
    }

    .sbc-main-value {
        font-size: clamp(38px, 14vw, 54px);
    }
}

@media (max-width: 480px) {
    .sbc-metric-grid {
        grid-template-columns: 1fr;
    }

    .sbc-summary-table {
        min-width: 0;
    }

    .sbc-summary-table tr,
    .sbc-summary-table th,
    .sbc-summary-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .sbc-summary-table th {
        padding-bottom: 4px;
        border-bottom: 0;
        background: #fff;
        font-size: 12px;
    }

    .sbc-summary-table td {
        padding-top: 0;
    }
}
