/* Coffee Buddy operator branding and context-specific logo safety — v0.11.171 */

.cb-brand-frame,
[data-cb-logo-context] {
  --cb-logo-bg: #fffaf1;
  --cb-logo-border: #ead8c6;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden !important;
  border: 1px solid var(--cb-logo-border);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,248,236,.96)),
    var(--cb-logo-bg);
  box-shadow: 0 5px 14px rgba(67, 37, 21, .08);
  isolation: isolate;
}

.cb-brand-image,
.cb-brand-frame > img,
[data-cb-logo-context] > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 7px !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* A nested historical logo frame must not create a second visible border. */
.cb-brand-frame .cb-brand-frame,
.cb-brand-frame [data-cb-logo-context],
[data-cb-logo-context] .cb-brand-frame {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Compact popup badge: one visible frame and a generous optical safe zone. */
.cb-brand-frame[data-cb-logo-context="popup"],
[data-cb-logo-context="popup"],
.gm-style-iw .premium-logo,
.gm-style-iw .venue-logo,
.leaflet-popup .premium-logo,
.leaflet-popup .venue-logo,
.venue-popup .premium-logo,
.venue-popup .venue-logo,
.coffee-point-popup .premium-logo,
.coffee-point-popup .venue-logo {
  flex: 0 0 58px !important;
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  padding: 8px !important;
  border: 1px solid #ead6c3 !important;
  border-radius: 14px !important;
  background: #fffaf1 !important;
  box-shadow: 0 4px 12px rgba(64, 36, 20, .07) !important;
}

.cb-brand-frame[data-cb-logo-context="popup"][data-cb-logo-aspect="wide"],
[data-cb-logo-context="popup"][data-cb-logo-aspect="wide"] {
  padding: 11px 6px !important;
}

.cb-brand-frame[data-cb-logo-context="popup"][data-cb-logo-aspect="tall"],
[data-cb-logo-context="popup"][data-cb-logo-aspect="tall"] {
  padding: 6px 12px !important;
}

.gm-style-iw .premium-logo img,
.gm-style-iw .venue-logo img,
.leaflet-popup .premium-logo img,
.leaflet-popup .venue-logo img,
.venue-popup .premium-logo img,
.venue-popup .venue-logo img,
.coffee-point-popup .premium-logo img,
.coffee-point-popup .venue-logo img {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  object-fit: contain !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Buddy Tipp remains compact and may never cross its rounded card. */
.cb-brand-frame[data-cb-logo-context="buddy-tip"],
[data-cb-logo-context="buddy-tip"] {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  padding: 7px;
  border-radius: 13px;
}

.cb-brand-frame[data-cb-logo-context="buddy-tip"][data-cb-logo-aspect="wide"],
[data-cb-logo-context="buddy-tip"][data-cb-logo-aspect="wide"] {
  padding: 11px 5px;
}

/* List logos are intentionally subordinate to name, status and recommendation. */
.cb-brand-frame[data-cb-logo-context="list"],
[data-cb-logo-context="list"] {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 7px;
  border-radius: 12px;
  box-shadow: none;
}

/* Marker logos use a square safe zone, but the image itself is never cropped. */
.cb-brand-frame[data-cb-logo-context="marker"],
[data-cb-logo-context="marker"] {
  width: 42px;
  height: 42px;
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(52, 29, 16, .18);
}

.cb-brand-frame[data-cb-logo-context="marker"][data-cb-logo-aspect="wide"],
[data-cb-logo-context="marker"][data-cb-logo-aspect="wide"] {
  padding: 11px 4px;
}

/* Venue landing hero: aspect-specific maximums prevent a logo from competing
   with the venue title or touching the golden outer border. */
.cb-brand-frame[data-cb-logo-context="landing-hero"],
[data-cb-logo-context="landing-hero"] {
  align-self: start;
  justify-self: end;
  width: 132px;
  max-width: min(132px, 28vw);
  height: 94px;
  max-height: 94px;
  margin: 4px 16px 0 24px !important;
  padding: 10px;
  border-radius: 16px;
  background: #fffaf1;
  box-shadow: 0 8px 22px rgba(60, 33, 19, .09);
}

.cb-brand-frame[data-cb-logo-context="landing-hero"][data-cb-logo-aspect="wide"],
[data-cb-logo-context="landing-hero"][data-cb-logo-aspect="wide"] {
  width: 156px;
  max-width: min(156px, 30vw);
  height: 82px;
  max-height: 82px;
  padding: 12px 9px;
}

.cb-brand-frame[data-cb-logo-context="landing-hero"][data-cb-logo-aspect="square"],
[data-cb-logo-context="landing-hero"][data-cb-logo-aspect="square"] {
  width: 104px;
  max-width: min(104px, 24vw);
  height: 104px;
  max-height: 104px;
  padding: 9px;
}

.cb-brand-frame[data-cb-logo-context="landing-hero"][data-cb-logo-aspect="tall"],
[data-cb-logo-context="landing-hero"][data-cb-logo-aspect="tall"] {
  width: 84px;
  max-width: min(84px, 22vw);
  height: 108px;
  max-height: 108px;
  padding: 8px 13px;
}

/* Legacy landing selectors receive the same limits before JS classification. */
.venue-landing-page .venue-hero .premium-logo,
.venue-landing-page .venue-hero .venue-logo,
.venue-landing-page .landing-hero .premium-logo,
.venue-landing-page .landing-hero .venue-logo,
body[class*="venue-landing"] .venue-header .premium-logo,
body[class*="venue-landing"] .venue-header .venue-logo {
  box-sizing: border-box !important;
  overflow: hidden !important;
  width: 132px !important;
  max-width: min(132px, 28vw) !important;
  height: 94px !important;
  max-height: 94px !important;
  padding: 10px !important;
  margin: 4px 16px 0 24px !important;
  border: 1px solid #ead8c6 !important;
  border-radius: 16px !important;
  background: #fffaf1 !important;
  box-shadow: 0 8px 22px rgba(60,33,19,.09) !important;
}

.venue-landing-page .venue-hero .premium-logo img,
.venue-landing-page .venue-hero .venue-logo img,
.venue-landing-page .landing-hero .premium-logo img,
.venue-landing-page .landing-hero .venue-logo img,
body[class*="venue-landing"] .venue-header .premium-logo img,
body[class*="venue-landing"] .venue-header .venue-logo img {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

/* Business Beta entry inside the established profile/operator menu. */
.cb-branding-menu-entry {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  margin: 7px 0;
  padding: 10px 12px;
  border: 1px solid #d7c9bb;
  border-radius: 15px;
  background: #fffaf2;
  color: #2f2018;
  text-align: left;
  cursor: pointer;
}

.cb-branding-menu-entry:hover {
  border-color: #9abd9f;
  background: #f6fbf3;
}

.cb-branding-menu-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #edf6e9;
  font-size: 20px;
}

.cb-branding-menu-copy strong,
.cb-branding-menu-copy small {
  display: block;
}

.cb-branding-menu-copy strong {
  color: #19562f;
  font-size: .95rem;
}

.cb-branding-menu-copy small {
  margin-top: 3px;
  color: #75675d;
  font-size: .76rem;
}

.cb-branding-menu-entry > b {
  min-width: 24px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #b36d18;
  color: #fff;
  text-align: center;
  font-size: .72rem;
}

/* Full operator workspace: a single native scroll surface without map controls
   or nested panels above it. */
html.cb-branding-open,
html.cb-branding-open body {
  overflow: hidden !important;
}

.cb-branding-workspace {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 100dvh;
  background: #fff9ef;
  color: #302017;
}

.cb-branding-workspace[hidden] {
  display: none;
}

.cb-branding-workspace-header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding:
    max(16px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    16px
    max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid #e3d5c7;
  background: rgba(255,250,242,.98);
}

.cb-branding-workspace-header h2 {
  margin: 3px 0 0;
  color: #19562f;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.cb-branding-workspace-header small,
.cb-branding-kicker {
  color: #875a3d;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cb-branding-workspace-header button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #bad0bb;
  border-radius: 14px;
  background: #edf6e9;
  color: #19562f;
  font-weight: 850;
}

.cb-branding-workspace-header [data-cb-branding-close] {
  width: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 25px;
}

.cb-branding-tabs {
  display: flex;
  gap: 8px;
  padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid #e6d9cc;
  background: #fffdf8;
}

.cb-branding-tabs button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #68584e;
  font-weight: 800;
}

.cb-branding-tabs button.is-active {
  border-color: #a8c5aa;
  background: #eef7eb;
  color: #19562f;
}

.cb-branding-workspace-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 20px max(18px, env(safe-area-inset-right))
    max(42px, calc(24px + env(safe-area-inset-bottom)))
    max(18px, env(safe-area-inset-left));
}

.cb-branding-workspace-scroll > div {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.cb-branding-beta-banner,
.cb-branding-empty,
.cb-branding-venue-card,
.cb-branding-admin-tools,
.cb-branding-admin-card {
  box-sizing: border-box;
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #dfd0c1;
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: 0 12px 30px rgba(74, 41, 24, .06);
}

.cb-branding-beta-banner {
  border-color: #b9d2b8;
  background:
    radial-gradient(circle at 100% 0%, rgba(197,224,186,.7), transparent 22rem),
    #f5fbf2;
}

.cb-branding-beta-banner h3,
.cb-branding-venue-card h3,
.cb-branding-admin-tools h3,
.cb-branding-admin-card h3 {
  margin: 5px 0;
  color: #19562f;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

.cb-branding-venue-card > header,
.cb-branding-admin-card > header,
.cb-branding-admin-tools {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cb-branding-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0ede8;
  color: #675b52;
  font-size: .73rem;
  font-weight: 900;
}

.cb-branding-status.is-pending {
  background: #fff0ca;
  color: #79530f;
}

.cb-branding-status.is-approved {
  background: #e5f4e3;
  color: #19562f;
}

.cb-branding-status.is-rejected,
.cb-branding-status.is-changes_requested {
  background: #fbe5e1;
  color: #8d3028;
}

.cb-branding-current {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e7dbd0;
  border-radius: 17px;
  background: #fffaf2;
}

.cb-branding-current .cb-brand-frame {
  margin: 0 !important;
}

.cb-branding-file,
.cb-branding-note,
.cb-branding-rights {
  display: block;
  margin: 16px 0;
}

.cb-branding-file {
  padding: 18px;
  border: 2px dashed #c9b7a7;
  border-radius: 17px;
  background: #fffaf3;
  cursor: pointer;
}

.cb-branding-file strong,
.cb-branding-file span,
.cb-branding-note span {
  display: block;
}

.cb-branding-file span,
.cb-branding-note span {
  margin-top: 4px;
  color: #76685e;
  font-size: .82rem;
}

.cb-branding-file input {
  margin-top: 13px;
}

.cb-branding-preview-grid,
.cb-branding-admin-previews {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.cb-branding-preview-grid figure,
.cb-branding-admin-previews figure {
  display: grid;
  place-items: center;
  min-width: 0;
  margin: 0;
  padding: 14px 8px;
  border: 1px solid #eadbce;
  border-radius: 16px;
  background: #fffaf2;
}

.cb-branding-preview-grid figcaption,
.cb-branding-admin-previews figcaption {
  margin-top: 10px;
  color: #6d5d53;
  font-size: .76rem;
  font-weight: 800;
  text-align: center;
}

.cb-branding-preview-grid [data-cb-logo-context="landing-hero"],
.cb-branding-admin-previews [data-cb-logo-context="landing-hero"] {
  margin: 0 !important;
  max-width: 100% !important;
}

.cb-branding-note textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 90px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #ccbbaa;
  border-radius: 13px;
  background: #fff;
  font: inherit;
}

.cb-branding-rights {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #c8d9c5;
  border-radius: 15px;
  background: #f5faf3;
}

.cb-branding-rights input {
  width: 21px;
  height: 21px;
  margin-top: 2px;
}

.cb-branding-primary,
.cb-branding-review-actions button,
.cb-branding-admin-tools button {
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid #9dbca0;
  border-radius: 999px;
  background: #fff;
  color: #19562f;
  font-weight: 900;
  cursor: pointer;
}

.cb-branding-primary {
  border-color: #19562f !important;
  background: #19562f !important;
  color: #fff !important;
}

.cb-branding-primary:disabled,
.cb-branding-review-actions button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.cb-branding-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}

.cb-branding-review-actions .is-danger {
  border-color: #d9a39d;
  color: #8d3028;
}

.cb-branding-form-feedback {
  min-height: 1.2em;
  color: #6c5c52;
  font-weight: 750;
}

.cb-branding-form-feedback.is-success,
[data-cb-normalize-feedback].is-success {
  color: #19562f;
}

.cb-branding-form-feedback.is-error,
[data-cb-normalize-feedback].is-error {
  color: #9c352d;
}

.cb-branding-review-note {
  padding: 12px 14px;
  border-left: 4px solid #bf7820;
  border-radius: 0 12px 12px 0;
  background: #fff4dc;
}

.cb-branding-rights-confirmed {
  color: #19562f;
  font-weight: 850;
}

@media (max-width: 760px) {
  .cb-branding-workspace-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cb-branding-workspace-header [data-cb-branding-close] {
    display: none;
  }

  .cb-branding-preview-grid,
  .cb-branding-admin-previews {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cb-branding-venue-card > header,
  .cb-branding-admin-card > header,
  .cb-branding-admin-tools {
    display: block;
  }

  .cb-branding-status {
    display: inline-flex;
    margin-top: 9px;
  }

  .cb-brand-frame[data-cb-logo-context="landing-hero"],
  [data-cb-logo-context="landing-hero"] {
    justify-self: start;
    margin: 12px 0 0 !important;
  }
}

@media (max-width: 480px) {
  .cb-branding-preview-grid,
  .cb-branding-admin-previews {
    grid-template-columns: 1fr 1fr;
  }

  .cb-branding-workspace-scroll {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cb-branding-venue-card,
  .cb-branding-admin-card,
  .cb-branding-beta-banner {
    padding: 16px;
    border-radius: 18px;
  }
}
