/**
 * Circle Calculator Styles
 * 원 계산기 전용 스타일
 *
 * @package Zipper
 */

.ccalc-hidden,
.ccalc-waiting[hidden] {
    display: none !important;
}

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

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

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

.ccalc-preset-section,
.ccalc-tip-section {
    background: #fffdf9;
}

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

.ccalc-section-title i {
    color: #d4af37;
}

.ccalc-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ccalc-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ccalc-mode-tab:hover,
.ccalc-mode-tab:focus {
    outline: none;
    border-color: #d4af37;
    color: #8a6500;
}

.ccalc-mode-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.18);
}

.ccalc-mode-help,
.ccalc-field-hint,
.ccalc-visual-caption {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #7a756d;
}

.ccalc-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

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

.ccalc-field-full {
    grid-column: 1 / -1;
}

.ccalc-label {
    font-size: 13px;
    font-weight: 700;
    color: #5f5a56;
}

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

.ccalc-input-wrap-select {
    grid-template-columns: minmax(0, 1fr);
}

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

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

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

.ccalc-input::placeholder {
    color: #c4c0bc;
    font-weight: 400;
}

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

.ccalc-btn-group {
    display: flex;
    gap: 8px;
}

.ccalc-btn-group .tool-btn {
    flex: 1 1 0;
}

.ccalc-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ccalc-preset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ccalc-preset-btn:hover,
.ccalc-preset-btn:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
}

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

.ccalc-waiting {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #eadfb8;
    border-radius: 12px;
    background: #fffaf0;
    color: #7a5d18;
}

.ccalc-waiting i {
    font-size: 18px;
    color: #d4af37;
    margin-top: 2px;
}

.ccalc-waiting p {
    margin: 0;
    line-height: 1.6;
}

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

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

.ccalc-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.ccalc-status-badge.is-neutral {
    background: rgba(138, 101, 0, 0.08);
    color: #8a6500;
}

.ccalc-status-badge.is-valid {
    background: rgba(35, 143, 91, 0.12);
    color: #1b7f4f;
}

.ccalc-status-badge.is-warning {
    background: rgba(189, 92, 0, 0.12);
    color: #a85300;
}

.ccalc-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #8a6500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ccalc-copy-btn:hover,
.ccalc-copy-btn:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(212, 175, 55, 0.16);
}

.ccalc-hero-label-top,
.ccalc-hero-label {
    font-size: 13px;
    color: #7a756d;
}

.ccalc-hero-value {
    font-size: clamp(32px, 5vw, 44px);
    line-height: 1.05;
    font-weight: 800;
    color: #2d2a26;
    letter-spacing: -0.03em;
    word-break: break-word;
}

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

.ccalc-formula-box {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(212, 175, 55, 0.18);
    font-size: 13px;
    line-height: 1.6;
    color: #5f5a56;
}

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

.ccalc-kpi-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #ece6d9;
    background: #fff;
}

.ccalc-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
}

.ccalc-kpi-value {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    color: #2d2a26;
    word-break: break-word;
}

.ccalc-visual-section {
    gap: 12px;
}

.ccalc-visual-wrap {
    display: grid;
    gap: 12px;
}

.ccalc-circle-svg {
    width: 100%;
    height: auto;
    border-radius: 16px;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, rgba(255, 255, 255, 0.96) 64%);
}

.ccalc-circle-fill {
    fill: rgba(212, 175, 55, 0.12);
}

.ccalc-circle-stroke {
    fill: none;
    stroke: #d4af37;
    stroke-width: 4;
}

.ccalc-diameter-line,
.ccalc-radius-line {
    stroke-linecap: round;
}

.ccalc-diameter-line {
    stroke: #5f5a56;
    stroke-width: 3;
    stroke-dasharray: 6 6;
}

.ccalc-radius-line {
    stroke: #b8860b;
    stroke-width: 4;
}

.ccalc-center-dot {
    fill: #b8860b;
}

.ccalc-circle-label {
    font-size: 12px;
    font-weight: 700;
    fill: #2d2a26;
}

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

.ccalc-table-wrap {
    overflow-x: auto;
}

.ccalc-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.ccalc-summary-table th,
.ccalc-summary-table td {
    padding: 11px 0;
    border-bottom: 1px solid #efe9dc;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.6;
}

.ccalc-summary-table th {
    width: 38%;
    padding-right: 16px;
    font-weight: 700;
    color: #5f5a56;
}

.ccalc-summary-table td {
    color: #2d2a26;
    word-break: break-word;
}

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

.ccalc-note-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    background: #faf7ef;
    border: 1px solid #efe4c8;
}

.ccalc-note-title {
    font-size: 13px;
    font-weight: 700;
    color: #8a6500;
}

.ccalc-note-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #5f5a56;
}

@media (max-width: 980px) {
    .ccalc-support-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .ccalc-field-grid,
    .ccalc-kpi-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ccalc-btn-group {
        flex-direction: column;
    }

    .ccalc-hero-value {
        font-size: 30px;
    }
}

@media (max-width: 540px) {
    .ccalc-section,
    .ccalc-result-hero {
        padding: 16px;
    }

    .ccalc-mode-tab,
    .ccalc-preset-btn {
        width: 100%;
    }

    .ccalc-mode-tabs,
    .ccalc-preset-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .ccalc-input-wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .ccalc-input-unit {
        justify-content: flex-start;
    }

    .ccalc-summary-table th,
    .ccalc-summary-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }

    .ccalc-summary-table th {
        padding-bottom: 2px;
    }
}
