/* Life OS 0.61.5 — restrained category picker + clear desktop resize arrows. */

/* CATEGORY PICKER
   Reduce information density instead of squeezing columns into the popover. */
body.life-ui .cal615-category-panel,
body.life-ui .cal615-category-panel *{box-sizing:border-box;min-width:0}

body.life-ui .cal615-category-panel{
 width:100%;
 gap:10px!important;
 overflow:hidden;
}
body.life-ui .cal615-category-mode{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;
 align-items:center!important;
 gap:10px!important;
}
body.life-ui .cal615-category-mode>span{
 min-width:0;
 font-size:13px!important;
 font-weight:720!important;
 letter-spacing:-.01em;
}
body.life-ui .cal615-category-mode>div{
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 width:auto!important;
 max-width:190px!important;
 gap:2px;
}
body.life-ui .cal615-category-mode>div>button{
 min-width:0!important;
 white-space:nowrap!important;
 overflow:hidden;
 text-overflow:ellipsis;
 padding:6px 9px!important;
}
body.life-ui .cal615-category-panel .cal483-category-help{
 margin:0!important;
 max-width:100%;
 font-size:11px!important;
 line-height:1.45!important;
 color:var(--life-tertiary,var(--text-faint))!important;
}
body.life-ui .cal615-category-actions{
 display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:6px!important;
 width:100%;
}
body.life-ui .cal615-category-actions>button{
 width:100%;
 min-width:0!important;
 min-height:32px!important;
 margin:0!important;
 padding:6px 7px!important;
 border-radius:9px!important;
 white-space:normal!important;
 line-height:1.2!important;
 text-align:center!important;
 overflow-wrap:anywhere;
}
body.life-ui .cal615-category-summary{
 display:flex!important;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 width:100%;
 padding:8px 2px 3px!important;
}
body.life-ui .cal615-category-summary span,
body.life-ui .cal615-category-summary b{
 min-width:0;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}
body.life-ui .cal615-category-list{
 width:100%!important;
 max-width:100%!important;
 max-height:min(330px,42vh)!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 overscroll-behavior:contain;
 padding:2px 3px 2px 0!important;
}
body.life-ui .cal615-category-row{
 display:grid!important;
 grid-template-columns:12px minmax(0,1fr) 18px!important;
 align-items:center!important;
 column-gap:9px!important;
 width:100%!important;
 max-width:100%!important;
 min-height:40px!important;
 padding-top:6px!important;
 padding-right:7px!important;
 padding-bottom:6px!important;
 overflow:hidden!important;
 border:1px solid transparent!important;
 border-radius:11px!important;
}
body.life-ui .cal615-category-row.on{
 border-color:color-mix(in srgb,var(--life-focus-strong,var(--accent)) 14%,transparent)!important;
 background:color-mix(in srgb,var(--life-focus-strong,var(--accent)) 7%,transparent)!important;
}
body.life-ui .cal615-category-row:not(.on){opacity:.72!important}
body.life-ui .cal615-category-name{
 display:block!important;
 grid-column:2!important;
 min-width:0!important;
 max-width:100%!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 white-space:nowrap!important;
 font-size:11.5px!important;
 line-height:1.25!important;
 font-weight:590!important;
}
body.life-ui .cal615-category-path{
 display:none!important;
}
body.life-ui .cal615-category-mark{
 grid-column:3!important;
 min-width:18px!important;
 width:18px!important;
 text-align:center!important;
}
body.life-ui .cal615-category-row>i{
 grid-column:1!important;
 margin:0!important;
}

/* Desktop popover gets a dependable inner width; outer positioning remains handled by 0.61.4. */
@media(min-width:821px){
 body.life-ui #cal483-category-popover.cal614-category-popover{
  width:min(360px,calc(100vw - 24px))!important;
  max-width:min(360px,calc(100vw - 24px))!important;
 }
}

/* Mobile: mode and actions stack without squeezing labels. */
@media(max-width:820px){
 body.life-ui .mc482-filter-sheet .cal615-category-mode{
  grid-template-columns:1fr!important;
  align-items:stretch!important;
 }
 body.life-ui .mc482-filter-sheet .cal615-category-mode>div{
  width:100%!important;
  max-width:none!important;
 }
 body.life-ui .mc482-filter-sheet .cal615-category-actions{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
 body.life-ui .mc482-filter-sheet .cal615-category-actions>button:last-child:nth-child(odd){
  grid-column:1/-1;
 }
 body.life-ui .mc482-filter-sheet .cal615-category-list{
  max-height:min(300px,38vh)!important;
 }
 body.life-ui .mc482-filter-sheet .cal615-category-row{
  min-height:44px!important;
  font-size:12px!important;
 }
 body.life-ui .mc482-filter-sheet .cal615-category-name{font-size:12px!important}
}

/* DESKTOP EVENT EDGE RESIZE
   The hit-zone is forgiving; the affordance appears only when the pointer reaches that edge. */
@media(min-width:821px) and (hover:hover) and (pointer:fine){
 body.life-ui .life-cal-resize-handle-v614.life-cal-resize-handle-v615{
  left:3px!important;
  right:3px!important;
  height:14px!important;
  z-index:12!important;
  cursor:ns-resize!important;
  display:flex!important;
  align-items:center;
  justify-content:center;
  color:inherit;
 }
 body.life-ui .life-cal-resize-handle-v614.life-cal-resize-handle-v615.top{top:-7px!important}
 body.life-ui .life-cal-resize-handle-v614.life-cal-resize-handle-v615.bottom{bottom:-7px!important}

 /* Remove the older line affordance; 0.61.5 uses the explicit double arrow instead. */
 body.life-ui .life-cal-resize-handle-v615:after{display:none!important}

 body.life-ui .life-cal-resize-affordance-v615{
  pointer-events:none;
  display:grid;
  place-items:center;
  width:24px;
  height:18px;
  border:1px solid color-mix(in srgb,currentColor 18%,transparent);
  border-radius:999px;
  background:color-mix(in srgb,var(--life-surface-raised,var(--bg-elevated)) 94%,transparent);
  box-shadow:0 3px 10px rgba(0,0,0,.10);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  font:700 14px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  opacity:0;
  transform:scale(.88);
  transition:opacity .11s ease,transform .11s ease;
 }
 body.life-ui .life-cal-resize-handle-v615:hover .life-cal-resize-affordance-v615,
 body.life-ui .cal164-block.life-cal-resizing-v614 .life-cal-resize-affordance-v615{
  opacity:.92;
  transform:scale(1);
 }
 body.life-ui .cal164-block.life-cal-resizable-v614:hover{
  overflow:visible!important;
 }
 body.life-ui .cal164-block.life-cal-resizing-v614 .life-cal-resize-affordance-v615{
  opacity:1;
 }
}
