/**
 * Planer 고객 노출 일정표 (planer · plan_schedule_view)
 * PHP 7.4 · plain CSS · pub_routes.css 레이아웃과 함께 사용
 * 일차 열 너비 50px · 일차별 색상 구분 (1~7 순환)
 */
.pub-plan-page {
    font-family: 'Segoe UI', 'Noto Sans KR', sans-serif;
    color: #333;
    background: #fff;
    margin: 0;
    min-height: 100vh;
}

.routes-grid-single .pub-plan-schedule-wrap {
    width: 100%;
}

/* index 섹션 */
.schedule-section {
    background: #fff;
    padding: 80px 24px;
}
.schedule-section .section-label,
.schedule-section .section-title,
.schedule-section .section-sub {
    text-align: center;
}
.schedule-section .section-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1a56db;
    margin-bottom: 12px;
}
.schedule-section .section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #0d1b2a;
    margin-bottom: 8px;
}
.schedule-section .section-sub {
    color: #666;
    font-size: 1rem;
    margin-bottom: 40px;
}
.schedule-inner {
    max-width: var(--content-max, 900px);
    margin: 0 auto;
}

.pub-plan-select-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pub-plan-select-form label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
}
.pub-plan-select-form select {
    padding: 10px 12px;
    border: 1.5px solid #dde3f0;
    border-radius: 8px;
    font-size: 0.92rem;
    min-width: 240px;
    background: #fafbff;
}
.pub-plan-schedule-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d1b2a;
    margin: 0 0 16px;
    text-align: center;
    padding: 28px 24px 0;
}
.pub-plan-empty {
    text-align: center;
    color: #94a3b8;
    padding: 32px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}
.pub-plan-tbl-wrap {
    overflow-x: auto;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 0;
}
.pub-plan-table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    table-layout: fixed;
}
.pub-plan-table col.pub-plan-col-day {
    width: 50px;
}
.pub-plan-table col.pub-plan-col-time {
    width: 120px;
}
.pub-plan-table col.pub-plan-col-loc {
    width: 150px;
}
.pub-plan-table thead th {
    background: #f8fafc;
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    color: #64748b;
    font-size: 0.78rem;
    border-bottom: 1px solid #e2e8f0;
}
.pub-plan-table thead th.pub-plan-col-day,
.pub-plan-table col.pub-plan-col-day,
.pub-plan-day-cell {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    box-sizing: border-box;
}
.pub-plan-day-group tr.pub-plan-day-first td {
    border-top: 1px solid #e2e8f0;
}
.pub-plan-day-group tr.pub-plan-day-first td.pub-plan-day-cell {
    border-top: none;
}
.pub-plan-day-group tr.pub-plan-day-first td {
    border-top: 1px solid #e2e8f0;
}
.pub-plan-day-group:first-child tr.pub-plan-day-first td {
    border-top: none;
}
.pub-plan-day-group tr.pub-plan-day-first td {
    border-top: 1px solid #e2e8f0;
}
.pub-plan-day-group + .pub-plan-day-group tr.pub-plan-day-first td {
    border-top: 1px solid #e2e8f0;
}
.pub-plan-row td {
    padding: 12px 14px;
    vertical-align: top;
}
.pub-plan-row {
    cursor: pointer;
    transition: background 0.15s;
}
.pub-plan-day-cell {
    text-align: center;
    vertical-align: middle;
    border-left: 1px solid #e2e8f0;
    overflow: hidden;
}
.pub-plan-row td.pub-plan-day-cell {
    padding: 10px 3px;
}
.pub-plan-table thead th.pub-plan-col-day {
    padding: 12px 4px;
    text-align: center;
}
.pub-plan-day-cell .pub-plan-day-badge {
    padding: 2px 2px;
    font-size: 0.65rem;
    line-height: 1.15;
    white-space: normal;
    word-break: keep-all;
    max-width: 100%;
}
.pub-plan-day-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* 일차별 색상 — 1~7일차 팔레트, 8일차부터 순환 */
.pub-plan-day-group.pub-plan-day-tone-1 .pub-plan-row td { background: #eff6ff; }
.pub-plan-day-group.pub-plan-day-tone-1 .pub-plan-row:hover td { background: #dbeafe; }
.pub-plan-day-badge.pub-plan-day-tone-1 { background: #bfdbfe; color: #1e40af; }

.pub-plan-day-group.pub-plan-day-tone-2 .pub-plan-row td { background: #ecfdf5; }
.pub-plan-day-group.pub-plan-day-tone-2 .pub-plan-row:hover td { background: #d1fae5; }
.pub-plan-day-badge.pub-plan-day-tone-2 { background: #a7f3d0; color: #047857; }

.pub-plan-day-group.pub-plan-day-tone-3 .pub-plan-row td { background: #fffbeb; }
.pub-plan-day-group.pub-plan-day-tone-3 .pub-plan-row:hover td { background: #fef3c7; }
.pub-plan-day-badge.pub-plan-day-tone-3 { background: #fde68a; color: #b45309; }

.pub-plan-day-group.pub-plan-day-tone-4 .pub-plan-row td { background: #f5f3ff; }
.pub-plan-day-group.pub-plan-day-tone-4 .pub-plan-row:hover td { background: #ede9fe; }
.pub-plan-day-badge.pub-plan-day-tone-4 { background: #ddd6fe; color: #6d28d9; }

.pub-plan-day-group.pub-plan-day-tone-5 .pub-plan-row td { background: #fff1f2; }
.pub-plan-day-group.pub-plan-day-tone-5 .pub-plan-row:hover td { background: #ffe4e6; }
.pub-plan-day-badge.pub-plan-day-tone-5 { background: #fecdd3; color: #be123c; }

.pub-plan-day-group.pub-plan-day-tone-6 .pub-plan-row td { background: #f0fdfa; }
.pub-plan-day-group.pub-plan-day-tone-6 .pub-plan-row:hover td { background: #ccfbf1; }
.pub-plan-day-badge.pub-plan-day-tone-6 { background: #99f6e4; color: #0f766e; }

.pub-plan-day-group.pub-plan-day-tone-7 .pub-plan-row td { background: #fff7ed; }
.pub-plan-day-group.pub-plan-day-tone-7 .pub-plan-row:hover td { background: #ffedd5; }
.pub-plan-day-badge.pub-plan-day-tone-7 { background: #fed7aa; color: #c2410c; }
.pub-plan-time { white-space: nowrap; color: #334155; }
.pub-plan-loc { color: #64748b; word-break: break-word; }
.pub-plan-loc a { color: #1a56db; font-weight: 600; text-decoration: none; }
.pub-plan-loc a:hover { text-decoration: underline; }
.pub-plan-loc-link { color: #1a56db; font-weight: 600; text-decoration: none; }
.pub-plan-loc-link:hover { text-decoration: underline; }
.pub-plan-content { color: #64748b; line-height: 1.5; text-align: left; word-break: break-word; }
.pub-plan-hint {
    margin-top: 12px;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
}

/* 일차 그룹 outline */
.pub-plan-day-group tr.pub-plan-day-first td {
    border-top: 1px solid #e2e8f0;
}
.pub-plan-day-group tr.pub-plan-day-last td {
    border-bottom: 1px solid #e2e8f0;
}
.pub-plan-day-group tr td:last-child {
    border-right: 1px solid #e2e8f0;
}
.pub-plan-day-group td.pub-plan-day-cell {
    border-left: 1px solid #e2e8f0;
}
.pub-plan-day-group tr.pub-plan-day-last td.pub-plan-day-cell {
    border-bottom: 1px solid #e2e8f0;
}
.pub-plan-day-group tr.pub-plan-day-first td:first-child,
.pub-plan-day-group tr.pub-plan-day-first td:last-child,
.pub-plan-day-group tr.pub-plan-day-last td:last-child,
.pub-plan-day-group tr.pub-plan-day-last td.pub-plan-day-cell {
    border-radius: 0;
}

/* 상세 */
.pub-plan-detail-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 28px 24px;
    border: 0;
    width: 100%;
}
.pub-plan-detail-plan-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1d4ed8;
    margin: 0 0 16px;
    text-align: center;
}
.pub-plan-detail-table {
    width: 100%;
    border-collapse: collapse;
}
.pub-plan-detail-table th {
    width: 88px;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}
.pub-plan-detail-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.92rem;
    line-height: 1.55;
    text-align: left;
}
.pub-plan-detail-content {
    white-space: pre-wrap;
    word-break: break-word;
}
.pub-plan-map-link {
    color: #1a56db;
    font-weight: 600;
    text-decoration: none;
}
.pub-plan-addr {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #64748b;
}
.pub-plan-map-embed {
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.pub-plan-map-embed iframe {
    width: 100% !important;
    min-height: 280px;
    border: 0;
    display: block;
}
.pub-plan-back-link {
    display: inline-block;
    color: #1a56db;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
}
.pub-plan-back-link:hover {
    text-decoration: underline;
}

/* My AI Planner — planer.php 티저 · aiplanner.php 패널 */
.pub-ai-planner-teaser {
    max-width: var(--content-max, 900px);
    margin: 0 auto 28px;
    padding: 22px 24px;
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    text-align: center;
}
.pub-ai-planner-teaser-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1d4ed8;
    margin-bottom: 8px;
}
.pub-ai-planner-teaser-title {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 800;
    color: #0f172a;
}
.pub-ai-planner-teaser-desc {
    margin: 0 0 16px;
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.55;
}
.pub-ai-planner-teaser-link {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background: #1d4ed8;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}
.pub-ai-planner-teaser-link:hover {
    background: #1e40af;
    color: #fff;
}
.pub-ai-planner-panel {
    width: 100%;
    padding: 28px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}
.pub-ai-planner-panel-lead {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.65;
}
.pub-ai-planner-panel-note {
    margin: 0 0 20px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
}
.pub-ai-planner-back {
    margin: 0;
}
.pub-ai-planner-back a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
}
.pub-ai-planner-back a:hover {
    text-decoration: underline;
}

.pub-ai-planner-form {
    width: 100%;
    padding: 24px 22px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}
.pub-ai-planner-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}
.pub-ai-planner-legend {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    padding: 0;
}
.pub-ai-planner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    margin-bottom: 14px;
}
@media (max-width: 640px) {
    .pub-ai-planner-grid { grid-template-columns: 1fr; }
}
.pub-ai-planner-field label,
.pub-ai-planner-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}
.pub-ai-planner-field .req { color: #dc2626; }
.pub-ai-planner-field--full { margin-top: 4px; }
.pub-ai-planner-field select,
.pub-ai-planner-field input[type="date"],
.pub-ai-planner-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #fafbff;
    font-family: inherit;
}
.pub-ai-planner-field textarea {
    resize: vertical;
    line-height: 1.55;
    min-height: 96px;
}
.pub-ai-planner-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.pub-ai-planner-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
}
.pub-ai-planner-check input { margin: 0; }
.pub-ai-planner-error {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 7px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.88rem;
}
.pub-ai-planner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 20px;
}
.pub-ai-planner-submit {
    padding: 12px 24px;
    border: 0;
    border-radius: 8px;
    background: #1d4ed8;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.pub-ai-planner-submit:hover { background: #1e40af; }
.pub-ai-planner-back-inline {
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}
.pub-ai-planner-back-inline:hover { text-decoration: underline; }

.pub-ai-planner-result {
    margin-top: 24px;
    padding: 20px 22px;
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
}
.pub-ai-planner-result-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: #1e3a8a;
}
.pub-ai-planner-result-lead {
    margin: 0 0 10px;
    font-size: 0.92rem;
    color: #1e293b;
    line-height: 1.65;
    white-space: pre-line;
}
.pub-ai-planner-result-note {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.55;
}
.pub-ai-planner-itinerary {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #bfdbfe;
    text-align: left;
}
.pub-ai-planner-itinerary-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: #1e3a8a;
}
.pub-ai-day-title {
    margin: 16px 0 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}
.pub-ai-day-title:first-child {
    margin-top: 0;
}
.pub-ai-day-list {
    margin: 0 0 10px 1.1em;
    padding: 0;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.6;
}
.pub-ai-day-p {
    margin: 0 0 8px;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.55;
}
.pub-ai-planner-save-wrap {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed #bfdbfe;
    text-align: center;
}
.pub-ai-planner-save-form {
    margin: 0 0 8px;
}
.pub-ai-planner-save-btn {
    display: inline-block;
    min-width: 140px;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    background: #15803d;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}
.pub-ai-planner-save-btn:hover {
    background: #166534;
}
.pub-ai-planner-save-note {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}
.pub-ai-planner-save-note a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}
.pub-ai-planner-save-note a:hover {
    text-decoration: underline;
}
.pub-ai-planner-saved-notice {
    max-width: var(--content-max, 900px);
    margin: 0 auto 18px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #86efac;
    background: #f0fdf4;
    color: #166534;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}
