/* =========================================================
   CEED THEME 1.0  -  design tokens + shell
   Loaded AFTER style.css and dark.css (see container.phtml).
   Change the look of the whole site by editing the tokens.
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  --c-ink: #0e1726;          /* text, icons */
  --c-ink-2: #55617a;        /* secondary text */
  --c-canvas: #eef1f6;       /* page background */
  --c-surface: #ffffff;      /* cards, header */
  --c-line: #e1e6ef;         /* hairlines */
  --c-accent: #00d2d3;       /* Ceed teal: fills, rings */
  --c-accent-deep: #007f8c;  /* teal for text/links on light (AA) */
  --c-accent-ink: #04222a;   /* text on teal fills */
  --c-hot: #ff4d6d;          /* likes, unread dots */

  --r-card: 18px;
  --r-control: 12px;
  --r-pill: 999px;

  --fs-body: 15px;
  --lh-body: 1.5;
  --space-card: 16px;
  --space-gap: 14px;
  --header-h: 64px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

/* Dark: WoWonder sets body.night_mode */
body.night_mode {
  --c-ink: #eef2fa;
  --c-ink-2: #9aa6bd;
  --c-canvas: #0b1220;
  --c-surface: #131c2e;
  --c-line: #223049;
  --c-accent-deep: #38e0e1;
  --c-accent-ink: #04222a;
}

/* "Pro" mode (linkedin) is a density variant, not a separate skin */
body.ceed-mode-linkedin {
  --fs-body: 13.5px;
  --space-card: 12px;
  --space-gap: 10px;
  --r-card: 10px;
  --r-control: 8px;
  --c-canvas: #f1f2f4;
}
body.ceed-mode-linkedin.night_mode { --c-canvas: #0b1220; }

/* ---------- 2. BASE ---------- */
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-accent-deep); }
a:hover, a:focus { color: var(--c-ink); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.content-container { margin-top: calc(var(--header-h) + 4px) !important; }
.page-margin { margin-top: 10px; }
.ad-placement-header-footer, .ad-placement-header-footer .content, .ad-placement-header-footer .contnet { margin-top: 0 !important; margin-bottom: 0; padding: 0; }

/* ---------- 3. HEADER ---------- */
header.header-container { background: transparent; position: relative; z-index: 1100; }
.navbar-default {
  background: color-mix(in srgb, var(--c-surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 0;
  border-bottom: 1px solid var(--c-line);
  box-shadow: none;
  min-height: 56px;
  z-index: 1100;
}
/* dropdowns (search history, notifications) always above the feed and composer */
.navbar-default .dropdown-menu, .search-dropdown-container, #wo_home_search .dropdown-menu { z-index: 1110; }
.navbar-default .navbar-nav > li > a { color: var(--c-ink-2); border-radius: var(--r-pill); }
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li.open > a { background: var(--c-canvas); color: var(--c-ink); }
.navbar-default .navbar-nav > li > a svg { color: currentColor; fill: currentColor; }
.navbar-default .dropdown-menu {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-card); box-shadow: 0 18px 48px rgba(14, 23, 38, .16);
  overflow: hidden;
}
.navbar-default .form-control, #wo_home_search input, header input[type="text"] {
  background: var(--c-canvas); border: 1px solid transparent;
  border-radius: var(--r-pill); height: 40px; padding: 0 16px; color: var(--c-ink);
}
header input[type="text"]:focus { border-color: var(--c-accent); background: var(--c-surface); box-shadow: none; }
.user-avatar, .navbar-default .user-avatar img { border-radius: 50%; }

/* ---------- 4. SIDEBAR ---------- */
.left-sidebar ul { padding: 6px; background: transparent; border: 0; box-shadow: none; }
.left-sidebar ul li a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 2px 0;
  color: var(--c-ink); font-weight: 600;
  border-radius: var(--r-control); transition: background .15s;
}
.left-sidebar ul li a:hover { background: var(--c-surface); text-decoration: none; }
.left-sidebar ul li.active > a, .left-sidebar ul li a.active { background: var(--c-surface); box-shadow: inset 3px 0 0 var(--c-accent); }
.left-sidebar ul li a img { width: 22px; height: 22px; }
.right-sidebar .wow_content, .sidebar-conatnier .wow_content { padding: var(--space-card); }

/* ---------- 5. CARDS (feed, panels) ---------- */
.wow_content, .panel, .panel-shadow, .post-container .panel {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  box-shadow: none;
  color: var(--c-ink);
}
.post-container { margin-bottom: var(--space-gap); }
.post-container .post { background: transparent; border: 0; box-shadow: none; }
.post-heading { padding: var(--space-card) var(--space-card) 8px; }
.post-heading .avatar, .post-heading img.avatar { border-radius: 50%; }
.post-description { padding: 4px var(--space-card) 10px; font-size: calc(var(--fs-body) + 1px); }
.post-container .post-description a { color: var(--c-accent-deep); }
.post-container img, .post-container video { max-width: 100%; }
.post-container .post-image img, .post-container .post-file img { border-radius: 0; }
.post.boosted .panel { border-color: var(--c-accent); }

/* ---------- 6. COMPOSER + STORIES ---------- */
#publisher-box, .publisher-box { border-radius: var(--r-card); }
#publisher-box textarea, .postText {
  background: var(--c-canvas); border: 0; border-radius: var(--r-control);
  padding: 12px 14px; color: var(--c-ink);
}
.user-status-home ul.status-list li a { border-radius: 14px; }
.user-status-home ul.status-list li a:hover img { transform: scale(1.04); }

/* ---------- 7. BUTTONS + INPUTS ---------- */
.btn { border-radius: var(--r-pill); font-weight: 600; }
.btn-main, .btn-primary, .btn-main:focus {
  background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink);
}
.btn-main:hover, .btn-primary:hover { background: color-mix(in srgb, var(--c-accent) 85%, #000); border-color: transparent; color: var(--c-accent-ink); }
.btn-default { background: var(--c-canvas); border-color: transparent; color: var(--c-ink); }
.form-control { border-radius: var(--r-control); border-color: var(--c-line); background: var(--c-surface); color: var(--c-ink); box-shadow: none; }
.form-control:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 25%, transparent); }
.dropdown-menu { border-radius: var(--r-card); border-color: var(--c-line); }
.modal-content { border-radius: calc(var(--r-card) + 4px); border: 0; background: var(--c-surface); color: var(--c-ink); }

/* unread badges */
.new-update-alert, .unread-update .new-update-alert { background: var(--c-hot); border-radius: var(--r-pill); }

/* ---------- 8. MOBILE DOCK (the one memorable thing) ---------- */
#ceed-dock { display: none; }
@media (max-width: 768px) {
  /* phone: no desktop leftovers, never wider than the screen, no big top gap */
  html, body { max-width: 100%; overflow-x: hidden; }
  .chat-container { display: none !important; }
  .content-container, .content-container .container { width: 100% !important; max-width: 100% !important; padding-left: 0; padding-right: 0; }
  .content-container { margin-top: calc(var(--header-h) + 2px) !important; padding-bottom: 96px; }
  .page-margin { margin-top: 6px; margin-bottom: 0; }
  .middlecol { width: 100%; float: none; padding-left: 0; padding-right: 0; }
  .left-sidebar { display: none; }
  .wow_content, .post-container .panel, #publisher-box, .publisher-box { border-radius: 0; border-left: 0; border-right: 0; }
  #ceed-dock {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 1040; height: 64px; padding: 0 10px;
    background: color-mix(in srgb, var(--c-surface) 90%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
    border: 1px solid var(--c-line); border-radius: var(--r-pill);
    box-shadow: 0 12px 32px rgba(14, 23, 38, .18);
  }
  #ceed-dock a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; height: 100%; color: var(--c-ink-2); font-size: 11px; font-weight: 600; text-decoration: none;
  }
  #ceed-dock a svg { width: 24px; height: 24px; }
  #ceed-dock a.is-on { color: var(--c-ink); }
  #ceed-dock a.is-on svg { color: var(--c-accent-deep); }
  #ceed-dock a.ceed-create {
    flex: 0 0 56px; height: 56px; margin-top: -22px; border-radius: 50%;
    background: var(--c-accent); color: var(--c-accent-ink);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--c-accent) 55%, transparent);
  }
  #ceed-dock a.ceed-create svg { width: 28px; height: 28px; }
  #ceed-dock a.ceed-create span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 9. MODE WHEEL (half-circle switcher, left edge) ---------- */
#ceed-wheel { position: fixed; left: 0; top: 50%; width: 0; height: 0; z-index: 1060; touch-action: none; user-select: none; -webkit-user-select: none; }
#ceed-wheel .cw-tab {
  position: absolute; left: 0; top: -32px; width: 30px; height: 64px; padding: 0 4px 0 0;
  border: 0; border-radius: 0 64px 64px 0; background: #0b1424; color: var(--c-accent);
  display: flex; align-items: center; justify-content: center; cursor: grab;
  opacity: .55; box-shadow: 4px 6px 18px rgba(14, 23, 38, .28);
  transition: opacity .2s, width .2s;
}
#ceed-wheel .cw-tab:hover, #ceed-wheel .cw-tab:focus-visible { opacity: 1; width: 36px; }
#ceed-wheel .cw-tab svg { width: 20px; height: 20px; }
#ceed-wheel.is-dragging .cw-tab { cursor: grabbing; opacity: 1; }
#ceed-wheel.is-open .cw-tab { opacity: 0; pointer-events: none; }

#ceed-wheel .cw-disc {
  position: absolute; left: -95px; top: -95px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #14233f 0, #0b1424 72%);
  border: 1px solid rgba(0, 210, 211, .4);
  box-shadow: 0 0 0 7px rgba(0, 210, 211, .08), 0 22px 54px rgba(0, 0, 0, .45);
  transform: scale(.2); opacity: 0; pointer-events: none; cursor: grab;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.15), opacity .18s;
}
#ceed-wheel.is-open .cw-disc { transform: scale(1); opacity: 1; pointer-events: auto; }
#ceed-wheel.is-dragging .cw-disc { cursor: grabbing; }

#ceed-wheel .cw-hub {
  position: absolute; left: 78px; top: 78px; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .07); color: var(--c-accent);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
#ceed-wheel .cw-hub svg { width: 17px; height: 17px; }

#ceed-wheel .cw-item {
  position: absolute; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #9fb0c8;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .18s, background .18s, color .18s, box-shadow .18s;
}
#ceed-wheel .cw-item svg { width: 22px; height: 22px; }
#ceed-wheel .cw-item[data-i="0"] { left: 101px; top: 18px; }
#ceed-wheel .cw-item[data-i="1"] { left: 131px; top: 51px; }
#ceed-wheel .cw-item[data-i="2"] { left: 131px; top: 95px; }
#ceed-wheel .cw-item[data-i="3"] { left: 101px; top: 128px; }
#ceed-wheel .cw-item:hover, #ceed-wheel .cw-item:focus-visible { color: #fff; background: rgba(255, 255, 255, .14); }
/* selected = brighter, bigger, glowing */
#ceed-wheel .cw-item.is-active {
  background: var(--c-accent); color: #04222a; border-color: transparent; transform: scale(1.18);
  box-shadow: 0 0 0 4px rgba(0, 210, 211, .25), 0 0 24px rgba(0, 210, 211, .6);
}
#ceed-wheel.is-busy .cw-item { pointer-events: none; opacity: .6; }

#ceed-wheel .cw-name {
  position: absolute; left: 199px; top: 80px; padding: 6px 14px; border-radius: 999px;
  background: #0b1424; color: #eaf6f7; font: 600 12px/1.2 var(--font); white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35); border: 1px solid rgba(0, 210, 211, .3);
  opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .2s; pointer-events: none;
}
#ceed-wheel.is-open .cw-name:not(:empty) { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #ceed-wheel * { transition: none !important; } }
