/* Owner-managed footer links (kurumi_site_links.py): footer icons / social row + the Site links page.
   Footer rules are loaded on every page by includes/footer.html; the .ksl* page rules only matter on
   /owner-portal/site-links. Aurora tokens (--ka-*) with fallbacks. */

/* ---- footer ------------------------------------------------------------ */
.kf__link { display: inline-flex; align-items: center; gap: 0.5rem; max-width: 100%; }
.kf__linktext { min-width: 0; overflow-wrap: anywhere; }
.kf__ico { display: inline-flex; width: 1.1rem; flex: none; justify-content: center; color: var(--ka-gold-300, #e4c477); font-size: 0.85rem; }
.kf__ico[hidden] { display: none; }
.kf__svg { display: block; width: 1em; height: 1em; }
.kf__social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.7rem 0 0; padding: 0; list-style: none; }
.kf__social[hidden] { display: none; }
.kf__soc {
  display: inline-flex; align-items: center; justify-content: center; position: relative; width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--ka-line-gold, rgba(214, 178, 94, 0.28)); border-radius: 50%;
  background: rgba(244, 235, 218, 0.04); color: var(--ka-ivory-dim, #cfc4b6) !important; font-size: 1.05rem; text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.kf__soc:hover, .kf__soc:focus-visible { color: var(--ka-ivory, #f3ece0) !important; border-color: var(--ka-gold-300, #e4c477); background: rgba(214, 172, 76, 0.14); transform: translateY(-1px); }
.kf__soc:focus-visible { outline: 2px solid var(--ka-gold-300, #e4c477); outline-offset: 2px; }
.kf__soc--text { width: auto; min-width: 2.4rem; padding: 0 0.85rem; border-radius: 999px; font-size: 0.78rem; letter-spacing: 0.04em; }
.kf__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kf__credits-extra { display: block; margin-top: 0.35rem; font-size: 0.8rem; }
@media (prefers-reduced-motion: reduce) { .kf__soc { transition: none; } .kf__soc:hover { transform: none; } }

/* ---- Site links page ----------------------------------------------------- */
.ksl { --ksl-gap: clamp(0.9rem, 2.4vw, 1.4rem); }
.ksl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ksl-layout { display: grid; gap: var(--ksl-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
.ksl-main { display: grid; gap: var(--ksl-gap); min-width: 0; }
.ksl-panel { display: grid; gap: 0.85rem; }
.ksl-panel h3 { display: flex; align-items: center; gap: 0.5rem; }
.ksl-panel h3 .fa { color: var(--og-gold, #e4c477); }
.ksl-panel--source { border-color: var(--og-gold, #e4c477); box-shadow: 0 0 0 1px rgba(228, 196, 119, 0.18), 0 10px 34px rgba(0, 0, 0, 0.35); }
.ksl-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.ksl-errors {
  padding: 0.85rem 1rem; border: 1px solid var(--ka-line-crimson, rgba(208, 42, 58, 0.5)); border-radius: var(--ka-r-sm, 8px);
  background: rgba(134, 18, 42, 0.22); color: #ffd7d3; overflow-wrap: anywhere;
}
.ksl-errors ul { margin: 0.4rem 0 0; padding-inline-start: 1.2rem; }
.ksl-errors:focus-visible { outline: 3px solid var(--og-gold, #e4c477); outline-offset: 2px; }
.ksl-switch { padding: 0.4rem 0.6rem; border: 1px solid var(--og-line, rgba(239, 227, 210, 0.16)); border-radius: var(--ka-r-sm, 8px); background: rgba(7, 6, 11, 0.45); cursor: pointer; }
.ksl-switch:has(input:checked) { border-color: var(--og-gold, #e4c477); background: rgba(214, 172, 76, 0.08); }
.ksl-switch:has(input:focus-visible) { outline: 3px solid var(--og-gold, #e4c477); outline-offset: 2px; }
.ksl-tag { margin-left: 0.3rem; padding: 0.05rem 0.45rem; border: 1px solid var(--og-line-gold, rgba(233, 196, 106, 0.3)); border-radius: 999px; font-size: 0.7rem; font-weight: 500; color: var(--og-mute, #c9bba4); }

.ksl-list { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.ksl-row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; padding: 0.8rem;
  border: 1px solid var(--og-line, rgba(239, 227, 210, 0.16)); border-radius: var(--ka-r-sm, 10px); background: rgba(7, 6, 11, 0.4);
}
.ksl-row.is-hidden { opacity: 0.72; border-style: dashed; }
.ksl-row.is-dragging { opacity: 0.45; }
.ksl-row.is-over { border-color: var(--og-gold, #e4c477); box-shadow: 0 -3px 0 var(--og-gold, #e4c477); }
.ksl-rowform { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); align-items: end; min-width: 0; }
.ksl-f-url { grid-column: span 2; }
.ksl-f-flags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ksl-save { justify-self: start; }
.ksl-tools { display: flex; gap: 0.4rem; align-items: center; }
.ksl-tool { margin: 0; }
.ksl-tool button[disabled] { opacity: 0.35; }
.ksl-handle { width: 2rem; min-height: 2rem; border: 0; background: transparent; color: var(--og-mute, #c9bba4); cursor: grab; }
.ksl-handle[hidden] { display: none; }
@media (min-width: 900px) {
  .ksl-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .ksl.is-js .ksl-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ksl.is-js .ksl-handle:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 899.98px) { .ksl-handle { display: none !important; } }
.ksl-orderform[hidden] { display: none; }

.ksl-addgrid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); align-items: end; }
.ksl-picker { margin: 0; padding: 0.8rem; min-width: 0; border: 1px solid var(--og-line, rgba(239, 227, 210, 0.16)); border-radius: var(--ka-r-sm, 10px); }
.ksl-picker legend { width: auto; margin: 0; padding: 0 0.4rem; float: none; font-size: 0.92rem; font-weight: 600; color: var(--og-ink, #efe3d2); }
.ksl-picker__search { margin-bottom: 0.6rem; }
.ksl-picker__grid { display: grid; gap: 0.4rem; grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr)); max-height: 15rem; overflow-y: auto; padding: 0.15rem; }
.ksl-ico { position: relative; display: grid; gap: 0.2rem; justify-items: center; align-content: center; min-height: 4rem; padding: 0.4rem 0.2rem; border: 1px solid var(--og-line, rgba(239, 227, 210, 0.16)); border-radius: var(--ka-r-sm, 8px); background: rgba(7, 6, 11, 0.45); cursor: pointer; text-align: center; }
.ksl-ico[hidden] { display: none; }
.ksl-ico input { position: absolute; inset: 0; width: 100% !important; height: 100%; min-height: 0 !important; margin: 0; opacity: 0; cursor: pointer; }
.ksl-ico__g { font-size: 1.3rem; color: var(--og-ink, #efe3d2); line-height: 1; }
.ksl-ico__n { font-size: 0.68rem; font-weight: 500; color: var(--og-mute, #c9bba4); line-height: 1.15; overflow-wrap: anywhere; }
.ksl-ico:has(input:checked) { border-color: var(--og-gold, #e4c477); background: rgba(214, 172, 76, 0.14); }
.ksl-ico:has(input:checked) .ksl-ico__g { color: var(--og-gold, #e4c477); }
.ksl-ico:has(input:focus-visible) { outline: 3px solid var(--og-gold, #e4c477); outline-offset: 2px; }
.ksl-ico:hover { border-color: var(--og-line-gold, rgba(233, 196, 106, 0.5)); }

.ksl-side { min-width: 0; }
.ksl-sticky { display: grid; gap: 0.6rem; }
.ksl-preview { border: 1px solid var(--og-line-gold, rgba(233, 196, 106, 0.3)); border-radius: var(--ka-r-md, 12px); padding: 1.1rem 1rem; background: linear-gradient(180deg, rgba(7, 6, 11, 0.6), rgba(7, 6, 11, 0.92)); pointer-events: none; overflow: hidden; }
.ksl-preview .kf__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; padding: 0; }
.ksl-preview .kf__nav { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.ksl-preview [hidden] { display: none; }
.ksl-preview .is-pending { outline: 1px dashed var(--og-gold, #e4c477); outline-offset: 2px; border-radius: 6px; }
@media (min-width: 1180px) {
  .ksl-layout { grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem); }
  .ksl-sticky { position: sticky; top: 5.5rem; }
}
@media (max-width: 599.98px) {
  .ksl-f-url { grid-column: auto; }
  .ksl-rowform { grid-template-columns: minmax(0, 1fr); }
}
.ksl-preview .kf__heading { font-family: var(--ka-font-display, "Cormorant Garamond", serif); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ka-gold-300, #d6b25e); margin: 0 0 0.5rem; }
.ksl-preview .kf__brand { font-size: 1.15rem; color: var(--ka-ivory, #f3ece0); }
