/* ============================================================
   Taubmans Brand Theme — v1
   Pixel-close clone of taubmans.com.au design language
   Loaded INSTEAD OF pe-theme.css when setting 'theme' = 'taubmans'
   ============================================================ */

/* ── Brand Variables ── */
:root {
  /* Taubmans palette */
  --tb-green-dark:   #0F3D2E;   /* header, footer, hero band */
  --tb-green-deep:   #0A2A20;   /* darker green for footer */
  --tb-teal:         #0E9384;   /* primary CTA, links */
  --tb-teal-hover:   #0B776A;
  --tb-teal-soft:    #DDF1EE;
  --tb-orange:       #E8753F;   /* arrows, accent CTAs */
  --tb-orange-hover: #D9622A;
  --tb-cream:        #F5F1EA;   /* warm tile backgrounds */
  --tb-stone:        #F4F4F2;   /* section backgrounds */
  --tb-line:         #E5E3DD;
  --tb-text:         #1A1A1A;
  --tb-text-muted:   #6B6B6B;
  --tb-white:        #ffffff;

  /* Override the existing accent system so legacy selectors get themed */
  --accent:         #0E9384;
  --accent-hover:   #0B776A;
  --accent-light:   #DDF1EE;
  --accent-soft:    rgba(14,147,132,0.08);
  --accent-medium:  rgba(14,147,132,0.16);

  /* Override warm bg variables that appear elsewhere */
  --pe-warm-white:  #F5F1EA;
  --pe-warm-bg:     #F4F4F2;
  --pe-stone:       #E5E3DD;
  --pe-text:        #1A1A1A;
  --pe-text-muted:  #6B6B6B;
  --pe-orange:      #E8753F;
  --pe-orange-light:#D9622A;
  --pe-blue:        #0E9384;
  --pe-dark:        #0F3D2E;
}

/* ============================================================
   GLOBAL TYPOGRAPHY
   ============================================================ */
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--tb-text);
}

/* Headings shift to a tighter weight, slight tracking */
h1, h2, h3, h4, h5, h6,
.header-title, .project-info h1 {
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.01em;
}

/* ============================================================
   HEADER — Dark green Taubmans bar
   ============================================================ */
.header {
  height: auto;
  min-height: 80px;
  background: var(--tb-green-dark) !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header::after,
.header::before {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Wordmark logo treatment */
.header-brand .logo {
  width: auto;
  height: 36px;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
}
.header-brand .brand-logo {
  width: auto;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* If still using PE PNG, force white */
}
.header-brand .logo-link {
  gap: 0;
  color: #fff;
}
.header-title {
  font-family: 'Oswald', 'DM Sans', sans-serif;
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff !important;
  letter-spacing: 0.01em;
  line-height: 1;
}
.header-subtitle {
  display: none !important; /* Taubmans header has no subtitle */
}

/* Top utility bar (DIY/Trade/Specifier) — added via header.php markup */
.tb-utility-bar {
  background: var(--tb-green-deep);
  height: 36px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}
.tb-utility-toggle {
  display: inline-flex;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}
.tb-utility-toggle a {
  padding: 6px 18px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}
.tb-utility-toggle a.active {
  background: #fff;
  color: var(--tb-green-dark);
  border-radius: 3px;
}
.tb-utility-toggle a:hover:not(.active) {
  color: #fff;
}

/* Primary nav links — Taubmans uppercase */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tb-mainnav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.tb-mainnav a,
.tb-mainnav .tb-navitem {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 28px 22px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.15s;
  background: transparent;
  border: none;
}
.tb-mainnav a:hover,
.tb-mainnav .tb-navitem:hover {
  color: var(--tb-teal-soft);
  background: transparent;
}
.tb-mainnav .tb-caret {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

/* Right side icons cluster (search, location, account, cart) */
.tb-iconrow {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tb-iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  position: relative;
}
.tb-iconbtn:hover {
  background: rgba(255,255,255,0.08);
}
.tb-iconbtn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.tb-iconbtn .tb-cartdot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  background: var(--tb-orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User avatar pill — restyled for dark header */
.user-btn {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 5px 12px 5px 5px !important;
}
.user-btn:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.5) !important;
}
.user-avatar {
  background: var(--tb-orange) !important;
  color: #fff !important;
}
.user-name {
  color: #fff !important;
  font-weight: 500;
}

/* Hide the legacy "Projects" / "Admin" PE nav-links inside the dark bar
   we'll re-render them in the user dropdown OR as Taubmans-style nav */
.header-nav > .nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 0;
  border: none;
}
.header-nav > .nav-link:hover {
  background: transparent !important;
  color: #fff !important;
}

/* Dropdown items (account menu) */
.dropdown-item {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  color: var(--tb-text);
}
.dropdown-item:hover {
  background: var(--tb-stone);
  color: var(--tb-teal);
}

/* ============================================================
   MOBILE NAV — Hamburger + slide-out drawer
   ============================================================ */
.tb-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.tb-hamburger svg { width: 24px; height: 24px; stroke: currentColor; }

.tb-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(86vw, 380px);
  height: 100vh;
  background: #fff;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: 8px 0 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}
.tb-drawer.open { transform: translateX(0); }
.tb-drawer-header {
  background: #2a2a2a;
  color: #fff;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tb-drawer-header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.tb-drawer-close {
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--tb-orange);
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.tb-drawer-list li {
  border-bottom: 1px solid var(--tb-line);
}
.tb-drawer-list li a,
.tb-drawer-list li .tb-drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tb-teal);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fff;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
}
.tb-drawer-list li a:hover {
  background: var(--tb-stone);
}
.tb-drawer-list .tb-arr {
  color: var(--tb-orange);
  font-size: 1.2rem;
}
.tb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.tb-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .tb-mainnav,
  .tb-utility-bar { display: none; }
  .tb-hamburger { display: inline-flex; }
  .header { padding: 0 16px; min-height: 64px; }
  .header-title { font-size: 1.4rem; }
  .header-brand .brand-logo,
  .header-brand .logo { height: 30px; }
  .tb-iconrow .tb-iconbtn-search,
  .tb-iconrow .tb-iconbtn-loc { display: none; }
}

/* ============================================================
   BUTTONS — Taubmans branded
   ============================================================ */
.btn,
.btn-primary,
.generate-btn,
.cta-btn-primary,
.tb-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 28px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  text-decoration: none;
  background: var(--tb-teal);
  color: #fff !important;
  box-shadow: none;
}
.btn-primary,
.generate-btn,
.cta-btn-primary,
.tb-btn-primary {
  background: var(--tb-teal) !important;
  color: #fff !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
.btn-primary::before,
.btn-primary::after,
.generate-btn::before,
.generate-btn::after {
  display: none !important;
  content: none !important;
}
.btn-primary:hover,
.generate-btn:hover,
.cta-btn-primary:hover,
.tb-btn-primary:hover {
  background: var(--tb-teal-hover) !important;
  transform: none !important;
  box-shadow: none !important;
}
.btn-primary:disabled,
.generate-btn:disabled {
  background: #B7DAD3 !important;
  cursor: not-allowed;
}

.btn-secondary,
.tb-btn-secondary {
  background: transparent !important;
  color: var(--tb-text) !important;
  border: 1.5px solid var(--tb-line) !important;
  border-radius: 4px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.btn-secondary:hover,
.tb-btn-secondary:hover {
  border-color: var(--tb-teal) !important;
  color: var(--tb-teal) !important;
  background: transparent !important;
}

/* "Find a Store" style — dark with white text */
.tb-btn-dark {
  background: var(--tb-text) !important;
  color: #fff !important;
  border-radius: 4px !important;
}
.tb-btn-dark:hover { background: #000 !important; }

/* Inline orange "→" link style (Taubmans signature) */
.tb-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tb-teal);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tb-link-arrow::after {
  content: '→';
  color: var(--tb-orange);
  font-size: 1.05rem;
  transition: transform 0.15s;
}
.tb-link-arrow:hover::after {
  transform: translateX(4px);
}

/* ============================================================
   CARDS — Taubmans flat, square, clean
   ============================================================ */
.card,
.project-card,
.image-card,
.tb-card {
  background: #fff;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden;
}
.card:hover,
.project-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06) !important;
  transform: none !important;
}

/* ============================================================
   DOME / ARCH TILES (signature Taubmans shape)
   ============================================================ */
.tb-dome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.tb-dome {
  position: relative;
  aspect-ratio: 1.05 / 1;
  background: var(--tb-cream);
  border-top-left-radius: 50% 60%;
  border-top-right-radius: 50% 60%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px;
  text-decoration: none;
  color: var(--tb-text);
  overflow: hidden;
  transition: transform 0.2s;
  cursor: pointer;
}
.tb-dome:hover {
  transform: translateY(-2px);
}
.tb-dome-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-top-left-radius: 50% 60%;
  border-top-right-radius: 50% 60%;
}
.tb-dome-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%);
  border-top-left-radius: 50% 60%;
  border-top-right-radius: 50% 60%;
}
.tb-dome-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: left;
  width: 100%;
}
.tb-dome-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px 0;
}
.tb-dome-arrow {
  color: var(--tb-orange);
  font-size: 1.3rem;
  line-height: 1;
}

/* Solid-colour dome variant (for colour family tiles) */
.tb-dome--swatch {
  background: var(--tb-cream);
}
.tb-dome--swatch .tb-dome-content {
  color: var(--tb-text);
}

/* ============================================================
   FORM FIELDS
   ============================================================ */
.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  font-family: 'DM Sans', sans-serif !important;
  border: 1.5px solid var(--tb-line) !important;
  border-radius: 4px !important;
  padding: 12px 14px !important;
  background: #fff !important;
  font-size: 0.9rem !important;
  color: var(--tb-text) !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}
.form-input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--tb-teal) !important;
  box-shadow: 0 0 0 3px rgba(14,147,132,0.12) !important;
  outline: none !important;
  background: #fff !important;
}
.form-label {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--tb-text) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin-bottom: 6px !important;
}

/* Auth submit button overrides */
.auth-form .btn-primary,
.auth-form button[type="submit"] {
  background: var(--tb-teal) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 14px 24px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  box-shadow: none !important;
}
.auth-form .btn-primary::before,
.auth-form button[type="submit"]::before {
  display: none !important;
  content: none !important;
}
.auth-form .btn-primary:hover,
.auth-form button[type="submit"]:hover {
  background: var(--tb-teal-hover) !important;
  transform: none !important;
}
.auth-footer a {
  color: var(--tb-teal) !important;
  font-weight: 600 !important;
}

/* ============================================================
   FOOTER — Dark green Taubmans
   ============================================================ */
.pe-footer {
  background: var(--tb-green-dark) !important;
  color: rgba(255,255,255,0.88);
  padding: 56px 0 28px;
  margin-top: 80px;
  border: none;
}
.pe-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
.pe-footer-brand {
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pe-footer-brand img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}
.pe-footer-brand-text {
  font-family: 'Oswald', 'DM Sans', sans-serif;
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.pe-footer-subtitle {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.pe-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
.pe-footer-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s;
}
.pe-footer-links a:hover {
  color: var(--tb-orange);
}
.pe-footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.tb-poweredby {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
}
.tb-poweredby a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.3);
}
.tb-poweredby a:hover { color: var(--tb-orange); border-color: var(--tb-orange); }

/* Full Taubmans-style footer (used by index.php landing) */
.tb-footer {
  background: var(--tb-green-dark);
  color: #fff;
  padding: 64px 0 24px;
}
.tb-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
.tb-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 40px;
  align-items: center;
}
.tb-footer-cta-text h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0;
}
.tb-footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}
.tb-footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.tb-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-footer-col li { margin-bottom: 10px; }
.tb-footer-col a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.tb-footer-col a:hover { color: var(--tb-orange); }
.tb-footer-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.tb-footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
}
.tb-footer-social {
  display: flex;
  gap: 12px;
}
.tb-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.15s;
}
.tb-footer-social a:hover { background: var(--tb-orange); }

@media (max-width: 900px) {
  .tb-footer-cols { grid-template-columns: repeat(2, 1fr); }
  .tb-footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tb-footer-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   PROJECT/DASHBOARD/EDITOR — neutralise PE styling
   ============================================================ */
.app { background: #fff; }
body { background: #fff; }
.sidebar { background: #fff; border-right: 1px solid var(--tb-line); }
.back-link { color: var(--tb-teal); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.add-btn {
  color: var(--tb-teal);
  background: transparent;
  border: 1.5px solid var(--tb-teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
}
.add-btn:hover {
  background: var(--tb-teal);
  color: #fff;
}
.panel-head { color: var(--tb-text-muted); }
.img-thumb-wrap.active .img-thumb { background: var(--tb-teal-soft); }
.img-thumb-wrap.active .img-thumb::before { background: var(--tb-teal); }

/* Lasso tool */
.lasso-toggle-btn {
  border-radius: 4px !important;
  border-color: var(--tb-line) !important;
}
.lasso-toggle-btn:hover {
  border-color: var(--tb-teal) !important;
  color: var(--tb-teal) !important;
  background: var(--tb-teal-soft) !important;
}
.lasso-toggle-btn.lasso-active {
  background: var(--tb-teal) !important;
  border-color: var(--tb-teal) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* Alerts */
.alert-error {
  background: #FDEDEC !important;
  color: #8B1A1A !important;
  border: 1px solid #F4C7C2 !important;
  border-radius: 4px !important;
}
.alert-success {
  background: var(--tb-teal-soft) !important;
  color: var(--tb-teal-hover) !important;
  border: 1px solid #B5E0D9 !important;
  border-radius: 4px !important;
}

/* Override the broken red-debug dropdown style from styles.css */
.user-dropdown.show {
  background: #fff !important;
  border: 1px solid var(--tb-line) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
  border-radius: 4px !important;
  padding: 6px 0 !important;
}

/* ============================================================
   COLOUR SWATCHES → TAUBMANS ARCHES
   Override every swatch class variant (used in project, editor,
   wizard, schemes, brochure, modals). Arch shape = flat bottom,
   half-circle top.
   ============================================================ */

/* Base arch shape — flat bottom, dome top */
.swatch,
.element-swatch,
.color-chip,
.preview-swatch,
.color-preview-swatch,
.swatch-picker,
.palette-grid .swatch,
.pewz-child-row .swatch,
.tb-arch-swatch {
  border-top-left-radius: 50% 65% !important;
  border-top-right-radius: 50% 65% !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

/* Arches need taller-than-wide aspect to look right */
.swatch,
.swatch-picker {
  width: 32px !important;
  height: 38px !important;
}
.element-swatch {
  width: 22px !important;
  height: 28px !important;
  min-width: 22px !important;
}
.color-chip {
  /* color-chip uses --chip-bg, has its own size set elsewhere — make sure background hooks up */
  background: var(--chip-bg, #e2e8f0) !important;
  width: 20px !important;
  height: 26px !important;
  min-width: 20px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}
.preview-swatch,
.color-preview-swatch {
  width: 32px !important;
  height: 40px !important;
}
.palette-grid .swatch {
  width: 22px !important;
  height: 28px !important;
}
.pewz-child-row .swatch {
  width: 14px !important;
  height: 18px !important;
}

/* Hover state — lift slightly */
.swatch:hover,
.element-swatch:hover,
.color-chip:hover,
.tb-arch-swatch:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12) !important;
  border-color: rgba(0,0,0,0.25) !important;
}

/* Selected state — teal outline below the arch */
.swatch.selected,
.element-swatch.selected,
.tb-arch-swatch.selected {
  outline: none !important;
  border-color: var(--tb-teal) !important;
  box-shadow: 0 0 0 2px var(--tb-teal-soft), 0 2px 6px rgba(14,147,132,0.25) !important;
}

/* Overridden state on element-swatch (custom colour set) — keep the indicator dot but reposition */
.element-swatch.overridden::after {
  content: '' !important;
  position: absolute !important;
  bottom: -3px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 6px !important;
  height: 6px !important;
  background: var(--tb-orange) !important;
  border: 1.5px solid #fff !important;
  border-radius: 50% !important;
  top: auto !important;
  right: auto !important;
}

/* Swatch-picker (dashed border for "add custom") variant — keep dashed but as arch */
.swatch-picker {
  border-style: dashed !important;
  border-color: rgba(15,23,42,.25) !important;
  background: #fff !important;
}
.swatch-picker.has-color {
  border-style: solid !important;
}

/* Bigger dome variant — used on landing page colour-family tiles */
.tb-arch-swatch--lg {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  border-radius: 50% 50% 0 0 / 60% 60% 0 0 !important;
}

/* Landing-page colour-family arch tile (full Taubmans dome card) */
.tb-color-arch-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  background: transparent;
  text-decoration: none;
  color: var(--tb-text);
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease;
}
.tb-color-arch-tile:hover { transform: translateY(-3px); }
.tb-color-arch-tile .tb-arch {
  width: 88px;
  height: 96px;
  flex-shrink: 0;
  border-top-left-radius: 50% 65%;
  border-top-right-radius: 50% 65%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.tb-color-arch-tile .tb-arch-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tb-text);
  letter-spacing: 0.01em;
}

/* Tighter mobile layout */
@media (max-width: 600px) {
  .tb-color-arch-tile .tb-arch { width: 60px; height: 68px; }
  .tb-color-arch-tile .tb-arch-label { font-size: 0.85rem; }
}

/* ============================================================
   v3: Real Taubmans arch shape (via clip-path)
   Overrides the CSS-pseudo-arches above with the actual SVG path
   ============================================================ */

/* The arch path normalised to viewBox 0 0 190 190:
   M0 95C0 42.533 42.533 0 95 0C147.467 0 190 42.533 190 95V190H0V95Z
   In CSS clip-path we express it as a path() with the same coords. */

.swatch,
.element-swatch,
.color-chip,
.preview-swatch,
.color-preview-swatch,
.swatch-picker,
.palette-grid .swatch,
.pewz-child-row .swatch,
.tb-arch-swatch,
.tb-color-arch-tile .tb-arch {
  /* Cancel the css-radius-only fallback */
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  /* Use the true Taubmans arch path */
  clip-path: path('M0 95C0 42.533 42.533 0 95 0C147.467 0 190 42.533 190 95V190H0V95Z');
  -webkit-clip-path: path('M0 95C0 42.533 42.533 0 95 0C147.467 0 190 42.533 190 95V190H0V95Z');
  /* clip-path coords are absolute pixels — we have to scale via background or wrapper.
     Since these elements are sized differently per context we use a CSS fallback:
     instead of path(), use the equivalent inset+radius which scales: */
  clip-path: inset(0 0 0 0 round 50% 50% 0 0 / 50% 50% 0 0);
  -webkit-clip-path: inset(0 0 0 0 round 50% 50% 0 0 / 50% 50% 0 0);
}

/* Hover/selected state — clip-path elements can't have border, so use box-shadow ring */
.swatch:hover,
.element-swatch:hover,
.color-chip:hover,
.tb-arch-swatch:hover {
  filter: brightness(1.05);
  transform: translateY(-1px) !important;
  box-shadow: none !important;
}
.swatch.selected,
.element-swatch.selected,
.tb-arch-swatch.selected {
  outline: 2px solid var(--tb-teal) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* element-swatch overridden indicator — small dot at bottom centre */
.element-swatch.overridden {
  position: relative;
}
.element-swatch.overridden::after {
  display: none !important; /* clip-path clips ::after too, so disable */
}

/* swatch-picker (custom-colour input): keep its dashed look via outer wrapper would be ideal,
   but since picker is its own element, give it a subtle teal background to indicate it's interactive */
.swatch-picker {
  background: linear-gradient(135deg, #f5f1ea 0%, #ddf1ee 100%) !important;
  position: relative;
}
.swatch-picker::before {
  content: '+';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--tb-teal);
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
  z-index: 1;
}

/* Aspect-ratio adjustments — arch needs height >= width, use 1:1.05 for typical contexts */
.swatch         { width: 32px !important; height: 32px !important; aspect-ratio: 1 / 1; }
.swatch-picker  { width: 32px !important; height: 32px !important; aspect-ratio: 1 / 1; }
.element-swatch { width: 24px !important; height: 24px !important; min-width: 24px !important; aspect-ratio: 1 / 1; }
.color-chip     { width: 22px !important; height: 22px !important; min-width: 22px !important; aspect-ratio: 1 / 1; display: inline-block !important; vertical-align: middle !important; background: var(--chip-bg, #e2e8f0) !important; }
.preview-swatch,
.color-preview-swatch { width: 36px !important; height: 36px !important; aspect-ratio: 1 / 1; }
.palette-grid .swatch { width: 24px !important; height: 24px !important; }
.pewz-child-row .swatch { width: 16px !important; height: 16px !important; }

/* Colour-family large arch tile on landing — the tb-arch element used inside .tb-color-arch-tile */
.tb-color-arch-tile .tb-arch {
  width: 88px !important;
  height: 92px !important;
  aspect-ratio: 1 / 1.05;
  clip-path: inset(0 0 0 0 round 50% 50% 0 0 / 50% 50% 0 0) !important;
  -webkit-clip-path: inset(0 0 0 0 round 50% 50% 0 0 / 50% 50% 0 0) !important;
}

/* tb-top-dome and inspire-dome (image-bg arches) — also use real arch */
.tbl-top-dome,
.tbl-top-dome::before {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
.tbl-top-dome {
  clip-path: inset(0 0 0 0 round 50% 50% 0 0 / 50% 50% 0 0);
  -webkit-clip-path: inset(0 0 0 0 round 50% 50% 0 0 / 50% 50% 0 0);
}

/* ============================================================
   v3: Wordmark logo via inline SVG — drop the Oswald CSS hack
   The header.php / footer.php / login.php / register.php now
   inline the actual Taubmans SVG. We just need to size it.
   ============================================================ */
.tb-wordmark {
  display: inline-block;
  height: 32px;
  width: auto;
  color: #fff;       /* SVG uses currentColor */
  vertical-align: middle;
}
.header .tb-wordmark { color: #fff; height: 30px; }
.tb-footer .tb-wordmark { color: #fff; height: 28px; }
.auth-card .tb-wordmark { color: var(--tb-green-dark); height: 32px; }

/* Hide the old Oswald-based fallbacks if any remain */
.header-title { font-size: 0; line-height: 0; }

/* Footer brand-row (above the copy line) */
.tb-footer-brand-row {
  padding: 24px 0 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 24px;
}
.tb-footer-brand-row .tb-wordmark {
  height: 28px;
  color: #fff;
}
