/* Elementor widget — full width, flex pass-through */
.elementor-widget-yhip-cal-manager {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}
/* calendar-manager.css — Manager Calendar (custom renderer) */

.yhip-cal-manager {
    --yhip-bg: #fdfaf3; --yhip-surface: #ffffff; --yhip-card: #f7f2e4;
    --yhip-accent: #D09A40; --yhip-accent2: #e0b860; --yhip-text: #1e1a0f;
    --yhip-muted: #a0916e; --yhip-border: #e8dfc4; --yhip-slot-bg: #fdf6e0;
    --yhip-vac-color: #e05252; --yhip-vac-bg: #fff0f0; --yhip-radius: 8px;
    width: 100%; box-sizing: border-box; font-family: 'DM Mono', ui-monospace, monospace;
    background: var(--yhip-bg); color: var(--yhip-text);
    display: flex; flex-direction: column; height: 600px;
}
.yhip-cal-manager .yhip-cal-mount { display:flex; flex-direction:column; flex:1; min-height:0; }

/* ── Tab Bar ── */
/* FIX 7.10.12 — tabs get min-width:0 + overflow:hidden so flex-1 is honoured */
/* and they don't push past the widget bounds when Georgian text is long.    */
/* Text is wrapped in a span by JS so it can ellipsize gracefully.           */
/* FIX 7.10.16 — Georgian descenders (ვ, გ, ც, ძ in შვებულება / დროები) were */
/* clipped because tab bar had a fixed height:56px with overflow:hidden and  */
/* the inner span had no line-height/padding, so the descender extended      */
/* below the tab's flex-centered baseline into the clipped zone. Switching   */
/* to min-height + line-height:1.6 + vertical padding gives descenders room. */
/* FIX 7.10.19 — Tab text now WRAPS to up to 2 lines instead of truncating  */
/* with ellipsis. With 3 tabs sharing a 380px viewport, full Georgian       */
/* labels like "სტუდიური საათები" (Studio Hours) and "თავისუფალი დროები"   */
/* (Free Times) couldn't fit on a single line — ellipsis cut them to       */
/* "სტუდიური საა..." which is unreadable. Switched the inner span to       */
/* line-clamp:2 so labels wrap to 2 lines like the public/profile calendar */
/* tabs already do. Tab bar grows from min-height:56px to fit wrapped text. */
.yhip-cal-manager .yhip-tab-bar { display:flex; min-height:56px; background:var(--yhip-surface); border-bottom:1px solid var(--yhip-border); position:relative; flex-shrink:0; overflow:hidden; }
.yhip-cal-manager .yhip-tab-btn { flex:1; min-width:0; overflow:hidden; background:none; border:none; color:var(--yhip-muted); font-family:'DM Mono',monospace; font-size:11px; font-weight:500; letter-spacing:.1em; text-transform:uppercase; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; transition:color .25s; position:relative; z-index:1; padding:8px 4px; box-sizing:border-box; }
.yhip-cal-manager .yhip-tab-btn > span { max-width:100%; line-height:1.3; padding:1px 0 3px; word-break:break-word; text-align:center; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.yhip-cal-manager .yhip-tab-btn.active { color:var(--yhip-accent); background:color-mix(in srgb,var(--yhip-accent) 10%,transparent); border-radius:8px 8px 0 0; }
.yhip-cal-manager .yhip-tab-btn svg { width:16px; height:16px; }
.yhip-cal-manager .yhip-tab-indicator { position:absolute; bottom:0; height:2px; background:var(--yhip-accent); transition:left .35s cubic-bezier(.4,0,.2,1),width .35s; left:0; }

/* ── Header ── */
.yhip-cal-manager .yhip-cal-header { display:flex; align-items:center; justify-content:space-between; height:56px; padding:0 16px; background:var(--yhip-surface); border-bottom:1px solid var(--yhip-border); flex-shrink:0; }
.yhip-cal-manager .yhip-nav-arrow { width:36px; height:36px; background:var(--yhip-card); border:1px solid var(--yhip-border); border-radius:var(--yhip-radius); color:var(--yhip-text); font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.yhip-cal-manager .yhip-nav-arrow:active { background:var(--yhip-accent); color:#fff; }
.yhip-cal-manager .yhip-header-title { font-family:'DM Serif Display',Georgia,serif; font-size:17px; color:var(--yhip-text); font-weight:400; }

/* ── Hint Bar ── */
.yhip-cal-manager .yhip-hint-bar { padding:5px 16px; background:color-mix(in srgb,var(--yhip-accent) 7%,var(--yhip-surface)); border-bottom:1px solid var(--yhip-border); flex-shrink:0; font-size:10px; color:var(--yhip-muted); letter-spacing:.04em; text-align:center; }

/* ── View Toggle ── */
.yhip-cal-manager .yhip-view-toggle { display:flex; gap:4px; padding:8px 16px; background:var(--yhip-surface); border-bottom:1px solid var(--yhip-border); flex-shrink:0; }
.yhip-cal-manager .yhip-view-btn { flex:1; padding:7px 4px; background:var(--yhip-card); border:1px solid var(--yhip-border); border-radius:var(--yhip-radius); color:var(--yhip-muted); font-family:'DM Mono',monospace; font-size:10px; font-weight:500; letter-spacing:.08em; text-transform:uppercase; cursor:pointer; transition:all .2s; }
.yhip-cal-manager .yhip-view-btn.active { background:var(--yhip-accent); border-color:var(--yhip-accent); color:#fff; }
.yhip-cal-manager .yhip-desktop-only { display:none; }
@media (min-width:1024px) { .yhip-cal-manager .yhip-desktop-only { display:block; } }

/* ── Scroll / Bottom Nav ── */
.yhip-cal-manager .yhip-scroll-area { flex:1; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; min-height:0; }
.yhip-cal-manager .yhip-scroll-area::-webkit-scrollbar { width:3px; }
.yhip-cal-manager .yhip-scroll-area::-webkit-scrollbar-thumb { background:var(--yhip-border); border-radius:2px; }
.yhip-cal-manager .yhip-bottom-nav { height:60px; background:var(--yhip-surface); border-top:1px solid var(--yhip-border); display:flex; align-items:center; justify-content:space-between; padding:0 16px; flex-shrink:0; }
.yhip-cal-manager .yhip-today-btn { padding:8px 16px; background:var(--yhip-card); border:1px solid var(--yhip-border); border-radius:var(--yhip-radius); color:var(--yhip-muted); font-family:'DM Mono',monospace; font-size:11px; cursor:pointer; transition:all .2s; }
.yhip-cal-manager .yhip-today-btn:active { color:var(--yhip-accent); border-color:var(--yhip-accent); }
.yhip-cal-manager .yhip-today-btn.away { background:var(--yhip-accent); border-color:var(--yhip-accent); color:#fff; }
.yhip-cal-manager .yhip-repeat-info { font-size:10px; color:var(--yhip-muted); }

/* ── Time Grid ── */
.yhip-cal-manager .yhip-time-grid { display:flex; flex-direction:column; }
.yhip-cal-manager .yhip-time-row { display:flex; min-height:64px; border-bottom:1px solid var(--yhip-border); position:relative; }
.yhip-cal-manager .yhip-time-label { width:52px; padding:10px 8px 0; font-size:10px; color:var(--yhip-muted); flex-shrink:0; text-align:right; font-weight:500; letter-spacing:.04em; }
.yhip-cal-manager .yhip-time-content { flex:1; padding:6px 10px 6px 8px; display:flex; flex-direction:column; gap:4px; }

/* ── Tap Zone (add slot) ── */
.yhip-cal-manager .yhip-tap-zone { flex:1; min-height:48px; cursor:pointer; border-radius:var(--yhip-radius); border:1.5px dashed transparent; transition:border-color .15s,background .15s; display:flex; align-items:center; justify-content:center; }
.yhip-cal-manager .yhip-tap-zone:hover,
.yhip-cal-manager .yhip-tap-zone:active { border-color:var(--yhip-accent); background:color-mix(in srgb,var(--yhip-accent) 6%,transparent); }
.yhip-cal-manager .yhip-tap-zone::after { content:'+'; font-size:20px; color:var(--yhip-border); transition:color .15s; }
.yhip-cal-manager .yhip-tap-zone:hover::after,
.yhip-cal-manager .yhip-tap-zone:active::after { color:var(--yhip-accent); }

/* ── Slot Card ── */
.yhip-cal-manager .yhip-slot-card { background:#fff; border:1px solid var(--yhip-border); border-left:3px solid var(--yhip-accent); border-radius:var(--yhip-radius); padding:8px 36px 8px 10px; animation:yhipSlideIn .18s ease; position:relative; }
.yhip-cal-manager .yhip-slot-card.ghost { opacity:.55; border-left-color:var(--yhip-muted); padding-right:10px; }
.yhip-cal-manager .yhip-slot-card.ghost .yhip-slot-title { color:var(--yhip-muted); }
/* A class the STUDIO scheduled. Not dimmed — it is a real commitment the
   instructor has to turn up for — but not theirs to edit, so it carries no
   delete control and the padding that reserved room for one goes back. The
   tint and the wider left edge are what separate it from an own slot at a
   glance; the badge underneath says which. */
.yhip-cal-manager .yhip-slot-card.locked { padding-right:10px; border-left-width:5px; border-left-style:double; background:color-mix(in srgb,var(--yhip-accent) 7%,#fff); }
.yhip-cal-manager .yhip-slot-card.locked .yhip-slot-repeat { text-transform:none; letter-spacing:.03em; opacity:1; }
@keyframes yhipSlideIn { from{opacity:0;transform:translateX(-5px)} to{opacity:1;transform:none} }
.yhip-cal-manager .yhip-slot-title { font-size:12px; font-weight:500; color:var(--yhip-text); }
.yhip-cal-manager .yhip-slot-time { font-size:10px; color:var(--yhip-muted); margin-top:1px; }
.yhip-cal-manager .yhip-slot-repeat { display:inline-flex; align-items:center; gap:3px; margin-top:3px; font-size:9px; letter-spacing:.07em; text-transform:uppercase; color:var(--yhip-accent); opacity:.7; }
.yhip-cal-manager .yhip-slot-del { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:26px; height:26px; border-radius:6px; background:transparent; border:none; color:var(--yhip-muted); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.yhip-cal-manager .yhip-slot-del:active { background:color-mix(in srgb,var(--yhip-accent) 15%,transparent); color:var(--yhip-accent); }

/* ── Time Line ── */
.yhip-cal-manager .yhip-time-line { position:absolute; left:52px; right:0; height:2px; background:color-mix(in srgb,var(--yhip-accent) 55%,transparent); z-index:5; pointer-events:none; }
.yhip-cal-manager .yhip-time-line::before { content:''; position:absolute; left:-4px; top:-4px; width:10px; height:10px; border-radius:50%; background:var(--yhip-accent); }

/* ── N-Day View ── */
.yhip-cal-manager .yhip-tday-sticky { flex-shrink:0; background:var(--yhip-surface); border-bottom:1px solid var(--yhip-border); }
/* FIX 7.10.26 — Date column headers were misaligned with body grid columns. */
/* Root cause: the JS template set inline `style="margin-left:52px"` on       */
/* .yhip-tday-header to push it past the body's 52px time-axis column. But   */
/* margin-left only SHIFTS the header right; it doesn't shrink it. So the    */
/* header was full-width while body cells shared (full_width − 52px), making */
/* each header column wider than its body column and the rightmost columns   */
/* spilling past the calendar's right edge entirely.                         */
/*                                                                           */
/* Real fix: structure the header to mirror the body row exactly.            */
/*   Body: <yhip-tday-row> = [yhip-tday-time (52px) | yhip-tday-cells (flex)]*/
/*   Header: <yhip-tday-header> = [time-spacer (52px) | header-cols (flex)]  */
/* JS template replaced the inline margin-left hack with a sibling spacer    */
/* div + an inner header-cols container; renderer now writes column HTML     */
/* into header-cols (not header itself).                                     */
.yhip-cal-manager .yhip-tday-header { display:flex; }
/* FIX 7.10.27 — v7.10.26's spacer was width:52px (no padding), but the     */
/* body's .yhip-tday-time below has padding:8px 8px 0 with content-box      */
/* default sizing, so its rendered width is 52 + 8 + 8 = 68px. That 16px    */
/* difference made every header column start 16px LEFT of its body column,  */
/* leaving the rightmost column overflowing beyond the calendar.            */
/* Fix: give the spacer the same padding so the two have identical          */
/* effective widths.                                                         */
.yhip-cal-manager .yhip-tday-time-spacer { width:52px; padding:8px 8px 0; flex-shrink:0; }
.yhip-cal-manager .yhip-tday-header-cols { display:flex; flex:1; min-width:0; }
.yhip-cal-manager .yhip-tday-col-h { flex:1; min-width:0; padding:10px 4px; text-align:center; border-left:1px solid var(--yhip-border); font-size:10px; color:var(--yhip-muted); letter-spacing:.06em; }
.yhip-cal-manager .yhip-tday-col-h .dn { display:block; font-family:'DM Serif Display',serif; font-size:18px; color:var(--yhip-text); margin-bottom:2px; }
.yhip-cal-manager .yhip-tday-col-h.today .dn { color:var(--yhip-accent); }
.yhip-cal-manager .yhip-tday-col-h.vac { background:var(--yhip-vac-bg); }
.yhip-cal-manager .yhip-tday-row { display:flex; min-height:56px; border-bottom:1px solid var(--yhip-border); }
.yhip-cal-manager .yhip-tday-time { width:52px; padding:8px 8px 0; font-size:10px; color:var(--yhip-muted); flex-shrink:0; text-align:right; }
.yhip-cal-manager .yhip-tday-cells { display:flex; flex:1; }
.yhip-cal-manager .yhip-tday-cell { flex:1; border-left:1px solid var(--yhip-border); padding:4px; min-height:56px; cursor:pointer; transition:background .12s; }
.yhip-cal-manager .yhip-tday-cell:hover { background:color-mix(in srgb,var(--yhip-accent) 5%,transparent); }
.yhip-cal-manager .yhip-tday-cell.vac { background:var(--yhip-vac-bg); pointer-events:none; }
.yhip-cal-manager .yhip-vac-cell-label { font-size:12px; text-align:center; padding:4px; opacity:.6; }
.yhip-cal-manager .yhip-tday-cell { display:flex; flex-direction:column; }
.yhip-cal-manager .yhip-mini-slot { background:color-mix(in srgb,var(--yhip-accent) 14%,transparent); border-left:2px solid var(--yhip-accent); border-radius:4px; padding:3px 4px; font-size:9px; color:var(--yhip-accent); cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:2px; flex:1; }
.yhip-cal-manager .yhip-mini-slot.ghost { opacity:.5; border-left-color:var(--yhip-muted); color:var(--yhip-muted); background:color-mix(in srgb,var(--yhip-muted) 10%,transparent); }
.yhip-cal-manager .yhip-mini-slot.locked { border-left-style:double; border-left-width:3px; cursor:default; }
.yhip-cal-manager .yhip-mini-del { font-size:12px; opacity:.6; padding:0 2px; flex-shrink:0; cursor:pointer; }

/* ── Month View ── */
.yhip-cal-manager .yhip-month-view { padding:8px 12px 16px; }
.yhip-cal-manager .yhip-month-wdays { display:grid; grid-template-columns:repeat(7,1fr); margin-bottom:4px; }
.yhip-cal-manager .yhip-month-wday { text-align:center; font-size:9px; font-weight:500; color:var(--yhip-muted); letter-spacing:.08em; text-transform:uppercase; padding:4px 0; }
.yhip-cal-manager .yhip-month-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.yhip-cal-manager .yhip-month-day { aspect-ratio:1; border-radius:var(--yhip-radius); background:var(--yhip-card); border:1px solid var(--yhip-border); display:flex; flex-direction:column; align-items:center; padding:5px 2px 3px; cursor:pointer; transition:background .15s,border-color .15s; overflow:hidden; }
.yhip-cal-manager .yhip-month-day:active { background:color-mix(in srgb,var(--yhip-accent) 12%,var(--yhip-card)); }
.yhip-cal-manager .yhip-month-day.other { opacity:.28; pointer-events:none; }
.yhip-cal-manager .yhip-month-day.today { border-color:var(--yhip-accent); background:color-mix(in srgb,var(--yhip-accent) 10%,var(--yhip-card)); }
.yhip-cal-manager .yhip-month-day.today .dnum { color:var(--yhip-accent); }
.yhip-cal-manager .yhip-month-day .dnum { font-family:'DM Serif Display',serif; font-size:13px; color:var(--yhip-text); line-height:1; }
.yhip-cal-manager .yhip-month-day.vac-day { background:var(--yhip-vac-bg); border-color:color-mix(in srgb,var(--yhip-vac-color) 40%,transparent); }
.yhip-cal-manager .yhip-dot-row { display:flex; gap:2px; margin-top:3px; flex-wrap:wrap; justify-content:center; }
.yhip-cal-manager .yhip-dot { width:4px; height:4px; border-radius:50%; background:var(--yhip-accent); }
.yhip-cal-manager .yhip-dot.vac-dot { background:var(--yhip-vac-color); }

/* ── Vacation Day Block ── */
.yhip-cal-manager .yhip-vac-day-block { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:48px 16px; text-align:center; color:var(--yhip-vac-color); }
.yhip-cal-manager .yhip-vac-day-block svg { width:48px; height:48px; margin-bottom:12px; }
.yhip-cal-manager .yhip-vbd-title { font-family:'DM Serif Display',serif; font-size:18px; margin-bottom:4px; }
.yhip-cal-manager .yhip-vbd-sub { font-size:11px; color:var(--yhip-muted); }

/* ── Delete Sheet ── */
/* FIX 7.10.12 — overlay moved out of .yhip-cal-manager and mounted on        */
/* document.body (same pattern as .yhip-toast-global). Elementor applies CSS  */
/* transform to widget wrappers for entrance animations; any position:fixed   */
/* descendant of a transformed ancestor is re-parented to that stacking       */
/* context and no longer covers the viewport. Body-mount avoids that.         */
.yhip-delete-overlay-global { position:fixed; inset:0; background:rgba(0,0,0,.45); backdrop-filter:blur(3px); z-index:99999; display:flex; align-items:flex-end; opacity:0; pointer-events:none; transition:opacity .25s; }
.yhip-delete-overlay-global.open { opacity:1; pointer-events:all; }
.yhip-delete-overlay-global .yhip-delete-sheet { width:100%; box-sizing:border-box; background:#fff; border-top:1px solid #e8dfc4; border-radius:20px 20px 0 0; padding:20px 20px 44px; transform:translateY(100%); transition:transform .32s cubic-bezier(.4,0,.2,1); max-width:520px; margin:0 auto; }
.yhip-delete-overlay-global.open .yhip-delete-sheet { transform:translateY(0); }
.yhip-delete-overlay-global .yhip-sheet-handle { width:36px; height:4px; background:#e8dfc4; border-radius:2px; margin:0 auto 20px; }
.yhip-delete-overlay-global .yhip-sheet-title { font-family:'DM Serif Display',serif; font-size:20px; color:#1e1a0f; margin-bottom:8px; }
.yhip-delete-overlay-global .yhip-sheet-desc { font-size:13px; color:#a0916e; margin-bottom:24px; line-height:1.6; }
.yhip-delete-overlay-global .yhip-btn-row { display:flex; gap:10px; }
.yhip-delete-overlay-global .yhip-btn-keep { flex:1; padding:14px; background:#f7f2e4; border:1px solid #e8dfc4; border-radius:10px; color:#a0916e; font-family:'DM Mono',monospace; font-size:13px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.yhip-delete-overlay-global .yhip-btn-remove { flex:1; padding:14px; background:#e05252; border:none; border-radius:10px; color:#fff; font-family:'DM Mono',monospace; font-size:13px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── Toast ── */
/* FIX #2: Global toast — appended to document.body, immune to Elementor transforms */
.yhip-toast-global { position:fixed; top:24px; left:50%; transform:translateX(-50%) translateY(-20px); background:#1e1a0f; color:#fff; padding:12px 24px; border-radius:12px; font-size:13px; font-weight:500; opacity:0; transition:opacity .25s,transform .25s; pointer-events:none; z-index:100000; max-width:90vw; text-align:center; box-shadow:0 4px 24px rgba(0,0,0,.18); }
.yhip-toast-global.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── Responsive ── */
@media (max-width:480px) {
    .yhip-cal-manager .yhip-tab-btn { font-size:9px; }
    .yhip-cal-manager .yhip-header-title { font-size:14px; }
    .yhip-cal-manager .yhip-view-btn { font-size:9px; padding:5px 2px; }
}
