/* Spotify identity override - project logic untouched */

/* ------------------------------------------------------------------
   1. Base canvas: force every background to #292929 by default
   ------------------------------------------------------------------ */
html, body, #root, #app,
[class*="bg-"],
[class*="bg-black"],
[class*="bg-background"],
[class*="bg-[#000"],
[class*="bg-[#111"],
[class*="bg-[#161616"],
[class*="bg-[#1a1a1a"],
[class*="bg-[#222"],
[class*="bg-[#2a2a2a"],
section, .section, main, article, aside, header, footer, nav,
div, span, form, label, input, button, a, li, ul, ol, table, tr, td, th,
[role="dialog"], [role="alertdialog"], [role="banner"], [role="main"] {
  background-color: #292929 !important;
  background-image: none !important;
}

/* Replace logo link text with Spotify logo */
a[href="/"] {
  display: inline-flex !important;
  align-items: center !important;
  width: 132px !important;
  height: 40px !important;
  color: transparent !important;
  overflow: hidden !important;
  background-image: url(/assets/spotify-logo.svg) !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
}
a[href="/"] svg,
a[href="/"] img,
a[href="/"] span {
  display: none !important;
}

/* Keep images / video untouched */
img, svg, video, canvas, picture, figure, iframe, embed, object,
[class*="spotify-logo"], .logo {
  background-color: transparent !important;
  background-image: none !important;
}

/* ------------------------------------------------------------------
   2. Spotify theme variables (green primary, red destructive kept)
   ------------------------------------------------------------------ */
:root, html, html.dark, .dark {
  --background: 0 0% 16%;
  --foreground: 0 0% 98%;
  --card: 0 0% 16%;
  --card-foreground: 0 0% 98%;
  --popover: 0 0% 16%;
  --popover-foreground: 0 0% 98%;
  --primary: 140 75% 42%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 20%;
  --secondary-foreground: 0 0% 98%;
  --muted: 0 0% 20%;
  --muted-foreground: 0 0% 64%;
  --accent: 140 75% 42%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 0 0% 25%;
  --input: 0 0% 25%;
  --ring: 140 75% 42%;
  --radius: 0.5rem;
}

/* ------------------------------------------------------------------
   3. Logo replacement
   ------------------------------------------------------------------ */
.logo {
  display: inline-block;
  width: 120px;
  height: 40px;
  color: transparent !important;
  fill: transparent !important;
  background-image: url(/assets/spotify-logo.svg) !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
}
.logo svg { display: none !important; }

/* ------------------------------------------------------------------
   4. Primary buttons: green normal + green hover
   ------------------------------------------------------------------ */
button:not([data-variant="destructive"]):not(.destructive):not([class*="destructive"]),
[role="button"]:not([data-variant="destructive"]):not(.destructive):not([class*="destructive"]),
.btn:not([data-variant="destructive"]):not(.destructive):not([class*="destructive"]),
[class*="bg-primary"],
[class*="hover:bg-primary"],
[class*="bg-[hsl(var(--primary))]"] {
  background-color: #1DB954 !important;
  color: #ffffff !important;
  border-color: #1DB954 !important;
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

button:not([data-variant="destructive"]):not(.destructive):not([class*="destructive"]):hover,
[role="button"]:not([data-variant="destructive"]):not(.destructive):not([class*="destructive"]):hover,
.btn:not([data-variant="destructive"]):not(.destructive):not([class*="destructive"]):hover,
[class*="bg-primary"]:hover,
[class*="hover:bg-primary"]:hover,
[class*="hover:bg-red-"]:hover,
[class*="hover:bg-red-600"]:hover,
[class*="hover:bg-[rgb(210,13,22)]"]:hover,
[class*="hover:bg-[#e91429]"]:hover,
[class*="hover:bg-[#e50914]"]:hover,
[class*="hover:bg-[#ff0000]"]:hover {
  background-color: #1DB954 !important;
  border-color: #1DB954 !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

/* ------------------------------------------------------------------
   5. Destructive buttons: keep red
   ------------------------------------------------------------------ */
button[data-variant="destructive"],
button.destructive,
button[class*="destructive"],
[role="button"][data-variant="destructive"],
[role="button"].destructive,
[role="button"][class*="destructive"],
.btn[data-variant="destructive"],
.btn.destructive,
.btn[class*="destructive"],
[class*="bg-destructive"],
[class*="hover:bg-destructive"] {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

button[data-variant="destructive"]:hover,
button.destructive:hover,
button[class*="destructive"]:hover,
[role="button"][data-variant="destructive"]:hover,
[role="button"].destructive:hover,
[role="button"][class*="destructive"]:hover,
.btn[data-variant="destructive"]:hover,
.btn.destructive:hover,
.btn[class*="destructive"]:hover,
[class*="bg-destructive"]:hover,
[class*="hover:bg-destructive"]:hover {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
}

/* ------------------------------------------------------------------
   6. Text / foreground overrides
   ------------------------------------------------------------------ */
body, #root, html {
  color: #ffffff !important;
}

[class*="text-red-"],
[class*="text-[#e91429]"],
[class*="text-[#e50914]"] {
  color: #1DB954 !important;
}

/* ------------------------------------------------------------------
   7. Inputs / borders
   ------------------------------------------------------------------ */
input, select, textarea,
[class*="border-"],
[class*="border-input"] {
  background-color: #292929 !important;
  border-color: #404040 !important;
  color: #ffffff !important;
}

input:focus, select:focus, textarea:focus {
  outline-color: #1DB954 !important;
  border-color: #1DB954 !important;
  box-shadow: 0 0 0 1px #1DB954 !important;
}

/* ------------------------------------------------------------------
   8. Disabled buttons must remain interactive after JS patch
   ------------------------------------------------------------------ */
button:disabled,
[role="button"][aria-disabled="true"] {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}
