/* Saved sky identity lives in the existing name slot; the library appears only on demand. */
.sky-foundation-name{position:relative}
.sky-saved-name-trigger{
  appearance:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  width:100%;
  min-width:0;
  min-height:30px;
  box-sizing:border-box;
  padding:5px 7px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#171411;
  cursor:pointer;
  text-align:left;
  font:800 .72rem/1.15 system-ui,sans-serif;
}
.sky-saved-name-trigger:hover,.sky-saved-name-trigger:focus-visible{
  outline:none;
  border-color:rgba(31,27,24,.14);
  background:rgba(31,27,24,.035);
}
.sky-saved-name-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Draw the dropdown indicator as a true stroked chevron rather than a text caret. */
.sky-saved-name-chevron{
  flex:0 0 auto;
  display:block;
  width:7px;
  height:7px;
  margin:-3px 2px 0 4px;
  border-right:1.6px solid currentColor;
  border-bottom:1.6px solid currentColor;
  color:#81766c;
  transform:rotate(45deg);
  transform-origin:center;
  transition:transform .12s ease;
}
.sky-saved-name-trigger[aria-expanded="true"] .sky-saved-name-chevron{transform:translateY(4px) rotate(225deg)}
.sky-saved-name-trigger.is-saved .sky-saved-name-label::before{
  content:"";
  display:inline-block;
  width:5px;
  height:5px;
  margin:0 6px 1px 0;
  border-radius:999px;
  background:#746b63;
  opacity:.55;
}
.sky-saved-name-trigger.is-dirty .sky-saved-name-label::before{background:#c58a24;opacity:1}

.sky-saved-skies-popover{
  position:fixed;
  z-index:12000;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  box-sizing:border-box;
  border:1px solid rgba(31,27,24,.2);
  border-radius:13px;
  background:#fffdf8;
  box-shadow:0 18px 44px rgba(31,27,24,.22);
  color:#211d19;
}
.sky-saved-skies-popover[hidden]{display:none!important}
.sky-saved-popover-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:42px;
  padding:0 10px 0 12px;
  border-bottom:1px solid rgba(31,27,24,.11);
  background:#f5f0e9;
}
.sky-saved-popover-head strong{font:900 .72rem/1.1 system-ui,sans-serif}
.sky-saved-popover-head button{
  appearance:none;
  display:grid;
  place-items:center;
  width:27px;height:27px;padding:0;
  border:0;border-radius:999px;background:transparent;color:#675f58;cursor:pointer;
  font:500 1.05rem/1 system-ui,sans-serif;
}
.sky-saved-popover-head button:hover,.sky-saved-popover-head button:focus-visible{outline:none;background:#e9e2da;color:#1f1b18}

.sky-saved-list{overflow:auto;overscroll-behavior:contain;padding:6px}
.sky-saved-empty{margin:0;padding:20px 12px;color:#756c64;text-align:center;font:650 .68rem/1.35 system-ui,sans-serif}
.sky-saved-list-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 30px;
  gap:3px;
  align-items:stretch;
  border-radius:9px;
}
.sky-saved-list-row.is-active{background:#f1ece5}
.sky-saved-list-item{
  appearance:none;
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) 20px;
  grid-template-areas:"name check" "meta check";
  align-items:center;
  width:100%;
  min-width:0;
  padding:8px 9px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#211d19;
  cursor:pointer;
  text-align:left;
}
.sky-saved-list-item:hover,.sky-saved-list-item:focus-visible{outline:none;border-color:rgba(31,27,24,.12);background:#f6f1ea}
.sky-saved-list-name{grid-area:name;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:800 .68rem/1.2 system-ui,sans-serif}
.sky-saved-list-meta{grid-area:meta;min-width:0;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#756c64;font:600 .57rem/1.2 system-ui,sans-serif}
.sky-saved-list-check{grid-area:check;align-self:center;justify-self:center;color:#575049;font:900 .72rem/1 system-ui,sans-serif}
.sky-saved-list-delete{
  appearance:none;
  display:grid;
  place-items:center;
  align-self:center;
  width:27px;
  height:27px;
  padding:0;
  border:1px solid transparent;
  border-radius:999px;
  background:transparent;
  color:#81766c;
  cursor:pointer;
  font:700 .9rem/1 system-ui,sans-serif;
}
.sky-saved-list-delete:hover,.sky-saved-list-delete:focus-visible{
  outline:none;
  border-color:rgba(152,45,39,.22);
  background:#fff1ef;
  color:#9a2f29;
}

.sky-saved-popover-foot{
  max-height:min(55vh,360px);
  overflow:auto;
  overscroll-behavior:contain;
  padding:9px 10px 10px;
  border-top:1px solid rgba(31,27,24,.11);
  background:#fffdf8;
}
.sky-saved-active-status{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0;margin:0 1px 7px}
.sky-saved-active-status>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:800 .63rem/1.2 system-ui,sans-serif}
.sky-saved-active-status>small{flex:0 0 auto;color:#776e66;font:700 .55rem/1.2 system-ui,sans-serif}
.sky-saved-actions{display:flex;justify-content:flex-end;gap:6px}
.sky-saved-actions button,.sky-saved-name-form button{
  appearance:none;
  min-height:30px;
  padding:0 9px;
  border:1px solid rgba(31,27,24,.18);
  border-radius:999px;
  background:#fff;
  color:#2a2521;
  cursor:pointer;
  font:800 .58rem/1 system-ui,sans-serif;
}
.sky-saved-actions button:hover,.sky-saved-actions button:focus-visible,.sky-saved-name-form button:hover,.sky-saved-name-form button:focus-visible{outline:none;border-color:rgba(31,27,24,.42);background:#f4efe8}

.sky-saved-name-form{display:grid;gap:7px;margin-top:9px;padding-top:9px;border-top:1px solid rgba(31,27,24,.1)}
.sky-saved-name-form[hidden]{display:none!important}
.sky-saved-name-form label{display:grid;gap:4px}
.sky-saved-name-form label>span{font:800 .58rem/1.1 system-ui,sans-serif}
.sky-saved-name-form input{width:100%;min-height:34px;box-sizing:border-box;padding:6px 9px;border:1px solid rgba(31,27,24,.24);border-radius:8px;background:#fff;color:#211d19;font:700 .66rem/1.2 system-ui,sans-serif}
.sky-saved-name-form input:focus{outline:2px solid rgba(31,27,24,.16);outline-offset:1px;border-color:rgba(31,27,24,.45)}
.sky-saved-name-form>div{display:flex;justify-content:flex-end;gap:6px}
.sky-saved-name-form p{min-height:.75rem;margin:0;color:#7d3c32;font:650 .56rem/1.25 system-ui,sans-serif}

@media(max-width:620px){
  .sky-saved-name-trigger{padding-left:5px;padding-right:5px;font-size:.68rem}
  .sky-saved-skies-popover{max-width:calc(100vw - 16px)}
}


.sky-saved-list-row.is-confirming-delete{
  grid-template-columns:minmax(0,1fr) 30px;
}
.sky-saved-delete-confirmation{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:6px;
  margin:0 3px 5px;
  padding:7px 8px;
  border:1px solid rgba(152,45,39,.22);
  border-radius:9px;
  background:#fff4f2;
  color:#5f2823;
  font:750 .58rem/1.2 system-ui,sans-serif;
}
.sky-saved-delete-confirmation button{
  appearance:none;
  min-height:32px;
  padding:0 10px;
  border:1px solid rgba(31,27,24,.18);
  border-radius:999px;
  background:#fff;
  color:#2a2521;
  cursor:pointer;
  font:800 .58rem/1 system-ui,sans-serif;
}
.sky-saved-delete-confirmation button.is-danger{
  border-color:#9a2f29;
  background:#9a2f29;
  color:#fff;
}
@media(max-width:420px){
  .sky-saved-delete-confirmation{
    grid-template-columns:1fr 1fr;
  }
  .sky-saved-delete-confirmation span{
    grid-column:1 / -1;
  }
  .sky-saved-delete-confirmation button{
    width:100%;
  }
}
