/**
 * Maternity Leave Benefit Calculator Styles
 * 출산전후휴가 급여 계산기
 *
 * @package Zipper
 */

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

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

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

.mlb-result-col {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mlb-section,
.mlb-result-summary,
.mlb-chart-section,
.mlb-table-section,
.mlb-apply-section,
.mlb-disclaimer,
.mlb-checklist-section {
    border: 1px solid #e6dfd2;
    border-radius: 12px;
    background: #fff;
    padding: 16px;
    box-sizing: border-box;
    max-width: 100%;
}

.mlb-section-title,
.mlb-block-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #4d473c;
}

.mlb-block-title {
    margin-bottom: 0;
}

.mlb-input-group {
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mlb-input-group + .mlb-input-group {
    margin-top: 12px;
}

.mlb-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
}

.mlb-input,
.mlb-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #e6dfd2;
    border-radius: 8px;
    background: #faf8f3;
    color: #2d2a26;
    font-size: 13px;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mlb-input::placeholder {
    color: #b9b3a9;
}

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

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

.mlb-select {
    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='%23695f50' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.mlb-korean-amount {
    min-height: 16px;
    font-size: 11px;
    color: #af8524;
    text-align: right;
}

.mlb-hint {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: #8e877b;
}

.mlb-company-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border: 1px solid #e5dfd3;
    border-radius: 10px;
    background: #f5f2eb;
}

.mlb-company-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #6f6659;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mlb-company-tab.active {
    background: #fff;
    border-color: #d4af37;
    color: #4b432f;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.18);
}

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

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

.mlb-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, background 0.2s ease;
}

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

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

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

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

.mlb-waiting {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    color: #7e7568;
    font-size: 13px;
    line-height: 1.5;
}

.mlb-waiting i {
    color: #d4af37;
    font-size: 18px;
    flex-shrink: 0;
}

.mlb-waiting p {
    margin: 0;
}

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

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

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

.mlb-main-value {
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #a97d10;
}

.mlb-summary-note {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #7f786b;
}

.mlb-rule-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e5dbc0;
    background: #fff;
    color: #695f50;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.mlb-rule-chip.mlb-rule-cap {
    border-color: #e0bc67;
    background: #fff8e8;
    color: #8d6400;
}

.mlb-rule-chip.mlb-rule-floor {
    border-color: #98c4ad;
    background: #f1fbf5;
    color: #2f6b4e;
}

.mlb-rule-chip.mlb-rule-base {
    border-color: #ccc4b5;
    background: #f9f7f2;
    color: #5f5a56;
}

.mlb-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mlb-summary-item {
    border: 1px solid #e7ddc4;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

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

.mlb-kpi-item .mlb-summary-value {
    color: #8a6200;
    font-size: 20px;
}

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

.mlb-block-sub {
    font-size: 12px;
    color: #7f786b;
}

.mlb-chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
    max-width: 100%;
}

.mlb-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.mlb-chart-fallback {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px dashed #d5c8a5;
    border-radius: 8px;
    background: #fffbf1;
    color: #735f2d;
    font-size: 12px;
    line-height: 1.45;
}

.mlb-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.mlb-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.mlb-table thead th {
    background: #f6f3ed;
    border-bottom: 1px solid #e5dece;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 9px;
    text-align: left;
    white-space: nowrap;
}

.mlb-table td {
    border-bottom: 1px solid #efe9db;
    color: #3f3a34;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px 9px;
    vertical-align: top;
}

.mlb-table td:last-child,
.mlb-table th:last-child {
    text-align: right;
}

.mlb-empty-row td {
    text-align: center !important;
    color: #827a6d;
}

#mlbDownloadBtn.tool-btn.tool-btn-excel,
.mlb-download-btn.tool-btn.tool-btn-excel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #59ab79 0%, #4b9a69 100%);
    border: 1px solid #448e62;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(72, 146, 103, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#mlbDownloadBtn.tool-btn.tool-btn-excel:hover,
.mlb-download-btn.tool-btn.tool-btn-excel:hover {
    background: linear-gradient(135deg, #4f9f70 0%, #438f62 100%);
    box-shadow: 0 4px 12px rgba(67, 133, 93, 0.34);
    transform: translateY(-1px);
}

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

.mlb-apply-list a {
    color: #2d5f8b;
    text-decoration: underline;
    word-break: break-all;
}

.mlb-apply-note {
    margin-top: 10px;
    margin-bottom: 0;
    color: #7c7568;
    font-size: 12px;
    line-height: 1.5;
}

.mlb-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #6c6458;
    font-size: 12px;
    line-height: 1.5;
    background: #fffcf6;
}

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

.mlb-date-notice {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e4dac0;
    background: #fffbf1;
    font-size: 13px;
    line-height: 1.6;
    color: #544c3f;
}

@media (max-width: 900px) {
    .mlb-main-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 100%;
        overflow: hidden;
    }

    .mlb-input-col {
        position: static;
        top: auto;
        max-width: 100%;
        overflow: hidden;
    }

    .mlb-input,
    .mlb-select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .mlb-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .mlb-section,
    .mlb-result-summary,
    .mlb-chart-section,
    .mlb-table-section,
    .mlb-apply-section,
    .mlb-disclaimer,
    .mlb-checklist-section {
        padding: 14px;
    }

    .mlb-main-value {
        font-size: 30px;
    }

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

    .mlb-kpi-item .mlb-summary-value {
        font-size: 18px;
    }

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

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

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

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

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

    .mlb-company-tab {
        white-space: normal;
        line-height: 1.4;
    }

    .mlb-main-value {
        font-size: 26px;
    }

    .mlb-chart-wrap {
        height: 220px;
    }
}
