/**
 * Rounding Calculator Styles
 * 반올림 계산기 전용 스타일
 *
 * @package Zipper
 */

.rndc-hidden,
.rndc-waiting[hidden],
.rndc-control-group[hidden] {
    display: none !important;
}

.rndc-intro {
    display: grid;
    gap: 10px;
}

.rndc-lead {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.6;
    color: #5f5a56;
}

.rndc-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.rndc-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.rndc-tip-section {
    background: #fffdf8;
}

.rndc-section-title,
.rndc-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
}

.rndc-section-title i,
.rndc-subtitle i,
.rndc-live-note i,
.rndc-disclaimer i {
    color: #d4af37;
}

.rndc-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
    box-sizing: border-box;
}

.rndc-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.rndc-input,
.rndc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 500;
    color: #2d2a26;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.rndc-input:focus,
.rndc-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.rndc-input::placeholder {
    color: #b0aba5;
    font-weight: 400;
}

.rndc-input-hint {
    font-size: 13px;
    line-height: 1.55;
    color: #7a756d;
}

.rndc-input-hint code,
.rndc-hero-summary code,
.tool-description code {
    padding: 1px 4px;
    border-radius: 6px;
    background: #f4efe3;
    color: #7b5b00;
    font-size: 0.95em;
}

.rndc-mode-group,
.rndc-unit-list,
.rndc-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rndc-mode-btn,
.rndc-unit-btn,
.rndc-preset-btn {
    padding: 9px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rndc-mode-btn:hover,
.rndc-mode-btn.is-active,
.rndc-unit-btn:hover,
.rndc-unit-btn.is-active,
.rndc-preset-btn:hover,
.rndc-preset-btn.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
}

.rndc-control-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #ece7de;
    border-radius: 12px;
    background: #faf9f7;
}

.rndc-control-group {
    display: grid;
    gap: 8px;
}

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

.rndc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e8e4dc;
    background: #fff;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.rndc-live-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #faf6ec;
    border: 1px solid #eadfb8;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.5;
}

.rndc-action-row {
    display: flex;
    gap: 8px;
}

.rndc-action-row .tool-btn {
    width: 100%;
}

.rndc-tip-list,
.rndc-step-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #5f5a56;
    font-size: 14px;
    line-height: 1.6;
}

.rndc-waiting {
    display: grid;
    gap: 8px;
    align-items: start;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #f2d1d1;
    background: #fff6f6;
    color: #8a4c4c;
}

.rndc-waiting i {
    font-size: 18px;
    color: #c06a6a;
}

.rndc-waiting p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.rndc-result-hero {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid #eadfb8;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

.rndc-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rndc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.14);
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
}

.rndc-status-badge.is-neutral {
    background: rgba(212, 175, 55, 0.14);
    color: #8a6500;
}

.rndc-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rndc-copy-btn:hover,
.rndc-copy-btn:focus-visible {
    outline: none;
    border-color: #d4af37;
    color: #8a6500;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.rndc-hero-expression {
    font-size: 15px;
    color: #7a756d;
    word-break: break-all;
}

.rndc-hero-value {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.05;
    font-weight: 800;
    color: #2d2a26;
    word-break: break-all;
}

.rndc-hero-label {
    font-size: 13px;
    font-weight: 700;
    color: #8a6500;
    letter-spacing: 0.01em;
}

.rndc-hero-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #5f5a56;
}

.rndc-formula-box {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(255, 255, 255, 0.75);
    color: #4a4640;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-all;
}

.rndc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rndc-kpi-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e8e4dc;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.05);
}

.rndc-kpi-card.is-up {
    border-color: rgba(70, 180, 80, 0.25);
    background: #f7fbf7;
}

.rndc-kpi-card.is-down {
    border-color: rgba(212, 50, 50, 0.18);
    background: #fff8f8;
}

.rndc-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.rndc-kpi-value {
    min-width: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #2d2a26;
    word-break: break-all;
}

.rndc-note-panel {
    gap: 12px;
}

.rndc-note-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #faf9f7;
    border: 1px solid #ece7de;
}

.rndc-note-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.rndc-note-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #5f5a56;
}

.rndc-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.rndc-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
}

.rndc-table th,
.rndc-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #efe9de;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.6;
}

.rndc-table th {
    width: 138px;
    color: #5f5a56;
    font-weight: 700;
    background: #faf9f7;
}

.rndc-table td {
    color: #2d2a26;
    word-break: break-all;
}

.rndc-table tr:last-child th,
.rndc-table tr:last-child td {
    border-bottom: none;
}

.rndc-disclaimer {
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e8e4dc;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .rndc-input,
    .rndc-select {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .rndc-result-hero {
        padding: 18px;
    }

    .rndc-kpi-grid {
        grid-template-columns: 1fr;
    }

    .rndc-kpi-value {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .rndc-section,
    .rndc-result-hero {
        padding: 16px;
    }

    .rndc-mode-btn,
    .rndc-unit-btn,
    .rndc-preset-btn {
        width: 100%;
        justify-content: center;
    }

    .rndc-hero-top {
        align-items: flex-start;
    }
}
