/**
 * Idolcare Service Copay Calculator Styles
 * 아이돌봄서비스 본인부담금 계산기
 *
 * @package Zipper
 */

.idc-hidden {
    display: none !important;
}

.idc-main-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
}

.idc-input-col {
    position: sticky;
    top: 20px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.idc-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.idc-section,
.idc-result-summary,
.idc-card-section,
.idc-chart-section,
.idc-table-section,
.idc-apply-section {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.idc-section:hover,
.idc-card-section:hover,
.idc-chart-section:hover,
.idc-table-section:hover,
.idc-apply-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.idc-section-title,
.idc-block-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.idc-section-title i,
.idc-block-title i {
    color: #d4af37;
}

.idc-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 4px;
}

.idc-tab {
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 8px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.idc-tab:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #2d2a26;
}

.idc-tab.active {
    color: #fff;
    background: #d4af37;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.24);
}

.idc-input-group {
    margin-bottom: 12px;
}

.idc-input-group:last-child {
    margin-bottom: 0;
}

.idc-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
}

.idc-select,
.idc-input:not([type="radio"]):not([type="checkbox"]) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    color: #2d2a26;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.idc-select {
    padding: 10px 32px 10px 12px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236f6758' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.idc-input:not([type="radio"]):not([type="checkbox"]) {
    padding: 10px 38px 10px 12px;
    text-align: right;
    font-weight: 600;
}

.idc-select:hover,
.idc-input:not([type="radio"]):not([type="checkbox"]):hover {
    border-color: #d4c67a;
}

.idc-select:focus,
.idc-input:not([type="radio"]):not([type="checkbox"]):focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.idc-hours-wrap {
    position: relative;
}

.idc-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9a9488;
    pointer-events: none;
}

.idc-hint {
    margin-top: 7px;
    margin-bottom: 0;
    padding: 8px 10px;
    border: 1px solid #ece5d7;
    border-radius: 8px;
    background: #faf7f1;
    font-size: 11px;
    line-height: 1.5;
    color: #7f7669;
}

.idc-input-group .idc-hint,
.idc-section > .idc-hint {
    margin-top: 7px !important;
}

.idc-hint a {
    color: #2f5faa;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: keep-all;
}

.idc-hint a:hover {
    color: #244a86;
}

.idc-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    padding: 10px;
    font-size: 12px;
    color: #5f5a56;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.idc-checkbox-row:hover {
    border-color: #d4c67a;
    background: #fff;
}

.idc-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: #d4af37;
}

.idc-check-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

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

.idc-btn {
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.idc-btn-primary {
    flex: 1;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #c49520 100%);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.26);
}

.idc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.34);
}

.idc-btn-ghost {
    color: #5f5a56;
    border: 1px solid #dfd8cb;
    background: #f5f3ef;
}

.idc-btn-ghost:hover {
    background: #fff;
    border-color: #d4c67a;
}

.idc-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

.idc-waiting i {
    font-size: 30px;
    margin-bottom: 12px;
    display: block;
    color: #d4af37;
    opacity: 0.4;
}

.idc-waiting p {
    margin: 0;
    font-size: 13px;
}

.idc-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
}

.idc-summary-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.18);
    color: #7b6521;
    font-size: 12px;
    font-weight: 700;
}

.idc-summary-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    color: #2d2a26;
}

.idc-main-value {
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #b58913;
}

.idc-summary-note {
    margin: 0 0 14px;
    font-size: 12px;
    color: #746b5d;
    line-height: 1.5;
}

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

.idc-summary-item {
    border: 1px solid #ede7da;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 11px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.idc-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #6f6659;
}

.idc-summary-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #2d2a26;
}

.idc-summary-kpi .idc-summary-value {
    font-size: 22px;
    color: #b58913;
}

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

.idc-card {
    border: 1px solid #ece7dc;
    border-radius: 10px;
    background: #fffdf8;
    padding: 12px;
}

.idc-card h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #6f6658;
}

.idc-card p {
    margin: 8px 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: #2d2a26;
    line-height: 1.3;
}

.idc-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f5f1e4;
    color: #8a6d21;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
}

.idc-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.idc-block-sub {
    font-size: 12px;
    color: #7f7568;
}

.idc-chart-wrap {
    position: relative;
    width: 100%;
    height: 300px;
}

.idc-chart-wrap canvas {
    max-height: 300px;
}

.idc-chart-fallback {
    margin-top: 10px;
    border: 1px dashed #d5c9a9;
    border-radius: 8px;
    background: #fff9ec;
    color: #7b6c4e;
    font-size: 12px;
    padding: 9px 10px;
}

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

.idc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.idc-table th,
.idc-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #efe9dc;
    text-align: left;
    vertical-align: top;
}

.idc-table th {
    background: #faf7ef;
    color: #6f6658;
    font-weight: 700;
}

.idc-table td:last-child {
    text-align: right;
    color: #2d2a26;
    font-weight: 600;
}

.idc-table td.idc-highlight {
    color: #b58913;
    font-weight: 800;
}

.idc-empty-row td {
    text-align: center !important;
    color: #8d8578 !important;
    font-weight: 500;
}

.idc-download-btn {
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(63, 153, 98, 0.28);
}

.idc-download-btn:hover {
    box-shadow: 0 4px 12px rgba(54, 137, 86, 0.34);
    transform: translateY(-1px);
}

#idcDownloadBtn.tool-btn.tool-btn-excel,
.idc-download-btn.tool-btn.tool-btn-excel {
    color: #fff !important;
    background: linear-gradient(135deg, #59ab79 0%, #4b9a69 100%) !important;
    border: 1px solid #448e62 !important;
}

#idcDownloadBtn.tool-btn.tool-btn-excel:hover,
.idc-download-btn.tool-btn.tool-btn-excel:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #4f9f70 0%, #438f62 100%) !important;
}

.idc-apply-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.idc-apply-list a {
    color: #2658a8;
    font-size: 13px;
    word-break: break-all;
}

.idc-apply-note {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6f6658;
}

.idc-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

.idc-disclaimer i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .idc-main-layout {
        grid-template-columns: 300px 1fr;
        gap: 14px;
    }

    .idc-input-col {
        max-width: 100%;
        overflow: hidden;
    }

    .idc-select,
    .idc-input:not([type="radio"]):not([type="checkbox"]) {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .idc-main-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .idc-input-col {
        position: static;
    }

    .idc-card-grid {
        grid-template-columns: 1fr;
    }

    .idc-summary-grid {
        grid-template-columns: 1fr;
    }

    .idc-block-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .idc-download-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .idc-main-layout,
    .idc-input-col,
    .idc-result-col,
    .idc-section,
    .idc-result-summary,
    .idc-card-section,
    .idc-chart-section,
    .idc-table-section,
    .idc-apply-section {
        max-width: 100%;
        overflow-x: hidden;
    }

    .idc-tabs {
        grid-template-columns: 1fr;
    }

    .idc-tab {
        font-size: 13px;
    }

    .idc-main-value {
        font-size: 28px;
    }

    .idc-summary-value {
        font-size: 16px;
    }

    .idc-summary-kpi .idc-summary-value {
        font-size: 19px;
    }

    .idc-chart-wrap {
        height: 260px;
    }

    .idc-chart-wrap canvas {
        max-height: 260px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .idc-section,
    .idc-tab,
    .idc-select,
    .idc-input,
    .idc-btn,
    .idc-checkbox-row {
        transition: none !important;
    }

    .idc-btn:hover {
        transform: none !important;
    }
}

/* cache-tail-padding: keep this comment block at file end for edge cache truncation safety.
   -------------------------------------------------------------------------------
   -------------------------------------------------------------------------------
   ------------------------------------------------------------------------------- */
