/**
 * Medical Expense Cap Calculator Styles
 * 의료비 본인부담 상한 계산기
 *
 * @package Zipper
 */

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

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

.mec-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
    box-sizing: border-box;
}

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

.mec-section,
.mec-breakdown-section,
.mec-tips-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.mec-section:hover,
.mec-breakdown-section:hover,
.mec-tips-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

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

.mec-section-title i,
.mec-block-title i {
    color: #d4af37;
    font-size: 15px;
}

.mec-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

.mec-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 32px 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background-color: #faf9f7;
    color: #2d2a26;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
    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='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.mec-select:hover {
    border-color: #d4c67a;
}

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

.mec-amount-input-wrap {
    position: relative;
}

.mec-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 36px 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mec-amount-input:hover {
    border-color: #d4c67a;
}

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

.mec-amount-input::placeholder {
    color: #c4c0bc;
    font-weight: 400;
}

.mec-amount-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9e9a96;
    font-size: 12px;
    pointer-events: none;
}

.mec-korean-amount {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
}

.mec-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.45;
}

.mec-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.mec-checkbox-label:hover {
    border-color: #d4af37;
    background: #fdfbf5;
}

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

.mec-checklist {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mec-checklist li {
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.5;
}

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

.mec-calculate-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #d4af37 0%, #c89f2f 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.mec-reset-btn {
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 12px 16px;
    background: #f5f3f0;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mec-reset-btn:hover {
    background: #ece8e1;
}

.mec-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mec-waiting i {
    display: block;
    font-size: 32px;
    color: #d4af37;
    opacity: 0.4;
}

.mec-waiting p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.mec-waiting strong {
    color: #5f5a56;
    font-weight: 600;
}

.mec-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 1px solid #eadfbf;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.mec-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f0e6c8;
    color: #7b6430;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.mec-summary-title {
    font-size: 13px;
    color: #7a6f56;
    margin-bottom: 2px;
}

.mec-summary-main {
    font-size: 30px;
    line-height: 1.2;
    color: #2d2a26;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.mec-summary-main.mec-positive {
    color: #0f7d4b;
}

.mec-summary-main.mec-zero {
    color: #2d2a26;
}

.mec-summary-sub {
    font-size: 12px;
    color: #8f856f;
    margin-bottom: 12px;
    line-height: 1.45;
}

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

.mec-summary-item {
    background: #fffef9;
    border: 1px solid #ece2c8;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mec-summary-label {
    font-size: 11px;
    color: #8c7e61;
}

.mec-summary-value {
    font-size: 14px;
    color: #2d2a26;
    font-weight: 700;
}

.mec-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.mec-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid #eadfbf;
    background: #fff;
    color: #6d6148;
    font-size: 11px;
}

.mec-pill strong {
    color: #2d2a26;
    font-weight: 700;
}

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

.mec-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
}

.mec-table th,
.mec-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #f0ece4;
    text-align: right;
    font-size: 12px;
    color: #5f5a56;
    white-space: nowrap;
}

.mec-table th:first-child,
.mec-table td:first-child {
    text-align: left;
}

.mec-table thead th {
    color: #8b8578;
    font-weight: 600;
    background: #faf9f7;
}

.mec-table tr.mec-selected td {
    background: #fdf8ec;
    color: #2d2a26;
    font-weight: 700;
}

.mec-tips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mec-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 11px;
    border-radius: 8px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
}

.mec-tip-item i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 1px;
}

.mec-tip-item span {
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

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

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

@media (max-width: 1100px) {
    .mec-main-layout {
        grid-template-columns: 340px 1fr;
        gap: 16px;
    }
}

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

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

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

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

    .mec-summary-main {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .mec-section,
    .mec-breakdown-section,
    .mec-tips-section {
        padding: 14px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .mec-calculate-btn,
    .mec-reset-btn {
        padding: 11px 12px;
    }

    .mec-table th,
    .mec-table td {
        font-size: 11px;
        padding: 8px 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mec-section,
    .mec-breakdown-section,
    .mec-tips-section,
    .mec-select,
    .mec-amount-input,
    .mec-calculate-btn,
    .mec-reset-btn,
    .mec-checkbox-label,
    .mec-tip-item {
        transition: none !important;
    }

    .mec-section:hover,
    .mec-breakdown-section:hover,
    .mec-tips-section:hover,
    .mec-calculate-btn:hover {
        transform: none !important;
    }
}
