/* ============================================
   월간·주간 보육계획안 생성기 — style.css
   ============================================ */

.header-section {
    margin-bottom: 24px;
}
.header-section h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark, #2d3148);
    margin-bottom: 8px;
}
.header-section p {
    color: var(--text-gray, #666);
    font-size: 1rem;
}
.geo-summary-box {
    font-size: 0.95rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 15px 20px;
    border-radius: 14px;
    color: #333;
    max-width: 720px;
    margin: 16px auto 0 auto;
    border-left: 5px solid #7048e8;
    text-align: left;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.mp-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 26px 28px;
    margin-bottom: 20px;
    border: 2px solid #f1f3f5;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.05);
}

.mp-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.mp-step-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: #2d3148;
}
.mp-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4c6ef5, #7048e8);
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.mp-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.mp-field label, .mp-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #3b4056;
    margin-bottom: 8px;
}
.mp-opt {
    font-size: 0.78rem;
    font-weight: 400;
    color: #868e96;
}
.mp-input, .mp-select, .mp-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color 0.18s;
}
.mp-input:focus, .mp-select:focus, .mp-textarea:focus {
    border-color: #4c6ef5;
}

.mp-group {
    margin-bottom: 18px;
}

/* 연령 칩 */
.mp-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mp-chip {
    padding: 10px 18px;
    border-radius: 50px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    color: #495057;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}
.mp-chip:hover {
    border-color: #4c6ef5;
    color: #4c6ef5;
    background: #fff;
}
.mp-chip.active {
    background: linear-gradient(135deg, #4c6ef5, #7048e8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 110, 245, 0.3);
}

/* 추천 생활주제 프리셋 */
.mp-theme-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mp-preset-btn {
    padding: 9px 15px;
    border-radius: 14px;
    border: 1.5px solid #dbe4ff;
    background: #f8f9ff;
    color: #364fc7;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s;
}
.mp-preset-btn:hover, .mp-preset-btn.active {
    background: #4c6ef5;
    border-color: #4c6ef5;
    color: #fff;
    box-shadow: 0 3px 10px rgba(76, 110, 245, 0.25);
}

/* 주차별 소주제 그리드 */
.mp-subthemes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.mp-subtheme-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.w-badge {
    display: inline-block;
    width: fit-content;
    padding: 3px 10px;
    border-radius: 99px;
    background: #edf2ff;
    color: #364fc7;
    font-size: 0.76rem;
    font-weight: 800;
}

/* 생성 버튼 2트랙 바 */
.mp-generate-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed #e9ecef;
}
.btn-mp-random {
    padding: 13px 22px;
    border-radius: 14px;
    border: 2px solid #56ab2f;
    background: #f4fce3;
    color: #2b8a3e;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-mp-random:hover {
    background: #e9fac8;
    transform: translateY(-1px);
}
.btn-mp-ai {
    padding: 13px 24px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #4c6ef5, #7048e8);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(76, 110, 245, 0.32);
    transition: all 0.2s;
}
.btn-mp-ai:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}
.btn-mp-ai:disabled {
    opacity: 0.6;
    cursor: wait;
}
.pro-badge-inline {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    margin-left: 4px;
}

/* Step 3: 결과 테이블 */
.mp-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.mp-week-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.mp-w-tab {
    padding: 7px 14px;
    border-radius: 99px;
    border: 1.5px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.mp-w-tab.active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

.mp-goal-box {
    background: #f8faff;
    border: 1.5px solid #dbe4ff;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.mp-goal-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #364fc7;
    margin-bottom: 6px;
}
.mp-goal-content {
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.6;
    outline: none;
    white-space: pre-wrap;
}

.mp-table-wrap {
    overflow-x: auto;
    border: 1.5px solid #dee2e6;
    border-radius: 16px;
    margin-bottom: 18px;
}
.mp-plan-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    font-size: 0.86rem;
}
.mp-plan-table th, .mp-plan-table td {
    border: 1px solid #dee2e6;
    padding: 12px 14px;
    vertical-align: top;
    line-height: 1.6;
}
.mp-plan-table thead th {
    background: #f1f3f9;
    color: #1e293b;
    font-weight: 800;
    text-align: center;
    vertical-align: middle;
}
.mp-plan-table tbody th {
    background: #fafbfc;
    color: #334155;
    font-weight: 800;
    width: 140px;
    text-align: center;
    vertical-align: middle;
}
.mp-cell-editable {
    min-height: 54px;
    outline: none;
    white-space: pre-wrap;
    color: #1e293b;
    border-radius: 6px;
    padding: 2px 4px;
    transition: background 0.15s;
}
.mp-cell-editable:focus {
    background: #fff9db;
    box-shadow: 0 0 0 2px #fcc419;
}

.mp-export-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-mp-copy, .btn-mp-csv, .btn-mp-print {
    flex: 1;
    min-width: 190px;
    padding: 14px 18px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s;
}
.btn-mp-copy {
    border: none;
    background: linear-gradient(135deg, #2b8a3e, #40c057);
    color: #fff;
    box-shadow: 0 4px 14px rgba(43, 138, 62, 0.25);
}
.btn-mp-csv {
    border: 2px solid #2b8a3e;
    background: #ebfbee;
    color: #2b8a3e;
}
.btn-mp-print {
    border: 2px solid #1e293b;
    background: #1e293b;
    color: #fff;
}
.btn-mp-copy:hover, .btn-mp-csv:hover, .btn-mp-print:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* A4 가로 인쇄 시트 */
.mp-print-sheet {
    display: none;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }
    body * {
        visibility: hidden !important;
    }
    .breadcrumb-header, .no-print, #hago-fb-root, .toast-notification {
        display: none !important;
    }
    #mp-print-sheet, #mp-print-sheet * {
        visibility: visible !important;
    }
    #mp-print-sheet {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff !important;
        color: #000 !important;
        font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
    }
    .mp-a4-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9pt;
    }
    .mp-a4-table th, .mp-a4-table td {
        border: 1px solid #222;
        padding: 6px 8px;
        vertical-align: top;
        line-height: 1.48;
    }
    .mp-a4-table th {
        background: #f1f3f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-weight: 700;
        text-align: center;
        vertical-align: middle;
    }
}

@media (max-width: 900px) {
    .mp-info-grid, .mp-subthemes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 520px) {
    .mp-info-grid, .mp-subthemes-grid {
        grid-template-columns: 1fr;
    }
    .mp-card {
        padding: 20px 16px;
    }
    .mp-generate-bar {
        flex-direction: column;
    }
    .btn-mp-random, .btn-mp-ai {
        width: 100%;
    }
}
