/* Whimsy Wheels brand theme – black, white, bright pink/magenta accent (logo) */
/* Same structure as a2ent-theme.css; overrides Tailwind slate/emerald/sky */

:root {
  --whimsy-bg: #0d0d0d;
  --whimsy-bg-elevated: #141414;
  --whimsy-card: #161616;
  --whimsy-card-hover: #1a1a1a;
  --whimsy-border: #2a2a2a;
  --whimsy-border-light: #333333;
  --whimsy-accent: #e91e8c;
  --whimsy-accent-hover: #f472b6;
  --whimsy-text: #f0f0f0;
  --whimsy-text-secondary: #e8e8e8;
  --whimsy-text-muted: #d0d0d0;
  --whimsy-text-dim: #a0a0a0;
}

html,
body {
  background-color: var(--whimsy-bg) !important;
}
body main,
main.flex-1 {
  background: var(--whimsy-bg) !important;
  background-image: none !important;
}
aside.w-64 {
  background-color: var(--whimsy-bg) !important;
}

/* Backgrounds */
.bg-slate-950 { background-color: var(--whimsy-bg) !important; }
.bg-slate-900 { background-color: var(--whimsy-card) !important; }
.bg-slate-900\/50 { background-color: rgba(22, 22, 22, 0.6) !important; }
.bg-slate-900\/70 { background-color: rgba(22, 22, 22, 0.75) !important; }
.bg-slate-900\/30 { background-color: rgba(22, 22, 22, 0.4) !important; }
.bg-slate-900\/95 { background-color: rgba(13, 13, 13, 0.95) !important; }
.bg-slate-800 { background-color: var(--whimsy-card-hover) !important; }
.bg-slate-800\/50 { background-color: rgba(26, 26, 26, 0.5) !important; }
.bg-slate-800\/80 { background-color: rgba(26, 26, 26, 0.8) !important; }
.bg-slate-800\/30 { background-color: rgba(26, 26, 26, 0.3) !important; }
.bg-slate-800\/40 { background-color: rgba(26, 26, 26, 0.4) !important; }
.bg-slate-800\/50 { background-color: rgba(26, 26, 26, 0.5) !important; }
.bg-slate-700 { background-color: #252525 !important; }

.from-slate-950 { --tw-gradient-from: var(--whimsy-bg); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-slate-900 { --tw-gradient-to: var(--whimsy-bg); }

/* Borders */
.border-slate-800 { border-color: var(--whimsy-border) !important; }
.border-slate-700 { border-color: var(--whimsy-border-light) !important; }
.border-slate-600 { border-color: #404040 !important; }

/* Text */
.text-slate-50 { color: var(--whimsy-text) !important; }
.text-slate-100 { color: var(--whimsy-text-secondary) !important; }
.text-slate-200 { color: #e0e0e0 !important; }
.text-slate-300 { color: #c0c0c0 !important; }
.text-slate-400 { color: var(--whimsy-text-muted) !important; }
.text-slate-500 { color: var(--whimsy-text-dim) !important; }

/* Accent – pink/magenta (buttons, links) */
.text-sky-400 { color: var(--whimsy-accent) !important; }
.hover\:text-sky-300:hover { color: var(--whimsy-accent-hover) !important; }
.bg-emerald-600 { background-color: var(--whimsy-accent) !important; }
.hover\:bg-emerald-500:hover { background-color: var(--whimsy-accent-hover) !important; }
.focus\:ring-emerald-500:focus { --tw-ring-color: var(--whimsy-accent) !important; }
.focus\:ring-sky-500\/50:focus { --tw-ring-color: rgba(233, 30, 140, 0.5) !important; }
.ring-emerald-500\/40 { --tw-ring-color: rgba(233, 30, 140, 0.4) !important; }
.bg-emerald-500\/15 { background-color: rgba(233, 30, 140, 0.15) !important; }
.bg-emerald-500\/10 { background-color: rgba(233, 30, 140, 0.1) !important; }
.bg-emerald-500\/20 { background-color: rgba(233, 30, 140, 0.2) !important; }
.text-emerald-300 { color: #f9a8d4 !important; }
.text-emerald-400 { color: var(--whimsy-accent-hover) !important; }
.bg-emerald-600\/80 { background-color: rgba(233, 30, 140, 0.9) !important; }
.hover\:bg-emerald-500:hover { background-color: var(--whimsy-accent-hover) !important; }

.bg-slate-50\/10 { background-color: rgba(233, 30, 140, 0.12) !important; }
.bg-slate-50\/5 { background-color: rgba(255, 255, 255, 0.06) !important; }

.focus\:ring-offset-slate-950:focus { --tw-ring-offset-color: var(--whimsy-bg) !important; }
.focus\:ring-offset-slate-900:focus { --tw-ring-offset-color: var(--whimsy-card) !important; }

.focus\:ring-sky-500:focus { --tw-ring-color: var(--whimsy-accent) !important; }
.focus\:border-sky-500\/50:focus { border-color: rgba(233, 30, 140, 0.5) !important; }
.border-sky-500\/50 { border-color: rgba(233, 30, 140, 0.5) !important; }
.bg-sky-500\/10 { background-color: rgba(233, 30, 140, 0.1) !important; }
.bg-sky-500\/20 { background-color: rgba(233, 30, 140, 0.2) !important; }

/* Mobile & tablet */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  body .mobile-nav-fab { left: calc(1rem + env(safe-area-inset-left)); }
}

nav a, aside a, button:not([type="submit"]):not(.po-remove-line), .rounded-lg a, .rounded-xl a {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
nav a { justify-content: flex-start; min-width: 0; }
aside form button { justify-content: flex-start; width: 100%; }

main.p-8, main .p-8 { padding: 1rem !important; }
@media (min-width: 640px) { main.p-8, main .p-8 { padding: 1.5rem !important; } }
@media (min-width: 1024px) { main.p-8, main .p-8 { padding: 2rem !important; } }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 640px; width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table-wrap thead { background: rgba(30, 30, 30, 0.5); border-bottom: 1px solid var(--whimsy-border); }
.table-wrap th {
  padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--whimsy-text-dim); white-space: nowrap;
}
.table-wrap th:last-child, .table-wrap td:last-child { text-align: right; white-space: nowrap; }
.table-wrap tbody tr { border-bottom: 1px solid var(--whimsy-border); transition: background-color 0.15s ease; }
.table-wrap tbody tr:hover { background: rgba(233, 30, 140, 0.08); }
.table-wrap tbody tr:last-child { border-bottom: none; }
.table-wrap td { padding: 0.75rem 1rem; vertical-align: middle; color: var(--whimsy-text-secondary); }
.table-wrap td:last-child { padding-left: 1.5rem; }
.table-wrap a[href]:not(.rounded-lg):not(.rounded-xl) { color: var(--whimsy-accent); text-decoration: none; }
.table-wrap a[href]:not(.rounded-lg):not(.rounded-xl):hover { color: var(--whimsy-accent-hover); }
.table-wrap td:last-child > div.flex { justify-content: flex-end; gap: 0.5rem; flex-wrap: nowrap; }
.table-wrap td:last-child .rounded-lg, .table-wrap td:last-child button.rounded-lg { flex-shrink: 0; }

img[alt="Product"], .object-cover { max-width: 100%; height: auto; }

@media (max-width: 1023px) {
  aside.w-64 {
    position: fixed !important; left: 0; top: 0; bottom: 0; z-index: 50;
    width: 16rem !important; max-width: 85vw; transform: translateX(-100%);
    transition: transform 0.25s ease-out; box-shadow: none;
  }
  body.nav-open aside.w-64 { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.4); }
  #nav-overlay { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.5); -webkit-tap-highlight-color: transparent; }
  body.nav-open #nav-overlay { display: block; }
  main.flex-1, main[class*="flex-1"] { margin-left: 0 !important; }
  .mobile-nav-fab {
    display: flex !important; position: fixed; top: 1rem; left: 1rem; z-index: 45;
    width: 48px; height: 48px; min-width: 48px; min-height: 48px; border-radius: 12px;
    background: var(--whimsy-card-hover); color: var(--whimsy-text); border: 1px solid var(--whimsy-border);
    cursor: pointer; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav-fab:hover { background: #2a2a2a; }
  .mobile-nav-fab:focus { outline: 2px solid var(--whimsy-accent); outline-offset: 2px; }
}
@media (min-width: 1024px) {
  .mobile-nav-fab { display: none !important; }
  #nav-overlay { display: none !important; }
}

.sticky { position: -webkit-sticky; position: sticky; }
