/* Google fonts import */

@import url('https://fonts.googleapis.com/css2?family=Momo+Trust+Display&family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* Global font and colour control */

:root {
  /* Fonts */
  --font-sans: 'Noto Sans', sans-serif;
  --font-heading: 'Momo Trust Display', sans-serif;

  /* Theme colors */
  --color-primary: hsl(30, 33%, 5%); /* Smoky Black */
  --color-accent: #ff6b6b;  /* accent / highlight */
  --color-bg: #f2f0ef;
  --footer-bg: #212121;
  --color-surface: #f8fafc;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --link-hover-color: #0c47a1;
  --link-color: #ffffff;

  /* Waveform colors (used by WaveSurfer) */
  --wave-fill: var(--color-text);
  --wave-progress: var(--color-primary);

  /* Layout */
  --max-content-width: 1400px;

  /* Base font size: fluid between 14px and 18px */
  --fs-base: clamp(0.875rem, 0.85rem + 0.3vw, 1.125rem); /* ~14px - 18px */
  --fs-scale-1: clamp(1.125rem, 1.05rem + 1.0vw, 1.5rem); /* h6 / small headings */
  --fs-scale-2: clamp(1.25rem, 1.15rem + 1.25vw, 1.75rem); /* h4 */
  --fs-scale-3: clamp(1.5rem, 1.35rem + 1.75vw, 2.25rem); /* h3 */
  --fs-scale-4: clamp(2rem, 1.9rem + 2.5vw, 3rem); /* h2 */
  --fs-scale-5: clamp(2.5rem, 2.3rem + 3vw, 4rem); /* h1 */

}


html {
  scroll-behavior: smooth;
}

/* Navbar styles */

.navbar {
  background-color: var(--color-bg);
  padding-right: 0.85rem;
  padding-left: 0.85rem;
  min-height: 7vh; /* Default height */
}

.navbar-brand {
  font-family: var(--font-heading);
  max-height: 100px;
  font-size: var(--fs-scale-3);
}

.navbar-nav {
  font-family: var(--font-sans);
  font-size: 1.25rem; /* ~20px, more responsive */
}

/* Body styles */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);

}

main {
  flex: 1;
}

h1, h3 {
  font-family: var(--font-heading);
  padding-bottom: 10px;
}

h2, h4, h5, h6 {
  font-family: var(--font-heading);
  padding-bottom: 10px;
  text-align: center;
}

html { font-size: var(--fs-base); }

h1 {
  font-size: var(--fs-scale-5);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h2 { font-size: var(--fs-scale-4); }
h3 { font-size: var(--fs-scale-3); }
h4 { font-size: var(--fs-scale-2); }
h5, h6 { font-size: var(--fs-scale-1); }

body .btn:hover {
  background-color: var(--color-accent);
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Ensure images and media can't force horizontal overflow */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Carousel styles -- see media queries for device height adjustments */

.hero-img {
  object-fit: cover;
  width: 100%;
  height: 50vh;
}

.hero-signup-img {
  height: 30vh;
  object-fit: cover;
  object-position: center;
  width: 100%;
  display: block;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-size: 2rem 2rem;
}

/* Discover -- Waveform and player styles */

#discover .mix-col .card .btn {
  max-height: 300px;
  /* background: url(images/cover-mix-discover.jpeg) no-repeat;*/
}

.waveform {
  display: block;
  width: 100%;
  height: 100%;
  align-items: center;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border-radius: 6px;
  overflow: hidden;
}

.playPause {
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: transform .12s ease, background-color .12s ease, color .12s ease;
  background: transparent;
  border: none;
  color: var(--color-text);
}

.playPause:active { 
  transform: scale(.98); 
}

.playPause.playing {
  background: var(--color-primary);
  color: #000;
}

.playPause.btn-sm { 
  min-width: 36px; height: 36px;
}

.wave-error {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Remove Bootstrap focus ring / halo for our circular play control */
.playPause:focus,
.playPause:active,
.playPause.playing:focus,
.playPause:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Controls container for play button + time */
.mix-controls { 
  gap: 0.6rem;
}

.mix-time {
  font-size: 0.9rem;
  color: var(--color-muted);
  min-width: 4.5rem;
}

/* Disabled button visual hint while WaveSurfer loads */
.playPause[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* When playing, invert the circular button to indicate active state */
.playPause.playing {
  background: var(--color-accent);
  color: #fff;
}

/* Card sizing: make cards a consistent height and allow card-body to sit at top */
.mix-col .card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.mix-col .card .card-body {
  flex: 0 0 auto;
}
.mix-col .card > .p-3 {
  /* waveform and button containers take the remaining space as needed */
  flex: 0 0 auto;
}

/* Reusable form card */

.form-card {
  background: var(--color-surface);
  border: 1px solid rgba(0,0,0,0.06);
  max-width: 520px;
  margin: 2.25rem auto;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.875rem; /* vertical spacing between direct children */
  box-sizing: border-box;
}

.form-card-title {
  padding-bottom: 0.25rem;
  margin: 0;
  text-align: center;
}

.form-card .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  text-align: left;
}

/* Add spacing below the audio upload field and buttons */
.upload-audio .form-group {
  margin-bottom: 1.5rem; /* Adds spacing below each form group */
}

/* Form controls inside .form-card: make them full width and evenly spaced */
.form-card input,
.form-card textarea,
.form-card select,
.form-card .form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #fff;
  color: var(--color-text);
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus,
.form-card .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255,107,107,0.12);
  border-color: rgba(255,107,107,0.35);
}

/* Actions (submit button) */
.form-card .form-actions {
  margin-top: 0.25rem;
}

.form-card .form-actions .btn,
.form-card button {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}

.form-actions {
  gap: 1rem; /* Add spacing between horizontally aligned buttons */
}

.form-group button {
  margin-top: 1rem; /* Add spacing above the delete button */
}

/* Small tweak for error message inside the card */
.form-card .error {
  color: var(--color-danger);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* If Bootstrap specificity still wins, increase specificity for the override */
/* (Removed .container #discover .mix-col .card as #discover .mix-col .card is sufficient) */

/* Upload audio custom styling */

.upload-audio {
  padding-top: 4px;
}

/* Upload audio - user only */

.upload-audio h2 {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Footer */

#footer {
  margin-top: 20px;
  background-color: var(--footer-bg);
  padding-top: 20px;
  padding-bottom: 20px;
  color: #ffffff; /* Stronger contrast for footer text */
}

#footer p {
  font-size: 1.2rem;
}



/* ----------------------------
   Standard breakpoint media queries
   XS: <576px, SM: 576-767.98px, MD: 768-991.98px,
   LG: 992-1199.98px, XL: >=1200px
   ---------------------------- */

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  /* XS styles */
  .navbar {
    min-height: 9vh;
  }
  .navbar-nav {
    font-size: 1rem; /* ~16px for better fit on small screens */
  }
  .waveform { 
    max-width: 50%;
    width: auto; 
  }
  .playPause { 
    min-width: 40px; height: 40px; 
  }
  #how-to h3,
  #how-to ul {
  text-align: center;
}
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* SM styles */

  #intro p {
    font-size: 1rem;
  }
  
  #how-to h3,
  #how-to p {
  text-align: center;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
  /* MD styles */

  .hero-img {
    max-height: 40vh;
  }

  #intro p {
    font-size: 1rem;
  }

  .mix-col .card { 
    min-height: 260px; 
  }
  #how-to h3,
  #how-to p {
  text-align: center;
}
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  
  .hero-img {
    max-height: 30vh;
  }

  #discover .row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: start;
  }

  #discover .card {
    height: 340px;
    box-sizing: border-box;
    width: auto;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* XL styles (optional tweaks for very large screens) */

  .hero-img {
    max-height: 30vh;
  }

  #discover .row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: start;
  }

  #discover .card {
    height: 340px;
    box-sizing: border-box;
    width: auto;
  }

}

