/* Japan Tax Calculator Styles */

/* 세금 안내 래퍼 */
.jtc-tax-notice-wrapper {
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
        "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

/* 면세 배지 */
.jtc-tax-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e6f7ff;
    color: #0050b3;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #91d5ff;
    /* 터치 친화적으로 개선 */
    min-height: 44px;
    user-select: none;
}

.jtc-tax-free-badge .jtc-icon {
    font-size: 18px;
}

/* 세금 안내 */
.jtc-tax-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7e6;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #ffd591;
    font-size: 14px;
    color: #8b5a00;
    line-height: 1.5;
}

.jtc-tax-notice .jtc-icon {
    color: #fa8c16;
    font-size: 16px;
    font-weight: bold;
}

.jtc-toggle-details {
    color: #fa8c16;
    text-decoration: none;
    font-weight: 500;
    margin-left: auto;
    white-space: nowrap;
    transition: all 0.2s ease;
    /* 보조 버튼 - 작고 간단하게 */
    padding: 4px 8px;
    border-radius: 3px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 13px;
}

/* 데스크톱에서는 텍스트만, 모바일 아이콘은 숨김 */
.jtc-toggle-details .jtc-mobile-icon {
    display: none;
}

.jtc-toggle-details .jtc-desktop-text {
    display: inline;
}

.jtc-toggle-details:hover {
    color: #d46b08;
    text-decoration: underline;
    background: rgba(212, 107, 8, 0.08);
}

/* 터치 피드백 - 최소한만 */
.jtc-toggle-details:active,
.jtc-toggle-details:focus {
    background: rgba(212, 107, 8, 0.12);
    outline: none;
}

/* 계산 상세 */
.jtc-tax-details {
    margin-top: 15px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jtc-calculation-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.jtc-calculation-box h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

/* 계산 테이블 */
.jtc-calculation-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.jtc-calculation-table td {
    padding: 8px 0;
    font-size: 14px;
    color: #4b5563;
}

.jtc-calculation-table td:first-child {
    width: 60%;
    padding-right: 20px;
}

.jtc-calculation-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.jtc-total-row {
    border-top: 2px solid #e5e7eb;
    font-weight: 600;
}

.jtc-total-row td {
    padding-top: 12px;
    color: #374151;
    font-size: 15px;
}

/* 지불 안내 */
.jtc-payment-notice {
    margin: 0;
    padding: 12px;
    background: #fef3c7;
    border-radius: 6px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* 모바일 최적화 */
/* 태블릿 (768px 이하) */
@media (max-width: 768px) {
    .jtc-tax-notice {
        /* flex-wrap 제거해서 한 줄로 유지 */
        font-size: 14px;
        padding: 12px 16px;
        line-height: 1.6;
        gap: 12px;
    }
    
    .jtc-toggle-details {
        /* 같은 줄에 인라인으로 배치 */
        margin-top: 0;
        margin-left: auto;
        font-size: 16px;
        padding: 6px 8px;
        flex-shrink: 0;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 모바일에서는 아이콘만, 텍스트는 숨김 */
    .jtc-toggle-details .jtc-desktop-text {
        display: none;
    }
    
    .jtc-toggle-details .jtc-mobile-icon {
        display: inline;
        font-size: 18px;
        color: #fa8c16;
    }
    
    .jtc-calculation-box {
        padding: 16px;
    }
    
    .jtc-calculation-box h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .jtc-calculation-table {
        font-size: 14px;
    }
    
    .jtc-calculation-table td {
        padding: 8px 0;
    }
    
    .jtc-total-row td {
        font-size: 15px;
        padding-top: 12px;
    }
    
    .jtc-payment-notice {
        font-size: 13px;
        padding: 12px;
        line-height: 1.5;
    }
}

/* 스마트폰 (576px 이하) */
@media (max-width: 576px) {
    .jtc-tax-notice-wrapper {
        margin: 12px 0;
    }
    
    .jtc-tax-notice {
        font-size: 14px;
        padding: 12px 15px;
        gap: 10px;
    }
    
    .jtc-tax-notice .jtc-icon {
        font-size: 16px;
    }
    
    .jtc-toggle-details {
        font-size: 16px;
        padding: 6px;
        min-width: 30px;
        min-height: 30px;
    }
    
    .jtc-toggle-details .jtc-mobile-icon {
        font-size: 16px;
    }
    
    .jtc-calculation-box {
        padding: 15px;
        border-radius: 8px;
    }
    
    .jtc-calculation-table td:first-child {
        width: 55%;
        padding-right: 15px;
        font-size: 14px;
    }
    
    .jtc-calculation-table td:last-child {
        font-size: 14px;
        font-weight: 600;
    }
    
    .jtc-total-row td {
        font-size: 15px;
        font-weight: 700;
    }
}

/* 작은 스마트폰 (480px 이하) */
@media (max-width: 480px) {
    .jtc-tax-notice {
        padding: 12px;
        gap: 8px;
    }
    
    .jtc-calculation-box {
        padding: 15px;
    }
    
    .jtc-calculation-table {
        margin-bottom: 15px;
    }
    
    .jtc-calculation-table td {
        padding: 8px 0;
    }
    
    .jtc-calculation-table td:first-child {
        width: 50%;
        padding-right: 12px;
    }
    
    /* 테이블을 더 모바일 친화적으로 */
    .jtc-total-row {
        border-top: 2px solid #e5e7eb;
    }
    
    .jtc-total-row td {
        padding-top: 12px;
        font-size: 15px;
    }
}