/* mahaPeriodPicker (js/mahaPeriodPicker.js) — loaded by the web layouts (tiles admin / mahaAdmin / empty head.jsp) */

/* ===== 기간 고르기 (mahaPeriodPicker) — 제목·입력칸 아래에 열리는 연도·달·주·날 선택 창 ===== */
/* above the side panels and their dims (9998), so an input inside a panel can open it */
.maha-pick { position:absolute; z-index:10010; width:300px; box-sizing:border-box; padding:14px 14px 12px; background:#fff; border:1px solid #e3e7ec; border-radius:14px; box-shadow:0 14px 34px rgba(30,40,50,.16), 0 2px 6px rgba(30,40,50,.06); color:#2b3038; font-size:13px; line-height:1.4; animation:mahaPickIn .16s cubic-bezier(.2,.7,.2,1) both; transform-origin:var(--maha-pick-arrow, 50%) 0; transition:width .18s cubic-bezier(.2,.7,.2,1); }
/* with the holiday list: the calendar keeps its size, the list takes the room next to it */
.maha-pick.is-wide { width:560px; display:grid; grid-template-columns:270px minmax(0,1fr); gap:14px; }
/* the little point towards the title that opened it */
.maha-pick::before { content:""; position:absolute; top:-6px; left:var(--maha-pick-arrow, 50%); width:10px; height:10px; margin-left:-5px; background:#fff; border-left:1px solid #e3e7ec; border-top:1px solid #e3e7ec; border-radius:3px 0 0 0; transform:rotate(45deg); }
/* no room below: it opens above, pointing down */
.maha-pick.is-above { transform-origin:var(--maha-pick-arrow, 50%) 100%; animation-name:mahaPickInAbove; }
.maha-pick.is-above::before { top:auto; bottom:-6px; transform:rotate(225deg); }
/* an input it is attached to (mahaPeriodPicker.attach) */
input.maha-pick-input { cursor:pointer; }
.maha-pick button { font:inherit; color:inherit; cursor:pointer; }
.maha-pick :focus-visible { outline:2px solid #339697; outline-offset:1px; }
.maha-pick-main { min-width:0; }
.maha-pick-h { display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.maha-pick-nav { flex:0 0 auto; width:30px; height:30px; display:grid; place-items:center; padding:0; border:0; border-radius:9px; background:#f4f6f8; color:#5c6670; transition:background .12s, color .12s; }
.maha-pick-nav svg { width:14px; height:14px; }
.maha-pick-nav:hover:not(:disabled) { background:#e3f2f1; color:#2b8283; }
.maha-pick-nav:disabled { opacity:.35; cursor:default; }
.maha-pick-t { flex:1 1 auto; height:30px; line-height:30px; padding:0; border:0; border-radius:9px; background:none; font-size:14.5px; font-weight:800; text-align:center; font-variant-numeric:tabular-nums; }
.maha-pick-t.is-up { display:inline-flex; align-items:center; justify-content:center; gap:6px; transition:background .12s, color .12s; }
/* the title goes one level up: years from the months, months from the weeks */
.maha-pick-t.is-up::after { content:""; width:5px; height:5px; margin-top:-3px; border-right:2px solid #8a94a0; border-bottom:2px solid #8a94a0; transform:rotate(45deg); }
.maha-pick-t.is-up:hover { background:#f6faf9; color:#2b8283; }
.maha-pick-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.maha-pick-c { position:relative; height:42px; padding:0; border:0; border-radius:10px; background:none; font-weight:700; font-variant-numeric:tabular-nums; transition:background .12s, color .12s; }
.maha-pick-c:hover:not(:disabled) { background:#eef7f6; color:#2b8283; }
/* two different things: the period being viewed is filled, this month / year has a dot under it. On the same cell both show */
.maha-pick-c.is-now { color:#2b8283; }
.maha-pick-c.is-now::after { content:""; position:absolute; left:50%; bottom:6px; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:#339697; }
.maha-pick-c.on, .maha-pick-c.on:hover:not(:disabled) { background:linear-gradient(135deg, #3ea7a8, #2b8283); color:#fff; box-shadow:0 4px 10px rgba(51,150,151,.28); }
.maha-pick-c.on.is-now::after { background:#fff; }
.maha-pick-c:disabled { color:#c6ced6; cursor:default; }
.maha-pick-c .cnt { position:absolute; top:3px; right:4px; min-width:14px; height:14px; padding:0 3px; box-sizing:border-box; border-radius:7px; background:#fbe6e3; color:#cf4538; font-size:10px; font-weight:800; line-height:14px; text-align:center; }
.maha-pick-c.on .cnt { background:rgba(255,255,255,.9); }
.maha-pick-c.is-mark:not(.on), .maha-pick-w i.is-mark { background:#fbe6e3; color:#cf4538; }
.maha-pick-wd, .maha-pick-w { display:grid; grid-template-columns:34px repeat(7,minmax(0,1fr)); align-items:center; text-align:center; }
.maha-pick-wd { margin-bottom:4px; font-size:11px; font-weight:700; color:#8a94a0; }
.maha-pick-wd span:nth-child(7) { color:#3a72d0; }
.maha-pick-wd span:nth-child(8) { color:#cf4538; }
.maha-pick-w { width:100%; height:32px; padding:0; border:0; border-radius:10px; background:none; font-size:12.5px; font-variant-numeric:tabular-nums; transition:background .12s, color .12s; }
.maha-pick-w + .maha-pick-w { margin-top:2px; }
.maha-pick-w:hover:not(:disabled) { background:#eef7f6; }
.maha-pick-w .n { font-size:11px; font-weight:800; color:#8a94a0; }
.maha-pick-w i { position:relative; font-style:normal; border-radius:6px; line-height:22px; }
.maha-pick-w i.is-out { color:#b4bcc6; }
.maha-pick-w i.is-today { font-weight:800; color:#2b8283; }
.maha-pick-w i.is-today::after { content:""; position:absolute; left:50%; bottom:0; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:#339697; }
.maha-pick-w i.is-holiday { color:#cf4538; font-weight:700; }
.maha-pick-w i.is-holiday.is-out { color:#e6a79f; }
.maha-pick-w.on, .maha-pick-w.on:hover:not(:disabled) { background:linear-gradient(135deg, #3ea7a8, #2b8283); color:#fff; box-shadow:0 4px 10px rgba(51,150,151,.28); }
.maha-pick-w.on .n, .maha-pick-w.on i.is-out, .maha-pick-w.on i.is-today { color:#fff; }
.maha-pick-w.on i.is-out { opacity:.7; }
.maha-pick-w.on i.is-today::after { background:#fff; }
/* red text would vanish on the filled row: a red tile keeps it a holiday */
.maha-pick-w.on i.is-holiday { margin:0 3px; background:#cf4538; color:#fff; }
.maha-pick-w:disabled { cursor:default; }
.maha-pick-w:disabled .n, .maha-pick-w:disabled i { opacity:.4; }
.maha-pick-w:disabled i:hover { opacity:1; }
/* mode "day": one button a day, no week column */
.maha-pick-wd.is-days { grid-template-columns:repeat(7,minmax(0,1fr)); }
/* the day calendar starts on Sunday: Sunday red first, Saturday blue last */
.maha-pick-wd.is-days span:nth-child(1) { color:#cf4538; }
.maha-pick-wd.is-days span:nth-child(7) { color:#3a72d0; }
.maha-pick-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; }
.maha-pick-d { position:relative; height:32px; padding:0; border:0; border-radius:9px; background:none; font-size:12.5px; font-variant-numeric:tabular-nums; transition:background .12s, color .12s; }
.maha-pick-d:hover:not(:disabled) { background:#eef7f6; color:#2b8283; }
.maha-pick-d.is-out { color:#b4bcc6; }
.maha-pick-d.is-today { font-weight:800; color:#2b8283; }
.maha-pick-d.is-today::after { content:""; position:absolute; left:50%; bottom:3px; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:#339697; }
.maha-pick-d.is-holiday { color:#cf4538; font-weight:700; }
.maha-pick-d.is-holiday.is-out { color:#e6a79f; }
.maha-pick-d.is-mark:not(.on) { background:#fbe6e3; color:#cf4538; }
.maha-pick-d.on, .maha-pick-d.on:hover:not(:disabled) { background:linear-gradient(135deg, #3ea7a8, #2b8283); color:#fff; font-weight:800; box-shadow:0 4px 10px rgba(51,150,151,.28); }
.maha-pick-d.on.is-today::after { background:#fff; }
/* red text would vanish on the filled day: a red dot keeps it a holiday */
.maha-pick-d.on.is-holiday::after { content:""; position:absolute; left:50%; bottom:3px; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:#ffd2cc; }
.maha-pick-d:disabled { opacity:.4; cursor:default; }
/* mode "range": the days between the start and the end make one band, so the row has no gaps */
.maha-pick-days.is-range { column-gap:0; }
.maha-pick-d.is-in, .maha-pick-d.is-in:hover:not(:disabled) { border-radius:0; background:#e3f2f1; color:#22706f; }
.maha-pick-d.is-in.is-out { color:#7fb6b3; }
.maha-pick-d.is-in.is-holiday { color:#cf4538; }
.maha-pick-d.on.is-span-start { border-radius:9px 0 0 9px; box-shadow:none; }
.maha-pick-d.on.is-span-end { border-radius:0 9px 9px 0; box-shadow:none; }
/* the day under the mouse while the end is picked */
.maha-pick-d.is-hover-end:not(:disabled) { border-radius:0 9px 9px 0; background:#e3f2f1; color:#22706f; box-shadow:inset 0 0 0 1.5px #339697; }
/* what is picked so far: [start] ~ [end] (n days); the one to press next is outlined */
.maha-pick-rg { display:flex; align-items:center; gap:6px; margin:-2px 0 10px; }
.maha-pick-rg-c { flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:1px; padding:5px 9px; border:1px solid #e3e7ec; border-radius:9px; background:#fafbfc; transition:border-color .12s, background .12s; }
.maha-pick-rg-c em { font-size:10.5px; font-style:normal; font-weight:700; color:#8a94a0; }
.maha-pick-rg-c b { font-size:12.5px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.maha-pick-rg-c.is-empty b { color:#c6ced6; }
.maha-pick-rg-c.is-next { border-color:#339697; background:#fff; box-shadow:0 0 0 3px rgba(51,150,151,.12); }
.maha-pick-rg-c.is-next em { color:#2b8283; }
.maha-pick-rg-s { flex:0 0 auto; color:#b4bcc6; font-weight:700; }
.maha-pick-rg-n { flex:0 0 auto; padding:0 7px; border-radius:999px; background:#e3f2f1; color:#22706f; font-size:11px; font-weight:800; line-height:18px; }
/* what the holiday is, on hover */
.maha-pick [data-tip]:hover::before { content:attr(data-tip); position:absolute; left:50%; bottom:calc(100% + 5px); z-index:3; transform:translateX(-50%); width:max-content; max-width:200px; padding:4px 8px; border-radius:6px; background:#2b3038; color:#fff; font-size:11.5px; font-weight:600; line-height:1.4; text-align:center; white-space:normal; pointer-events:none; }
.maha-pick-f { display:flex; align-items:center; gap:6px; margin-top:12px; padding-top:10px; border-top:1px solid #eef0f4; font-size:12px; color:#8a94a0; font-variant-numeric:tabular-nums; }
.maha-pick-f > span { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.maha-pick-more { flex:0 0 auto; display:inline-flex; align-items:center; gap:4px; height:28px; padding:0 9px 0 7px; border:1px solid #e3e7ec; border-radius:8px; background:#fff; font-size:12px; font-weight:700; color:#5c6670 !important; white-space:nowrap; transition:background .12s, border-color .12s; }
.maha-pick-more svg { width:14px; height:14px; }
.maha-pick-more:hover { border-color:#cf4538; color:#cf4538 !important; }
.maha-pick-more.on { border-color:#f1cdc8; background:#fbe6e3; color:#cf4538 !important; }
.maha-pick-now { flex:0 0 auto; height:28px; padding:0 12px; border:1px solid #339697; border-radius:8px; background:#e3f2f1; font-size:12px; font-weight:700; color:#22706f !important; white-space:nowrap; transition:background .12s; }
.maha-pick-now:hover:not(:disabled) { background:#d4ecea; }
.maha-pick-now:disabled { border-color:#e3e7ec; background:#f6f8fa; color:#b4bcc6 !important; cursor:default; }
/* the list is as tall as the calendar next to it and scrolls inside */
.maha-pick-side { position:relative; min-width:0; border-left:1px solid #eef0f4; }
.maha-pick-side-in { position:absolute; inset:0 0 0 14px; display:flex; flex-direction:column; min-height:0; }
.maha-pick-side-h { flex:0 0 auto; display:flex; align-items:center; gap:8px; height:30px; margin-bottom:10px; }
.maha-pick-side-h b { min-width:0; font-size:13px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.maha-pick-side-h span { flex:0 0 auto; margin-left:auto; padding:0 7px; border-radius:999px; background:#fbe6e3; color:#cf4538; font-size:11px; font-weight:800; line-height:18px; }
.maha-pick-hols { flex:1 1 auto; min-height:0; margin-right:-6px; padding-right:6px; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:2px; }
/* a slim rounded bar that stays out of the way until the list is hovered. style.css sets scrollbar-width / -color on everything,
   and a browser that sees them ignores the ::-webkit-scrollbar rules below, so they go back to auto here. */
.maha-pick-hols { scrollbar-width:auto; scrollbar-color:auto; }
.maha-pick-hols::-webkit-scrollbar { width:5px; height:5px; border:0; }
.maha-pick-hols::-webkit-scrollbar-button:start:decrement, .maha-pick-hols::-webkit-scrollbar-button:end:increment { display:none; }
.maha-pick-hols::-webkit-scrollbar-track { background:transparent; }
.maha-pick-hols::-webkit-scrollbar-thumb { border-radius:999px; background:#e9edf1; }
.maha-pick-hols:hover::-webkit-scrollbar-thumb { background:#cdd5dc; }
.maha-pick-hols::-webkit-scrollbar-thumb:hover { background:#339697; }
@supports not selector(::-webkit-scrollbar) {
	.maha-pick-hols { scrollbar-width:thin; scrollbar-color:#cdd5dc transparent; }
}
.maha-pick-hol { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1px 8px; width:100%; padding:6px 8px; border:0; border-radius:8px; background:none; text-align:left; transition:background .12s; }
.maha-pick-hol:hover:not(:disabled) { background:#fdf2f0; }
.maha-pick-hol:disabled { opacity:.5; cursor:default; }
.maha-pick-hol .d { grid-column:1 / -1; font-size:11px; color:#8a94a0; font-variant-numeric:tabular-nums; }
.maha-pick-hol b { min-width:0; font-size:12.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.maha-pick-hol em { align-self:center; padding:0 6px; border-radius:5px; background:#fbe6e3; color:#cf4538; font-size:10.5px; font-style:normal; font-weight:700; line-height:17px; white-space:nowrap; }
.maha-pick-hol em.t2, .maha-pick-hol em.t5 { background:#f0f2f5; color:#5c6670; }
.maha-pick-hol em.t3 { background:#fbf0d9; color:#8a5a05; }
.maha-pick-hol em.t4 { background:#e3f2f1; color:#2b8283; }
.maha-pick-none { flex:1 1 auto; display:grid; place-items:center; color:#8a94a0; font-size:12.5px; }
.maha-pick-b.is-next { animation:mahaPickNext .16s ease-out both; }
.maha-pick-b.is-prev { animation:mahaPickPrev .16s ease-out both; }
.maha-pick-b.is-in { animation:mahaPickDown .16s ease-out both; }
.maha-pick-b.is-out { animation:mahaPickUp .16s ease-out both; }
@keyframes mahaPickIn { from { opacity:0; transform:translateY(-6px) scale(.98); } to { opacity:1; transform:none; } }
@keyframes mahaPickInAbove { from { opacity:0; transform:translateY(6px) scale(.98); } to { opacity:1; transform:none; } }
@keyframes mahaPickNext { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:none; } }
@keyframes mahaPickPrev { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:none; } }
@keyframes mahaPickDown { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:none; } }
@keyframes mahaPickUp { from { opacity:0; transform:scale(1.04); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) {
	.maha-pick, .maha-pick-b { animation:none !important; transition:none; }
}
