/* topbar.css - desktop shell part 3 (with topbar.js): plan / theme / language at the top right,
   "Contact us" at the bottom of the sidebar, language picker with flags.
   Loads after desktop-v2.css. Rollback: remove its <link> (and topbar.js). */

/* ---------- flags (everywhere: phones use the same language button) ---------- */
.hd-flag {
  display: inline-block; width: 26px; height: 18px; flex: none; overflow: hidden; border-radius: 4px; line-height: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.hd-flag svg { display: block; width: 100%; height: 100%; }
.language-trigger .hd-flag { width: 24px; height: 17px; }

/* Language menu: a grid of flags, no names (the name shows as a tooltip and is read by screen readers) */
.language-menu.hd-flags {
  min-width: 0 !important; display: grid; grid-template-columns: repeat(2, 48px); gap: 6px; padding: 8px;
  border-radius: 16px; clip-path: none;
}
.language-menu.hd-flags .language-option {
  display: flex; align-items: center; justify-content: center; width: 48px; min-height: 40px; padding: 0; border-radius: 10px;
}
.language-menu.hd-flags .language-option .hd-flag { width: 30px; height: 21px; }
.language-menu.hd-flags .language-option.active { background: var(--s3); box-shadow: inset 0 0 0 2px var(--acc); }
.language-menu.hd-flags .language-name,
.language-menu.hd-flags .language-check { display: none; }

#hd-contact { display: none; }

/* ---------- contact icons (shared by the sidebar and the phone Profile card) ---------- */
.hd-c-soc { display: flex; flex-wrap: wrap; gap: 10px; }
.hd-c-soc a, .hd-c-soc span.off {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--s2); color: var(--t2); text-decoration: none;
  transition: background .2s, color .2s, transform .22s cubic-bezier(.22, 1.2, .36, 1);
}
.hd-c-soc a:hover { background: var(--s3); color: var(--t1); }
.hd-c-soc a:active { transform: scale(.9); }
.hd-c-soc span.off { color: var(--t3); opacity: .45; }
.hd-c-soc svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* phones and tablets: "Contact us" card at the end of the Profile page */
/* (the section itself looks like the other Profile sections through .pf-sec) */
.hd-pc .hd-c-soc { justify-content: space-between; gap: 6px; margin-top: 4px; }
.hd-pc-ads {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line); color: var(--t2); font: 600 14px var(--font-b); text-decoration: none;
}
.hd-pc-ads:hover, .hd-pc-ads:active { color: var(--acc-t); }
@media (max-width: 360px) { .hd-pc .hd-c-soc a, .hd-pc .hd-c-soc span.off { width: 40px; height: 40px; } }
@media (max-width: 899px) {
  #view:has(.hd-pc) .adp-prof { display: none; } /* the card has its own link */
}
/* computers have the icons in the sidebar and keep the older link at the end of the page */
@media (min-width: 900px) { .hd-pc { display: none !important; } }

/* ---------- menu icons: line version on computers, solid version on phones and tablets (see topbar.js) ---------- */
svg .if { display: none; fill: currentColor; stroke: none; }
@media (max-width: 899px) {
  nav#nav svg .il { display: none; }
  nav#nav svg .if { display: inline; }
}

/* ---------- phones: a floating rounded menu bar, solid icons, the open tab on a light grey pill ---------- */
@media (max-width: 640px) {
  :root { --navh: 84px; } /* bar 68 px + gap under it; pages leave this much room at the bottom */
  nav#nav {
    left: 12px !important; right: 12px !important; bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    height: 68px !important; padding: 6px !important; gap: 2px; box-sizing: border-box;
    border: 1px solid var(--line) !important; border-radius: 34px;
    background: var(--s1) !important; box-shadow: 0 10px 30px rgba(20, 18, 31, .14);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  nav#nav button,
  nav#nav button.on {
    height: 100% !important; min-height: 0 !important; padding: 5px 2px 4px !important;
    justify-content: center !important; gap: 3px !important;
    border-radius: 28px; color: color-mix(in srgb, var(--t3) 62%, var(--s1)); font: 700 11px/1.2 var(--font-b) !important; letter-spacing: 0;
    transition: background .2s, color .2s;
  }
  nav#nav button.on { background: var(--s2) !important; color: var(--t1) !important; }
  nav#nav button svg,
  nav#nav button:hover svg,
  nav#nav button.on svg,
  nav#nav button.on:hover svg {
    width: 26px !important; height: 26px !important; padding: 0 !important; border-radius: 0 !important;
    background: none !important; color: inherit !important; transform: none !important;
  }
  /* new things: a small red dot at the top right of the icon (the number shows on computers) */
  nav#nav .nb,
  nav#nav button i.nb {
    top: 7px !important; left: calc(50% + 9px) !important; right: auto !important; transform: none !important;
    min-width: 0 !important; width: 10px !important; height: 10px !important; padding: 0 !important;
    border-radius: 50% !important; background: #EF3F5A !important; box-shadow: 0 0 0 2px var(--s1) !important;
    font-size: 0 !important; line-height: 0 !important; color: transparent !important; overflow: hidden;
  }
}

@media (min-width: 900px) {
  /* ---------- top bar across the content area ---------- */
  .wrap:has(#nav) > header > div:last-child {
    position: fixed !important; top: 0; left: 248px; right: 0; bottom: auto; z-index: 15;
    grid-column: auto; grid-row: auto; align-self: auto;
    width: auto; height: 64px; box-sizing: border-box;
    display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 10px;
    padding: 0 28px !important; margin: 0 !important;
    border-top: 0; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .wrap:has(#nav) > header #ha { display: none !important; }
  .wrap:has(#nav) #view { margin-top: 64px !important; }
  .dc2 { height: calc(100vh - 64px); height: calc(100dvh - 64px); }

  /* plan as a pill: "Your plan [Reserve]" */
  .wrap:has(#nav) > header .dv-plan {
    flex: none; width: auto; height: 40px; padding: 0 6px 0 14px; gap: 10px; border-radius: 20px;
    background: var(--s2); color: var(--t2); font: 500 13px var(--font-b);
  }
  .wrap:has(#nav) > header .dv-plan:hover { background: var(--s3); color: var(--t1); }
  .wrap:has(#nav) > header .dv-plan b { border-radius: 14px; padding: 4px 11px; }

  /* theme and language: two matching round buttons */
  .wrap:has(#nav) > header .theme-btn,
  .wrap:has(#nav) > header .language-trigger {
    width: 40px; height: 40px; border-radius: 20px; border: 0; clip-path: none; background: var(--s2);
  }
  .wrap:has(#nav) > header .theme-btn:hover,
  .wrap:has(#nav) > header .language-trigger:hover { background: var(--s3); }

  /* the language menu opens under its button (top right) instead of in the sidebar */
  body:has(#nav) .language-menu {
    top: 60px !important; right: 24px !important; left: auto !important; bottom: auto !important;
  }

  /* ---------- "Contact us" at the bottom of the sidebar ---------- */
  .wrap:has(#nav) > #hd-contact {
    grid-column: 1; grid-row: 1; align-self: end; position: sticky; bottom: 0; z-index: 2;
    display: flex; flex-direction: column; gap: 2px; box-sizing: border-box; width: 100%;
    padding: 14px 14px 16px; background: var(--s1); border-top: 1px solid var(--line);
  }
  .hd-c-h { margin: 0 14px 6px; font: 700 11px/1.4 var(--font-b); letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
  .hd-c-row {
    display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 14px;
    border: 0; border-radius: 12px; background: none; color: var(--t2); font: 500 14px var(--font-b);
    text-align: left; text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
  }
  .hd-c-row:hover { background: var(--s2); color: var(--t1); }
  .hd-c-row svg {
    width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .hd-c-row span { flex: none; }
  .hd-c-row em {
    flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-style: normal; font-size: 12px; color: var(--t3); text-align: right;
  }
  /* six round icons in one row (email, LINE, TikTok, Facebook, Instagram, X): 6 x 30 px + gaps fit the sidebar */
  #hd-contact .hd-c-soc { flex-wrap: nowrap; gap: 4px; padding: 2px 10px 4px; }
  #hd-contact .hd-c-soc a, #hd-contact .hd-c-soc span.off { width: 30px; height: 30px; }
  #hd-contact .hd-c-soc svg { width: 17px; height: 17px; }
  .hd-c-ads:empty { display: none; }
  .hd-c-ads #side-ads { padding: 6px 14px 2px !important; }
  .hd-c-out { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; padding-top: 12px; color: var(--t3); }
}
/* end of topbar.css */

/* contact details written out (email, LINE) above the social icons: sidebar and phone Profile card */
.hd-c-dt { display: grid; gap: 2px; margin: 0 0 8px; }
.hd-c-ln { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 0; color: var(--t1) !important; font: 600 14px var(--font-b); text-decoration: none !important; }
a.hd-c-ln:hover { color: var(--acc) !important; }
.hd-c-ln svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.hd-c-ln span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-pc .hd-c-soc { justify-content: flex-start !important; gap: 10px !important; }
#hd-contact .hd-c-dt { margin: 0 14px 6px; }
#hd-contact .hd-c-ln { padding: 3px 0; font-size: 12.5px; color: var(--t2) !important; }
#hd-contact .hd-c-ln svg { width: 15px; height: 15px; }

/* "Problem or feedback" on the phone's Profile contact card (feedback.js): a clear, full-width button */
.hd-pc-fb {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 14px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--s1); color: var(--t1);
  font: 700 14.5px var(--font-b); cursor: pointer; transition: border-color .2s, background .2s;
}
.hd-pc-fb:hover, .hd-pc-fb:active { border-color: var(--acc); }
.hd-pc-fb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
