/* Experience Dentistry — Logged-in Theme Override
   Goal: Align outer shell with public gradient without touching inner UI.
*/

#wrapper,
#sidebar,
#topbar .navbar-header {
  background: linear-gradient(135deg, #7b4dff, #c86bff) !important;
}

/* --- ED: Logged-in logo sizing guardrails (prevents giant logos) --- */
#topbar .navbar-header img,
#sidebar img,
.navbar-brand img,
.sidebar img {
  height: 34px !important;
  width: auto !important;
  max-width: 220px !important;
}

/* Mobile tighten */
@media (max-width: 768px) {
  #topbar .navbar-header img,
  .navbar-brand img {
    height: 28px !important;
    max-width: 180px !important;
  }
}

/* --- ED: HARD CLAMP logged-in logo sizing --- */
a.navbar-brand span.logo-text img,
#topbar a.navbar-brand img,
#sidebar img {
  height: 34px !important;
  max-height: 34px !important;
  width: auto !important;
  max-width: 220px !important;
  display: inline-block !important;
}

/* === ED: Customer Support sidebar logo clamp (2025-12) === */
.navbar-static-side ul li img[src*="/responsive/img/logo.png"],
#sidebar.navbar-static-side ul li img[src*="/responsive/img/logo.png"] {
  max-width: 160px !important;
  max-height: 54px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  margin: 12px 0 12px 12px !important;
}

/* === ED LOGO + LEFT ALIGN OVERRIDE — <PASTE_THE_STAMP_FROM_STEP_1_HERE> === */

/* Use a cache-busted logo URL everywhere we can */
#side-menu > li:first-child img,
.navbar-static-side ul li:first-child img {
  content: url(/responsive/img/logo-<PASTE_THE_STAMP_FROM_STEP_1_HERE>.png) !important;
  width: 120px !important;
  max-width: 120px !important;
  height: auto !important;
}

/* Left align the logo block (match Customer Support look) */
#side-menu > li:first-child,
.navbar-static-side ul li:first-child {
  text-align: left !important;
}

#side-menu > li:first-child img,
.navbar-static-side ul li:first-child img {
  margin: 14px 0 10px 14px !important;   /* left aligned */
  display: block !important;
}

/* =========================================================
   ED LOGO OVERRIDE (cache-safe)
   Stamp: 20251216_122203
   Purpose: eliminate cached responsive/img/logo.png
   ========================================================= */
.ed-logo,
.logo,
.site-logo,
.brand-logo,
.sidebar-logo,
.header-logo {
  background-image: url("/responsive/img/logo.png?v=20251216_122203") !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

/* Common logo containers (safe, non-destructive) */
#logo, .logo-container, .brand, .navbar-brand, .sidebar .logo {
  background-image: url("/responsive/img/logo.png?v=20251216_122203") !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
}

/* =========================================================
   HOTFIX 2025-12-17
   1) Kill any CSS-painted duplicate logo behind the real <img>
   2) Stop avatar/profile-photo distortion
   ========================================================= */

/* LOGO: if #logo has a real <img>, do NOT allow backgrounds or pseudo logos */
#topbar a#logo,
a#logo.navbar-brand {
  background: none !important;
  background-image: none !important;
}

#topbar a#logo:before,
#topbar a#logo:after,
a#logo.navbar-brand:before,
a#logo.navbar-brand:after,
#topbar a#logo .logo-text:before,
#topbar a#logo .logo-text:after {
  content: none !important;
  background: none !important;
  background-image: none !important;
}

#topbar a#logo img,
a#logo.navbar-brand img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-height: 48px !important;
}

/* AVATARS: never squash. Crop to square cleanly. */
img.img-circle,
.user-panel .thumb img,
.dropdown-messages .avatar img,
.avatar img {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover !important;
}

/* =========================================================
   HOTFIX 20251217_024759
   Patient view: eliminate duplicate logo + stop avatar distortion
   Scope: patient UI only (body contains patient markup)
   ========================================================= */

/* If any earlier rule set a background-image on #logo/.navbar-brand,
   kill it so only the <img> shows (prevents "double logo"). */
body #topbar .navbar-header #logo,
body #topbar .navbar-header a.navbar-brand {
  background-image: none !important;
  background: none !important;
}

/* Force the actual logo IMG to behave consistently */
body #topbar .navbar-header #logo img {
  display: block !important;
  height: 40px !important;
  width: auto !important;
  max-width: 160px !important;
}

/* Avatar distortion fix (sidebar user-panel uses img-circle) */
body #sidebar .user-panel .thumb img.img-circle {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover !important;
}

/* =========================================================
   HOTFIX 20251217_025347
   Patient view: eliminate duplicate logo + stop avatar distortion
   Scope: patient UI only (body contains patient markup)
   ========================================================= */

/* If any earlier rule set a background-image on #logo/.navbar-brand,
   kill it so only the <img> shows (prevents "double logo"). */
body #topbar .navbar-header #logo,
body #topbar .navbar-header a.navbar-brand {
  background-image: none !important;
  background: none !important;
}

/* Force the actual logo IMG to behave consistently */
body #topbar .navbar-header #logo img {
  display: block !important;
  height: 40px !important;
  width: auto !important;
  max-width: 160px !important;
}

/* Avatar distortion fix (sidebar user-panel uses img-circle) */
body #sidebar .user-panel .thumb img.img-circle {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover !important;
}
