/**
 * Social Insurance Calculator (4대보험 계산기)
 *
 * @package Zipper
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.sic-main-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

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

/* ==========================================================================
   Input Column
   ========================================================================== */

.sic-input-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input Section */
.sic-input-section {
    background: #fffdf5;
    border: 1px solid #e8e0c8;
    border-radius: 12px;
    padding: 16px;
}

.sic-input-title {
    font-size: 14px;
    font-weight: 600;
    color: #5c5647;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sic-input-title i {
    color: #d4af37;
}

/* Input Type Toggle */
.sic-type-toggle {
    display: flex;
    background: #f5f0e1;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 12px;
}

.sic-type-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #8b8475;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sic-type-btn.active {
    background: #fff;
    color: #5c5647;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sic-type-btn:hover:not(.active) {
    color: #5c5647;
}

/* Input Group */
.sic-input-group {
    margin-bottom: 12px;
}

.sic-input-label {
    font-size: 13px;
    color: #6b6459;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sic-input-label i {
    color: #d4af37;
    font-size: 12px;
}

.sic-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d4cbb8;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sic-input-wrapper:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.sic-input-wrapper input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 16px;
    color: #2d2a26;
    background: transparent;
    outline: none;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.sic-input-wrapper input::placeholder {
    color: #b8b0a0;
}

.sic-input-suffix {
    padding: 10px 12px;
    background: #f9f6ef;
    color: #8b8475;
    font-size: 14px;
    border-left: 1px solid #e8e0c8;
    white-space: nowrap;
}

/* Korean Amount Display */
.sic-korean-amount {
    font-size: 12px;
    color: #d4af37;
    font-weight: 500;
    margin-top: 4px;
    min-height: 18px;
    padding-left: 2px;
}

/* Quick Amount Buttons */
.sic-quick-section {
    margin-top: 12px;
}

.sic-quick-label {
    font-size: 12px;
    color: #8b8475;
    margin-bottom: 8px;
}

.sic-quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.sic-quick-btn {
    padding: 8px 6px;
    border: 1px solid #e8e0c8;
    background: #fff;
    color: #6b6459;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sic-quick-btn:hover {
    border-color: #d4af37;
    background: #fffdf5;
    color: #5c5647;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.sic-tabs {
    display: flex;
    background: #f5f0e1;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.sic-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #8b8475;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sic-tab i {
    font-size: 14px;
}

.sic-tab.active {
    background: #fff;
    color: #5c5647;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sic-tab:hover:not(.active) {
    color: #5c5647;
    background: rgba(255, 255, 255, 0.5);
}

/* Tab Content */
.sic-tab-content {
    display: none;
}

.sic-tab-content.active {
    display: block;
}

/* ==========================================================================
   Industry Select (Employer Tab)
   ========================================================================== */

.sic-industry-group {
    margin-bottom: 12px;
}

.sic-industry-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #5c5647;
    margin-bottom: 6px;
}

.sic-industry-label i {
    color: #d4af37;
    font-size: 13px;
}

.sic-industry-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4cbb8;
    border-radius: 8px;
    background: #fff;
    color: #2d2a26;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    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 fill='%238b8475' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

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

/* Rate Info */
.sic-rate-info {
    background: #f9f6ef;
    border: 1px solid #e8e0c8;
    border-radius: 12px;
    padding: 14px;
}

.sic-rate-title {
    font-size: 13px;
    font-weight: 600;
    color: #5c5647;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sic-rate-title i {
    color: #d4af37;
}

.sic-rate-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sic-rate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.sic-rate-name {
    color: #6b6459;
}

.sic-rate-value {
    color: #5c5647;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
}

.sic-rate-note {
    font-size: 11px;
    color: #8b8475;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e8e0c8;
    line-height: 1.5;
}

/* Action Buttons */
.sic-button-row {
    display: flex;
    gap: 8px;
}

.sic-reset-btn,
.sic-share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px solid #d4cbb8;
    background: #fff;
    color: #6b6459;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sic-reset-btn:hover,
.sic-share-btn:hover {
    border-color: #d4af37;
    color: #5c5647;
}

.sic-reset-btn i,
.sic-share-btn i {
    font-size: 14px;
}

/* ==========================================================================
   Result Column
   ========================================================================== */

.sic-result-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Result Section */
.sic-result-section {
    background: #fffdf5;
    border: 1px solid #e8e0c8;
    border-radius: 12px;
    padding: 20px;
}

.sic-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #5c5647;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sic-result-title i {
    color: #d4af37;
}

/* Total Deduction Card */
.sic-total-card {
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.sic-total-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Employer Total Card Variant */
.sic-total-card-employer {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.sic-total-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sic-total-value-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.sic-total-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

.sic-total-unit {
    font-size: 16px;
    opacity: 0.9;
}

.sic-total-copy {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sic-total-copy:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sic-total-copy.copied {
    background: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Employer-specific Sections
   ========================================================================== */

/* Salary Row */
.sic-emp-salary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin-bottom: 16px;
}

.sic-emp-salary-label {
    font-size: 13px;
    font-weight: 500;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sic-emp-salary-label i {
    font-size: 14px;
}

.sic-emp-salary-value {
    font-size: 15px;
    font-weight: 600;
    color: #0369a1;
    font-family: 'Roboto Mono', monospace;
}

/* Group Label */
.sic-group-label {
    font-size: 12px;
    font-weight: 600;
    color: #8b8475;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

/* Insurance Subtotal */
.sic-emp-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-top: 12px;
    margin-bottom: 16px;
}

.sic-emp-subtotal-label {
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
}

.sic-emp-subtotal-value {
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    font-family: 'Roboto Mono', monospace;
}

/* ==========================================================================
   Detail Grid
   ========================================================================== */

.sic-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sic-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8e0c8;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sic-detail-item:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.08);
}

.sic-detail-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sic-detail-name {
    font-size: 14px;
    font-weight: 500;
    color: #5c5647;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sic-detail-name i {
    font-size: 14px;
    color: #d4af37;
}

.sic-detail-rate {
    font-size: 11px;
    color: #8b8475;
}

.sic-detail-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sic-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #2d2a26;
    font-family: 'Roboto Mono', monospace;
}

.sic-detail-unit {
    font-size: 13px;
    color: #8b8475;
}

.sic-detail-copy {
    width: 28px;
    height: 28px;
    border: 1px solid #e8e0c8;
    background: #fff;
    color: #8b8475;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sic-detail-copy:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.sic-detail-copy.copied {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
}

/* National Pension Limit Note */
.sic-pension-note {
    font-size: 11px;
    color: #d97706;
    margin-top: 4px;
    padding: 6px 8px;
    background: #fffbeb;
    border-radius: 6px;
    display: none;
}

.sic-pension-note.show {
    display: block;
}

/* Yearly Summary */
.sic-yearly-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e8e0c8;
}

.sic-yearly-title {
    font-size: 13px;
    font-weight: 600;
    color: #5c5647;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sic-yearly-title i {
    color: #d4af37;
}

.sic-yearly-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9f6ef;
    border-radius: 8px;
}

.sic-yearly-label {
    font-size: 13px;
    color: #6b6459;
}

.sic-yearly-value {
    font-size: 15px;
    font-weight: 600;
    color: #5c5647;
    font-family: 'Roboto Mono', monospace;
}

/* ==========================================================================
   Chart Section
   ========================================================================== */

.sic-chart-section {
    background: #fffdf5;
    border: 1px solid #e8e0c8;
    border-radius: 12px;
    padding: 20px;
}

.sic-chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #5c5647;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sic-chart-title i {
    color: #d4af37;
}

.sic-chart-wrap {
    position: relative;
    width: 100%;
    height: 320px;
}

/* ==========================================================================
   Compare Table Section
   ========================================================================== */

.sic-compare-section {
    background: #fffdf5;
    border: 1px solid #e8e0c8;
    border-radius: 12px;
    padding: 20px;
}

.sic-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sic-compare-title {
    font-size: 15px;
    font-weight: 600;
    color: #5c5647;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sic-compare-title i {
    color: #d4af37;
}

.sic-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #16a34a;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sic-download-btn:hover {
    background: #16a34a;
    color: #fff;
}

.sic-download-btn i {
    font-size: 14px;
}

.sic-compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sic-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sic-compare-table thead th {
    background: #f5f0e1;
    color: #5c5647;
    font-weight: 600;
    padding: 10px 12px;
    text-align: right;
    border-bottom: 2px solid #d4cbb8;
    white-space: nowrap;
}

.sic-compare-table thead th:first-child {
    text-align: left;
    border-radius: 8px 0 0 0;
}

.sic-compare-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.sic-compare-table tbody td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #e8e0c8;
    color: #2d2a26;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
}

.sic-compare-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    font-family: inherit;
}

.sic-compare-table tbody tr:hover {
    background: #fffbeb;
}

.sic-compare-table tbody tr.sic-compare-highlight {
    background: #fef3c7;
    font-weight: 600;
}

/* ==========================================================================
   Source Links
   ========================================================================== */

.sic-source-section {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 14px;
}

.sic-source-title {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sic-source-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sic-source-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #0284c7;
    text-decoration: none;
    transition: color 0.2s;
}

.sic-source-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

.sic-source-link i {
    font-size: 10px;
}

.sic-source-note {
    font-size: 11px;
    color: #64748b;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #bae6fd;
    line-height: 1.5;
}

/* ==========================================================================
   Related Calculators
   ========================================================================== */

.sic-related-section {
    background: #f9f6ef;
    border: 1px solid #e8e0c8;
    border-radius: 12px;
    padding: 20px;
}

.sic-related-title {
    font-size: 15px;
    font-weight: 600;
    color: #5c5647;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sic-related-title i {
    color: #d4af37;
}

.sic-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .sic-related-grid {
        grid-template-columns: 1fr;
    }
}

.sic-related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8e0c8;
    border-radius: 8px;
    text-decoration: none;
    color: #5c5647;
    transition: all 0.2s ease;
}

.sic-related-link:hover {
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}

.sic-related-icon {
    width: 36px;
    height: 36px;
    background: #fffdf5;
    border: 1px solid #e8e0c8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4af37;
    font-size: 16px;
    flex-shrink: 0;
}

.sic-related-info {
    flex: 1;
    min-width: 0;
}

.sic-related-name {
    font-size: 13px;
    font-weight: 600;
    color: #5c5647;
}

.sic-related-desc {
    font-size: 11px;
    color: #8b8475;
    margin-top: 2px;
}

/* ==========================================================================
   Disclaimer
   ========================================================================== */

.sic-disclaimer {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    margin-top: 8px;
}

.sic-disclaimer i {
    color: #d97706;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.sic-disclaimer-text {
    font-size: 12px;
    color: #92400e;
    line-height: 1.6;
}

.sic-disclaimer-text strong {
    color: #78350f;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .sic-total-value {
        font-size: 26px;
    }

    .sic-detail-value {
        font-size: 14px;
    }

    .sic-quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }

    .sic-tab {
        font-size: 12px;
        padding: 8px 8px;
    }

    .sic-chart-wrap {
        height: 250px;
    }

    .sic-compare-table {
        font-size: 11px;
    }

    .sic-compare-table thead th,
    .sic-compare-table tbody td {
        padding: 8px 6px;
    }
}

/* Excel button guard */
.tool-btn-excel {
  background: #59ab79;
  border-color: #59ab79;
}

.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
  background: #4f9f70;
  border-color: #4f9f70;
}

