/* Linktree — LEFT MENU CSS v11 (solid glass, close-not-minimise)
   - Stronger panel opacity + blur
   - Header simplified: title + context + close button
   - No minimise mode
   - Closed mode supported (JS also uses display:none)
   - Prevent horizontal scrollbars
*/

#dh-menu-root{ position: relative; z-index: 9999; }

:root{
  --dh-w: 370px;
  --dh-r: 22px;
  --dh-pad: 14px;

  /* Stronger panel */
  --dh-panel: rgba(18, 22, 30, 0.88);
  --dh-bd: rgba(255,255,255,0.12);

  --dh-t: rgba(255,255,255,0.92);
  --dh-t2: rgba(255,255,255,0.72);

  --dh-ac: rgba(42,166,255,0.95);
  --dh-acBd: rgba(42,166,255,0.30);
}

/* =========================
   SHELL
   ========================= */
.dh-leftmenu{
  position: fixed;
  left: 16px;
  top: 16px;
  bottom: 16px;

  width: var(--dh-w);
  max-width: calc(100vw - 32px);

  border-radius: var(--dh-r);

  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(42,166,255,0.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 35%),
    var(--dh-panel);

  border: 1px solid var(--dh-bd);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 30px 80px rgba(0,0,0,0.70),
    0 0 0 1px rgba(0,0,0,0.25) inset;

  overflow: hidden;
  overflow-x: hidden;
}

.dh-leftmenu__inner{
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Closed state (JS hides via display:none, this is a safe fallback) */
.dh-leftmenu.is-closed{
  display: none !important;
}

/* =========================
   HEADER
   ========================= */
.dh-leftmenu__header{
  padding: 14px 14px 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);

  background:
    linear-gradient(180deg, rgba(42,166,255,0.14), transparent 60%);
}

.dh-headerrow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* simplified header text container */
.dh-headtxt{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.dh-brandname{
  font-family: var(--font, system-ui);
  font-weight: 950;
  font-size: 18px;
  letter-spacing: 0.08em; /* less aggressive than previous 0.14em for readability */
  color: rgba(255,255,255,0.96);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* context line only (selected link / group) */
.dh-headctx{
  margin-top: 6px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  color: var(--dh-ac);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Close button (reuses your existing class name) */
.dh-minbtn{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
  flex: 0 0 auto;
}
.dh-minbtn:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(42,166,255,0.26);
  transform: translateY(-1px);
}

/* Drag handle feel */
#dhDragHandle { cursor: grab; }
#dhDragHandle:active { cursor: grabbing; }

/* =========================
   STACK
   ========================= */
.dh-leftmenu__stack{
  padding: var(--dh-pad);
  overflow: auto;
  overflow-x: hidden;
  background: rgba(0,0,0,0.10);
}

/* Section label */
.dh-section__label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.65;
  margin: 6px 6px 10px 6px;
  color: rgba(255,255,255,0.72);
}

/* Lists */
.dh-list{ display: grid; gap: 10px; }

/* =========================
   HEADING PILLS
   ========================= */
.dh-heading{
  width: 100%;
  height: 46px;
  padding: 0 12px;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.30);

  color: var(--dh-t);

  font-family: var(--font, system-ui);
  font-weight: 850;
  letter-spacing: 0.2px;

  cursor: pointer;
  user-select: none;

  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
  box-sizing: border-box;
}

.dh-heading:hover{
  background: rgba(42,166,255,0.14);
  border-color: rgba(42,166,255,0.28);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(42,166,255,0.12);
}

.dh-heading--active{
  background: rgba(42,166,255,0.18);
  border-color: rgba(42,166,255,0.34);
  box-shadow:
    0 0 0 1px rgba(42,166,255,0.16),
    0 18px 50px rgba(0,0,0,0.45);
}

.dh-ico{
  width: 26px;
  height: 26px;
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.dh-heading__txt{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================
   LINKS
   ========================= */
.dh-links{ display: grid; gap: 10px; margin-top: 10px; padding-bottom: 6px; }

.dh-link{
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--dh-t);

  padding: 12px 12px;
  border-radius: 18px;

  background: rgba(0,0,0,0.26);
  border: 1px solid rgba(255,255,255,0.10);

  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
  box-sizing: border-box;
}

.dh-link:hover{
  background: rgba(42,166,255,0.14);
  border-color: rgba(42,166,255,0.24);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(42,166,255,0.12);
}

.dh-link__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dh-link__label{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dh-link__icon{
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10);
}

.dh-link__text{
  font-weight: 900;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dh-link__tag{ font-size: 12px; opacity: 0.7; }

.dh-link__desc{
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.3;
  opacity: 0.78;
  color: rgba(255,255,255,0.78);
}

.dh-empty{
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.10);
  opacity: 0.85;
  color: rgba(255,255,255,0.80);
}

/* =========================
   FOOTER
   ========================= */
.dh-leftmenu__footer{
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.20);
}

.dh-back{
  width: 100%;
  height: 44px;
  border-radius: 18px;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.28);
  color: rgba(255,255,255,0.92);

  font-family: var(--font, system-ui);
  font-weight: 900;
  letter-spacing: 0.2px;

  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.dh-back:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(42,166,255,0.22);
  transform: translateY(-1px);
}

/* Error */
.dh-error{
  padding: 14px;
  border-radius: 18px;
  background: rgba(120, 20, 20, 0.28);
  border: 1px solid rgba(255,60,60,0.26);
}
.dh-error__title{ font-weight: 900; margin-bottom: 6px; color: rgba(255,255,255,0.92); }
.dh-error__text{ opacity: 0.86; font-size: 13px; color: rgba(255,255,255,0.82); }

/* Mobile */
@media (max-width: 520px){
  .dh-leftmenu{
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
  }
}
