/**
 * 펫보험 자기부담금·청구가능액 계산기
 * @package Zipper
 */

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

.pidc-root .tool-layout-split {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.pidc-root .tool-input-panel {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.pidc-root .tool-result-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.pidc-root .tool-layout-split .tool-section {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    padding: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

.pidc-root .tool-layout-split .tool-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.pidc-root .tool-layout-split .tool-section-title {
    margin: 0 0 12px;
    color: #2d2a26;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pidc-root .tool-layout-split .tool-section-title i {
    color: #d4af37;
    line-height: 1;
}

.pidc-root .tool-layout-split .tool-input-group {
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pidc-root .tool-layout-split .tool-input-group:last-child {
    margin-bottom: 0;
}

.pidc-root .pidc-amount-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    overflow: hidden;
    background: #fbfaf8;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pidc-root .pidc-amount-wrap:hover {
    border-color: #d4c67a;
}

.pidc-root .pidc-amount-wrap:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.pidc-root .pidc-unit {
    min-width: 52px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #e4ddd0;
    background: linear-gradient(180deg, #fcfbf8 0%, #f3efe8 100%);
    color: #7b7467;
    font-size: 12px;
    white-space: nowrap;
    user-select: none;
    box-sizing: border-box;
}

#pidcPolicyStartDate,
#pidcClaimDate,
#pidcWaitingDays,
#pidcClaimAmount,
#pidcClaimCount,
#pidcAnnualCap,
#pidcAnnualUsed,
#pidcReimbursementRate,
#pidcPerClaimCap,
#pidcNonCovered,
#pidcDeductibleFixed,
#pidcDeductiblePercent {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    color: #2d2a26;
    font-size: 13px;
    padding: 10px 12px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#pidcPolicyStartDate:hover,
#pidcClaimDate:hover,
#pidcWaitingDays:hover,
#pidcClaimAmount:hover,
#pidcClaimCount:hover,
#pidcAnnualCap:hover,
#pidcAnnualUsed:hover,
#pidcReimbursementRate:hover,
#pidcPerClaimCap:hover,
#pidcNonCovered:hover,
#pidcDeductibleFixed:hover,
#pidcDeductiblePercent:hover {
    border-color: #d4c67a;
}

#pidcPolicyStartDate:focus,
#pidcClaimDate:focus,
#pidcWaitingDays:focus,
#pidcClaimAmount:focus,
#pidcClaimCount:focus,
#pidcAnnualCap:focus,
#pidcAnnualUsed:focus,
#pidcReimbursementRate:focus,
#pidcPerClaimCap:focus,
#pidcNonCovered:focus,
#pidcDeductibleFixed:focus,
#pidcDeductiblePercent:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

#pidcPolicyStartDate::placeholder,
#pidcClaimDate::placeholder,
#pidcWaitingDays::placeholder,
#pidcClaimAmount::placeholder,
#pidcClaimCount::placeholder,
#pidcAnnualCap::placeholder,
#pidcAnnualUsed::placeholder,
#pidcReimbursementRate::placeholder,
#pidcPerClaimCap::placeholder,
#pidcNonCovered::placeholder,
#pidcDeductibleFixed::placeholder,
#pidcDeductiblePercent::placeholder {
    color: #c4c0bc;
}

.pidc-root .pidc-amount-wrap #pidcWaitingDays,
.pidc-root .pidc-amount-wrap #pidcClaimAmount,
.pidc-root .pidc-amount-wrap #pidcClaimCount,
.pidc-root .pidc-amount-wrap #pidcAnnualCap,
.pidc-root .pidc-amount-wrap #pidcAnnualUsed,
.pidc-root .pidc-amount-wrap #pidcReimbursementRate,
.pidc-root .pidc-amount-wrap #pidcPerClaimCap,
.pidc-root .pidc-amount-wrap #pidcNonCovered,
.pidc-root .pidc-amount-wrap #pidcDeductibleFixed,
.pidc-root .pidc-amount-wrap #pidcDeductiblePercent {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.pidc-root .pidc-amount-wrap #pidcWaitingDays:hover,
.pidc-root .pidc-amount-wrap #pidcClaimAmount:hover,
.pidc-root .pidc-amount-wrap #pidcClaimCount:hover,
.pidc-root .pidc-amount-wrap #pidcAnnualCap:hover,
.pidc-root .pidc-amount-wrap #pidcAnnualUsed:hover,
.pidc-root .pidc-amount-wrap #pidcReimbursementRate:hover,
.pidc-root .pidc-amount-wrap #pidcPerClaimCap:hover,
.pidc-root .pidc-amount-wrap #pidcNonCovered:hover,
.pidc-root .pidc-amount-wrap #pidcDeductibleFixed:hover,
.pidc-root .pidc-amount-wrap #pidcDeductiblePercent:hover {
    border: 0;
}

.pidc-root .pidc-amount-wrap #pidcWaitingDays:focus,
.pidc-root .pidc-amount-wrap #pidcClaimAmount:focus,
.pidc-root .pidc-amount-wrap #pidcClaimCount:focus,
.pidc-root .pidc-amount-wrap #pidcAnnualCap:focus,
.pidc-root .pidc-amount-wrap #pidcAnnualUsed:focus,
.pidc-root .pidc-amount-wrap #pidcReimbursementRate:focus,
.pidc-root .pidc-amount-wrap #pidcPerClaimCap:focus,
.pidc-root .pidc-amount-wrap #pidcNonCovered:focus,
.pidc-root .pidc-amount-wrap #pidcDeductibleFixed:focus,
.pidc-root .pidc-amount-wrap #pidcDeductiblePercent:focus {
    outline: none;
    border: 0;
    box-shadow: none;
    background: transparent;
}

#pidcWaitingDays,
#pidcClaimCount,
#pidcClaimAmount,
#pidcAnnualCap,
#pidcAnnualUsed,
#pidcReimbursementRate,
#pidcPerClaimCap,
#pidcNonCovered,
#pidcDeductibleFixed,
#pidcDeductiblePercent {
    text-align: right;
}

#pidcWaitingDays[type="number"],
#pidcClaimCount[type="number"],
#pidcReimbursementRate[type="number"],
#pidcDeductiblePercent[type="number"] {
    -moz-appearance: textfield;
}

#pidcWaitingDays[type="number"]::-webkit-outer-spin-button,
#pidcWaitingDays[type="number"]::-webkit-inner-spin-button,
#pidcClaimCount[type="number"]::-webkit-outer-spin-button,
#pidcClaimCount[type="number"]::-webkit-inner-spin-button,
#pidcReimbursementRate[type="number"]::-webkit-outer-spin-button,
#pidcReimbursementRate[type="number"]::-webkit-inner-spin-button,
#pidcDeductiblePercent[type="number"]::-webkit-outer-spin-button,
#pidcDeductiblePercent[type="number"]::-webkit-inner-spin-button {
    margin: 0;
}

#pidcClaimAmountKorean,
#pidcAnnualCapKorean,
#pidcAnnualUsedKorean,
#pidcPerClaimCapKorean,
#pidcNonCoveredKorean,
#pidcDeductibleFixedKorean {
    margin-top: 6px;
    color: #d4af37;
    font-size: 11px;
    line-height: 1.4;
    min-height: 16px;
}

.pidc-root .pidc-deductible-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pidc-root .pidc-deductible-type label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #e4ddd2;
    border-radius: 8px;
    background: #faf8f4;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
}

.pidc-root .pidc-deductible-type label:focus-within {
    border-color: #d4af37;
    background: #fff9ea;
    color: #6d5215;
}

.pidc-root .pidc-deductible-type input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #c9a43a;
    flex-shrink: 0;
}

.pidc-root .tool-input-panel .tool-result-sub {
    margin: 6px 0 0;
    color: #8f887d;
    font-size: 11px;
    line-height: 1.45;
}

.pidc-root .tool-actions {
    display: flex;
    gap: 8px;
}

#pidcCalculateBtn,
#pidcResetBtn {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
}

#pidcCalculateBtn {
    flex: 1;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #c59a23 100%);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

#pidcCalculateBtn:hover {
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

#pidcResetBtn {
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
}

#pidcWaiting {
    background: #fcfaf4;
    border-color: #eee3cb;
}

#pidcWaitingText {
    margin: 0;
    color: #7a704f;
    font-size: 13px;
    line-height: 1.5;
}

#pidcResultSummary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

#pidcResultSummary .tool-result-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#pidcResultSummary .tool-result-box {
    border: 1px solid #eadfcb;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#pidcResultSummary .tool-result-box.highlight {
    border-color: #ead8aa;
    background: #fff8e8;
}

#pidcResultSummary .tool-result-label {
    color: #7a736a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

#pidcResultSummary .tool-result-value {
    color: #2d2a26;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

#pidcResultSummary .tool-result-box.highlight .tool-result-value {
    color: #b58913;
    font-size: 22px;
}

#pidcStatusText {
    margin: 12px 0 0;
    color: #6e685f;
    font-size: 12px;
    line-height: 1.5;
}

#pidcChartWrap {
    margin-top: 10px;
    position: relative;
    width: 100%;
    height: 280px;
    border: 1px solid #efe6d6;
    border-radius: 12px;
    background: #fffefa;
    padding: 10px;
    box-sizing: border-box;
}

#pidcBarChart {
    width: 100% !important;
    height: 100% !important;
    max-height: 280px;
}

#pidcChartFallback {
    margin-top: 10px;
    color: #8c5c30;
    font-size: 12px;
    line-height: 1.5;
}

.pidc-table-wrap {
    border: 1px solid #eee3cf;
    border-radius: 10px;
    background: #fff;
    overflow-x: auto;
}

.pidc-detail-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 12px;
}

.pidc-detail-table thead th {
    background: #faf4e8;
    color: #5c4f3a;
    font-weight: 700;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ecdcc3;
    white-space: nowrap;
}

.pidc-detail-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #f0e6d6;
    color: #3f3a33;
    vertical-align: top;
}

.pidc-detail-table tbody tr:last-child td {
    border-bottom: 0;
}

#pidcClaimTableBody tr td:first-child,
#pidcClaimTableBody tr td:nth-child(2),
#pidcClaimTableBody tr td:nth-child(3),
#pidcClaimTableBody tr td:nth-child(4),
#pidcClaimTableBody tr td:nth-child(5),
#pidcClaimTableBody tr td:nth-child(6),
#pidcClaimTableBody tr td:nth-child(7) {
    white-space: nowrap;
}

.pidc-download-btn.tool-btn.tool-btn-excel {
    color: #fff;
    background: #59ab79;
    border: 1px solid #59ab79;
    box-shadow: 0 2px 6px rgba(72, 146, 103, 0.28);
}

.pidc-download-btn.tool-btn.tool-btn-excel:hover,
.pidc-download-btn.tool-btn.tool-btn-excel:focus-visible {
    background: #4f9f70;
    border-color: #4f9f70;
    box-shadow: 0 4px 12px rgba(67, 133, 93, 0.34);
}

#pidcDisclaimer {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #9e9a96;
    font-size: 11px;
    line-height: 1.5;
}

.tool-date-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #6f685f;
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .pidc-root .tool-layout-split {
        grid-template-columns: 1fr;
    }

    .pidc-root .tool-input-panel {
        position: static;
        top: auto;
        max-width: 100%;
        overflow: hidden;
    }

    .pidc-root .tool-input-panel input:not([type="radio"]):not([type="checkbox"]),
    .pidc-root .tool-input-panel select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
    }

    .pidc-root .pidc-unit {
        min-width: 48px;
        padding: 0 9px;
    }

    #pidcResultSummary .tool-result-grid {
        grid-template-columns: 1fr 1fr;
    }

    #pidcResultSummary .tool-result-box.highlight .tool-result-value {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .pidc-root .tool-layout-split .tool-section {
        padding: 14px;
    }

    .pidc-root .pidc-unit {
        min-width: 46px;
    }

    .pidc-root .pidc-deductible-type {
        grid-template-columns: 1fr;
    }

    .pidc-root .tool-actions {
        flex-direction: column;
    }

    #pidcResultSummary .tool-result-value {
        font-size: 16px;
    }

    #pidcResultSummary .tool-result-box.highlight .tool-result-value {
        font-size: 20px;
    }

    #pidcChartWrap {
        height: 240px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .pidc-root .tool-layout-split,
    .pidc-root .tool-input-panel,
    .pidc-root .tool-result-panel {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .pidc-root .pidc-unit {
        min-width: 44px;
        padding: 0 8px;
        font-size: 11px;
    }

    #pidcResultSummary .tool-result-grid {
        grid-template-columns: 1fr;
    }

    #pidcCalculateBtn,
    #pidcResetBtn,
    .pidc-download-btn.tool-btn.tool-btn-excel {
        width: 100%;
        justify-content: center;
    }

    #pidcCalculateBtn,
    #pidcResetBtn {
        padding: 11px 12px;
        font-size: 12px;
    }

    #pidcChartWrap {
        height: 220px;
    }

    #pidcResultSummary .tool-result-box.highlight .tool-result-value {
        font-size: 19px;
    }

    .pidc-detail-table {
        min-width: 620px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pidc-root .tool-layout-split .tool-section,
    .pidc-root .pidc-amount-wrap,
    #pidcPolicyStartDate,
    #pidcClaimDate,
    #pidcWaitingDays,
    #pidcClaimAmount,
    #pidcClaimCount,
    #pidcAnnualCap,
    #pidcAnnualUsed,
    #pidcReimbursementRate,
    #pidcPerClaimCap,
    #pidcNonCovered,
    #pidcDeductibleFixed,
    #pidcDeductiblePercent,
    #pidcCalculateBtn,
    #pidcResetBtn,
    .pidc-download-btn.tool-btn.tool-btn-excel {
        transition: none !important;
    }
}
