/* ═══════════════════════════════════════════════════════════
   SongShift AI — Design System v2.0
   Dark SaaS theme · Reusable utility classes
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS (extend theme root) ─── */
:root {
  --ds-input-bg:       rgba(255,255,255,.04);
  --ds-input-bg-focus: rgba(255,255,255,.07);
  --ds-input-border:   rgba(0,212,255,.12);
  --ds-input-focus:    #00d4ff;
  --ds-input-text:     #f0f4ff;
  --ds-input-placeholder: #5a7090;
  --ds-input-radius:   10px;
  --ds-input-padding:  14px 18px;
  --ds-card-bg:        #111827;
  --ds-card-border:    rgba(0,212,255,.11);
  --ds-card-radius:    16px;
  --ds-card-shadow:    0 4px 32px rgba(0,0,0,.45);
  --ds-notice-radius:  12px;
  --ds-transition:     0.2s ease;
}

/* ═══════════════════════════════════════════
   FORM ELEMENTS — GLOBAL
   Targets all inputs, textareas, selects
═══════════════════════════════════════════ */

/* Base input styles for all forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
textarea,
select,
.ds-input {
  width: 100%;
  padding: var(--ds-input-padding);
  background: var(--ds-input-bg);
  border: 1.5px solid var(--ds-input-border);
  border-radius: var(--ds-input-radius);
  color: var(--ds-input-text);
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--ds-transition), box-shadow var(--ds-transition), background var(--ds-transition);
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus,
.ds-input:focus {
  border-color: var(--ds-input-focus);
  box-shadow: 0 0 0 3px rgba(0,212,255,.12), 0 0 20px rgba(0,212,255,.06);
  background: var(--ds-input-bg-focus);
}

input::placeholder,
textarea::placeholder {
  color: var(--ds-input-placeholder);
  opacity: 1;
}

/* Select dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7090' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

select option {
  background: #111827;
  color: #f0f4ff;
}

/* Textarea */
textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.65;
}

/* Labels */
label,
.ds-label {
  display: block;
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #8da4c4;
  margin-bottom: 8px;
}

/* Form groups */
.form-field,
.ds-field {
  margin-bottom: 22px;
}

.form-field label,
.ds-field label {
  display: block;
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #8da4c4;
  margin-bottom: 8px;
}

/* Checkbox styling */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  background: var(--ds-input-bg);
  border: 1.5px solid var(--ds-input-border);
  border-radius: 5px;
  cursor: pointer;
  accent-color: #00d4ff;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #0077ff, #00d4ff);
  border-color: #00d4ff;
}

/* ═══════════════════════════════════════════
   BUTTONS — DESIGN SYSTEM
═══════════════════════════════════════════ */

.ds-btn,
.btn,
button[type="submit"],
input[type="submit"],
.woocommerce .button,
.woocommerce-Button,
.woocommerce button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 15px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
  line-height: 1;
  padding: 14px 32px;
  color: #fff;
}

.ds-btn--primary,
.btn-primary,
button[type="submit"],
input[type="submit"],
.woocommerce .button.alt,
.woocommerce .button.checkout,
.woocommerce button.button.alt {
  background: linear-gradient(135deg, #00d4ff 0%, #0077ff 55%, #0044cc 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0,119,255,.42);
}

.ds-btn--primary:hover,
.btn-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0,119,255,.55);
  color: #fff;
}

.ds-btn--secondary,
.btn-secondary,
.woocommerce .button:not(.alt):not(.checkout) {
  background: transparent;
  color: #00d4ff;
  border: 1.5px solid rgba(0,212,255,.5);
}

.ds-btn--secondary:hover,
.btn-secondary:hover,
.woocommerce .button:not(.alt):not(.checkout):hover {
  background: rgba(0,212,255,.07);
  border-color: #00d4ff;
  color: #fff;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   CARDS — REUSABLE
═══════════════════════════════════════════ */

.ds-card {
  background: var(--ds-card-bg);
  border: 1px solid var(--ds-card-border);
  border-radius: var(--ds-card-radius);
  padding: 36px 32px;
  box-shadow: var(--ds-card-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.ds-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

/* ═══════════════════════════════════════════
   NOTICES — REUSABLE
═══════════════════════════════════════════ */

.ds-notice {
  border-radius: var(--ds-notice-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.ds-notice--success {
  background: rgba(0,229,160,.08);
  border: 1px solid rgba(0,229,160,.25);
  color: #4ade80;
}

.ds-notice--error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
}

.ds-notice--info {
  background: rgba(0,119,255,.08);
  border: 1px solid rgba(0,119,255,.2);
  color: #60a5fa;
}

.ds-notice--warning {
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.2);
  color: #fbbf24;
}

/* ═══════════════════════════════════════════
   EMPTY STATES
═══════════════════════════════════════════ */

.ds-empty-state {
  text-align: center;
  padding: 56px 32px;
  border-radius: var(--ds-card-radius);
  background: rgba(255,255,255,.02);
  border: 1px dashed rgba(0,212,255,.15);
}

.ds-empty-state__icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.7;
}

.ds-empty-state__title {
  font-family: var(--font-head, 'Outfit', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: #f0f4ff;
  margin-bottom: 8px;
}

.ds-empty-state__text {
  font-size: 15px;
  color: #5a7090;
  margin-bottom: 24px;
  max-width: 360px;
  margin-inline: auto;
}

.ds-empty-state .btn,
.ds-empty-state .ds-btn {
  margin-top: 8px;
}

/* ═══════════════════════════════════════════
   CONTAINERS
═══════════════════════════════════════════ */

.ds-container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

.ds-container--sm {
  max-width: 600px;
}

.ds-container--md {
  max-width: 760px;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
═══════════════════════════════════════════ */

@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px; /* Prevent iOS zoom */
    padding: 14px 16px;
  }

  .ds-card {
    padding: 24px 20px;
    border-radius: 14px;
  }

  .ds-empty-state {
    padding: 40px 20px;
  }

  button[type="submit"],
  input[type="submit"],
  .btn,
  .ds-btn {
    padding: 14px 28px;
    font-size: 15px;
    min-height: 48px; /* Tap target */
  }
}

/* ── Customer Songs / Audio Player ─────────────────────────────────────── */
.ss-customer-songs-grid { }

.ss-song-player {
    margin-top: 16px;
    border-top: 1px solid rgba(0,212,255,.12);
    padding-top: 14px;
}

.ss-song-player .wp-audio-shortcode,
.ss-song-player audio {
    width: 100% !important;
    border-radius: var(--radius-md);
    background: var(--bg-deep, #090e1a);
    outline: none;
    display: block;
}

.testi-av-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cyan, #00d4ff);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   SONGSHIFT GLOBAL UI FIXES
   Loaded last (design-system.css, priority 20) so these win
   the cascade without needing !important on most rules.
   ══════════════════════════════════════════════════════════════ */

/* ── 1. FIXED HEADER HEIGHT — single source of truth ──────────
   style.css has two conflicting values (70px line 135, 64px line 501).
   We set the definitive value here where it wins. */
#site-header .header-inner,
.header-inner {
    height: 64px !important;
}

/* ── 2. CUSTOM LOGO SIZING ─────────────────────────────────────
   WordPress outputs: .site-logo > a.custom-logo-link > img.custom-logo
   Without constraints the img renders at natural size (can be 200–600px+).
   We lock the entire logo slot to 60px tall. */

/* The outer link wrapping the logo area */
#site-header .site-logo,
.site-logo {
    max-height: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* The WP-generated anchor tag wrapping the img */
#site-header .custom-logo-link,
.custom-logo-link {
    display: flex !important;
    align-items: center;
    max-height: 60px;
    overflow: hidden;
    line-height: 0;
}

/* The img itself — use height (not just max-height) so it works
   regardless of natural dimensions */
#site-header img.custom-logo,
#site-header .custom-logo-link img,
#site-header .site-logo img,
img.custom-logo,
.custom-logo-link img {
    height: 60px !important;
    max-height: 60px !important;
    width: auto !important;
    max-width: none !important;   /* override the global img{max-width:100%} reset */
    display: block !important;
    object-fit: contain;
}

/* ── 3. HEADER OFFSET — push page content below fixed header ───
   The header is 64px tall. #main-content gets that as padding-top.
   The hero cancels it with a negative margin since it self-pads. */
#main-content {
    padding-top: 64px !important;
}

/* Hero fills viewport — cancel the #main-content offset so hero
   still starts right below the header with its own 110px padding. */
#main-content > .hero:first-child {
    margin-top: -64px !important;
}

/* ── 4. ADMIN BAR — shift header down when WP toolbar is visible ─ */
.admin-bar #site-header {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar #site-header {
        top: 46px !important;
    }
    /* Admin bar is 46px tall on mobile, add that to content offset */
    .admin-bar #main-content {
        padding-top: 110px !important;  /* 64px header + 46px admin bar */
    }
}

/* ── 5. SELECT DROPDOWNS — dark theme visibility ───────────────
   Global rule covers all selects site-wide */
select {
    color: #ffffff !important;
}
select option {
    color: #ffffff !important;
    background-color: #101827 !important;
}
select option:checked {
    background-color: #8fb0d4 !important;
    color: #000000 !important;
}

/* ── 6. SIMPLE-PAGE LAYOUT (404, contact, account, index fallback) ─
   These pages use .simple-page wrapper. Needs top padding to clear
   the 64px fixed header. Defined here since style.css no longer owns it. */
.simple-page {
    min-height: 100vh;
    padding: 112px 0 80px;   /* 64px header + 48px breathing room */
    background: var(--bg-deep, #07090f);
}
.simple-page__content {
    max-width: 800px;
    margin-inline: auto;
    padding-inline: 24px;
}
@media (max-width: 640px) {
    .simple-page { padding-top: 96px; }
}
