/**
 * PrintAllDay 인쇄일정관리 — Frontend CSS
 * 고객 주문 화면 숏코드 렌더링 스타일.
 * 외부 컨테이너(border, padding)는 Uni CPO row에서 처리.
 */

/* ── Uni CPO Paragraph 모듈 white-space 오버라이드 ──────────────────────── */
/* specificity: .uni-module.uni-module-text (0,2,0) > .uni-module-text (0,1,0) */
.uni-module.uni-module-text { white-space: normal !important; }
div.uni-module-text { white-space: normal !important; }
.uni-module-text { white-space: normal !important; }

/* ── Wrap ───────────────────────────────────────────────────────────────── */
.printallday-ps-wrap {
	font-family: inherit; font-size: inherit; color: inherit; line-height: 1.5;
	--pa-btn-bg: #f5f5f3;
	--pa-btn-hover-border: #1a1a1a;
	--pa-bar-msg-size: 12px;
	--pa-bar-msg-align: left;
	--pa-bar-days-size: 12px;
	--pa-bar-days-align: left;
}

/* ── Section / Title ────────────────────────────────────────────────────── */
.printallday-section { margin-bottom: 14px; }
.printallday-section-title { font-size: 12px; font-weight: 600; color: #666; margin-bottom: 12px; }

/* ── [1] Banner ─────────────────────────────────────────────────────────── */
.printallday-ps-wrap .printallday-banner { font-size: 12px !important; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; border: 1px solid #ddd; background: #f9f9f7; color: #666; }

/* ── [2] Popup ──────────────────────────────────────────────────────────── */
.printallday-ps-wrap .printallday-popup { font-size: 12px !important; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; background: #f9f9f7; border: 1px solid #ddd; color: #666; line-height: 1.6; }

/* ── [3] Schedule Buttons ───────────────────────────────────────────────── */
.printallday-sch-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.printallday-sch-btn { flex: 1; min-width: 80px; padding: 10px 8px; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; text-align: center; background: var(--pa-btn-bg); font-family: inherit; font-size: inherit; color: inherit; transition: border-color .15s, background .15s; }
.printallday-sch-btn:hover { border-color: var(--pa-btn-hover-border); }
.printallday-sch-btn.active { border-color: var(--pa-btn-hover-border); border-width: 2px; background: #fff; }
.printallday-sch-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.printallday-sch-btn.slot-full { opacity: 0.4; cursor: pointer; }
.printallday-sch-btn-name { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.printallday-sch-btn-deadline { display: block; font-size: 10px; color: #999; margin-bottom: 2px; }
.printallday-sch-btn-surcharge { display: block; font-size: 11px; color: #555; }
.printallday-ps-wrap .printallday-sch-btn-reason { display: block; font-size: 10px !important; color: #999; margin-top: 3px; min-height: 14px; }
.printallday-sch-btn.slot-full .printallday-sch-btn-reason { color: #c00; }
.printallday-sch-btn.disabled .printallday-sch-btn-reason { color: #999; }

/* ── [4] Time Section ───────────────────────────────────────────────────── */
.printallday-time-section { margin-bottom: 14px; }
.printallday-ps-wrap .printallday-time-section-title { font-size: 12px !important; color: #666; margin-bottom: 8px; font-weight: 500; }
.printallday-time-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.printallday-time-slot { padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 12px; cursor: pointer; background: var(--pa-btn-bg); color: #666; transition: border-color .15s; font-family: inherit; }
.printallday-time-slot:hover { border-color: var(--pa-btn-hover-border); }
.printallday-time-slot.active { border-color: var(--pa-btn-hover-border); background: #fff; font-weight: 600; color: #1a1a1a; }
.printallday-time-slot.full { opacity: 0.3; cursor: not-allowed; }
.printallday-time-slot .surcharge { font-size: 10px; color: #999; display: block; margin-top: 1px; }

/* ── [5] Deadline Info ──────────────────────────────────────────────────── */
.printallday-deadline-info { background: #f9f9f7; border: 1px solid #ddd; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; font-size: 12px !important; line-height: 1.7; }
.printallday-ps-wrap .printallday-deadline-label { font-size: 12px !important; color: #666; }
.printallday-ps-wrap .printallday-deadline-time { font-size: 14px !important; font-weight: 600; color: #1a1a1a; margin-top: 2px; }
.printallday-ps-wrap .printallday-deadline-warn { font-size: 11px !important; color: #c00; margin-top: 4px; }

/* ── [6] Bar ────────────────────────────────────────────────────────────── */
.printallday-bar-area { margin-bottom: 14px; }
.printallday-bar-wrap { margin-bottom: 14px; }
.printallday-ps-wrap .printallday-bar-msg { font-size: var(--pa-bar-msg-size) !important; text-align: var(--pa-bar-msg-align) !important; color: #555; margin-bottom: 8px; }
.printallday-ps-wrap .printallday-bar-msg strong { color: #1a1a1a; font-weight: 600; }
.printallday-bar-track { height: 12px; background: #f0f0ec; border-radius: 6px; overflow: hidden; border: 1px solid #e5e5e0; }
.printallday-bar-fill { height: 100%; border-radius: 6px; background: #444; transition: width .4s ease; }
.printallday-bar-labels { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10px; color: #aaa; }
.printallday-bar-complete { font-size: 12px; color: #555; padding: 8px 10px; background: #f5f5f3; border-radius: 6px; border: 1px solid #e5e5e0; text-align: center; margin-bottom: 14px; }
.printallday-ps-wrap .printallday-bar-current-days { font-size: var(--pa-bar-days-size) !important; text-align: var(--pa-bar-days-align) !important; color: #888; margin-top: 6px; margin-bottom: 10px; }

/* ── [7] Delivery Info ──────────────────────────────────────────────────── */
.printallday-delivery-info { background: #f5f5f3; border-radius: 6px; padding: 10px 14px; }
.printallday-ps-wrap .printallday-delivery-label { font-size: 12px !important; color: #666; margin-bottom: 4px; }
.printallday-ps-wrap .printallday-delivery-date { font-size: 15px !important; font-weight: 600; }
.printallday-ps-wrap .printallday-delivery-sub { font-size: 11px !important; color: #999; margin-top: 2px; }

/* ── Error (admin only) ─────────────────────────────────────────────────── */
.printallday-error { padding: 12px; border: 1px solid #c00; border-radius: 6px; color: #c00; font-size: 13px; margin: 8px 0; }

/* ── Order Schedule Info (주문 상세 출고 일정) ─────────────────────────── */
.printallday-order-schedule-info { margin-top: 2.5em; }
.printallday-order-schedule-title { font-size: 15px; font-weight: 600; margin-top: 30px; margin-bottom: 10px; }
.printallday-order-schedule-table { font-size: 13px; }
.printallday-order-schedule-table th { width: 30%; }
.printallday-order-schedule-table td { width: 70%; }

/* ── Normal-only product ────────────────────────────────────────────────
   상품별 활성 일정이 'normal' 단독인 경우 일정 선택 UI 영역 숨김.
   [3] 일정 버튼 / [4] 출고 희망 시간 / [5] 마감 안내 / [6] 막대 그래프
   [7] 출고 예정만 표시 (백엔드는 normal 기준 자동 계산).
   ───────────────────────────────────────────────────────────────────── */
.printallday-ps-wrap.is-normal-only .printallday-sch-btns-section,
.printallday-ps-wrap.is-normal-only .printallday-time-section,
.printallday-ps-wrap.is-normal-only .printallday-deadline-info,
.printallday-ps-wrap.is-normal-only .printallday-bar-area {
    display: none !important;
}
