/* projects/lyrics-search/style/lyrics-style.css */

/* Better viewport handling everywhere */
:root {
  --vh: 100svh;           /* modern safe viewport */
}
@supports not (height: 100svh) {
  :root { --vh: 100vh; }  /* fallback */
}
/* Whole page layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background-color: #121212; /* Or whatever dark background you're using */
  color: #fff;
  font-family: 'Inter', sans-serif;
}

/* Content wrapper (everything but footer) */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.container {
  max-width: 800px;
  margin: auto;
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ff79c6;
}

.search-box {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.search-box input {
  padding: 0.5rem;
  font-size: 1rem;
  background: #1e1e1e;
  border: 1px solid #444;
  color: #fff;
  border-radius: 4px;
}

.search-box button {
  padding: 0.5rem 1rem;
  background-color: #ff79c6;
  border: none;
  color: #000;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background-color: #ffb3da;
}

.controls {
  text-align: center;
  margin-bottom: 1rem;
}

/* Parent label styling */
.controls label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
}

/* Hide default checkbox appearance */
.controls input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #111;
  margin-right: 0.5em;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid #ff69b4; /* hot pink border */
  border-radius: 4px;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

/* Custom checkmark (pink square fill) */
.controls input[type="checkbox"]::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  transform: scale(0);
  transition: transform 0.2s ease-in-out;
  box-shadow: inset 1em 1em #ff69b4;
  border-radius: 2px;
}

/* Show checkmark when checked */
.controls input[type="checkbox"]:checked::before {
  transform: scale(1);
}

/* Hover glow */
.controls input[type="checkbox"]:hover {
  box-shadow: 0 0 5px #ff69b4aa;
}


#result-heading {
  text-align: center;
  margin: 1.5rem auto;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent-color, #ff66b2); /* use your theme accent if set */
}


.lyrics-box {
  background-color: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  white-space: pre-wrap;
  max-height: 70vh;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 0 10px #000;
}

.footer {
  margin-top: 2rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  border-top: 1px solid #333;
  max-height: 100px;  
}

.footer a {
  color: #ff79c6;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

::selection {
  background-color: #ff4fc0; /* or whatever shade you're using */
  color: #ffffff;
}

::-moz-selection {
  background-color: #ff4fc0;
  color: #ffffff;
}

/* Webkit scrollbar styles (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e; /* or your site's dark background */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 10px;
  border: 2px solid #1e1e1e;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #ff4fc0; /* matching highlight pink on hover */
}

/* Firefox scrollbar dark mode (limited support) */
html {
  scrollbar-color: #444 #1e1e1e;
  scrollbar-width: thin;
}

.tip-fab-container {
  position: fixed;
  left: 1rem;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space between buttons */
  z-index: 1000;
}

.tip-fab {
  position: relative; /* for tooltip positioning */
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  border: 1px solid #ff7ac6;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0.7;
  transition: opacity .12s ease, transform .12s ease, box-shadow .12s ease;
  background: rgba(20,20,20,.6);
  backdrop-filter: saturate(120%) blur(6px);
  overflow: visible;
}

.tip-fab:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 2px 10px rgba(255,122,198,.35) }

.tip-fab:focus-visible { outline: 2px solid #ff7ac6; outline-offset: 2px }

/* Tooltip label */
.tip-fab::after {
  content: attr(data-label);           /* default; overridden below for clarity */
  position: absolute;
  left: calc(100% + 8px);              /* to the right of the dot */
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: rgba(20,20,20,.9);
  color: #ff7ac6;
  padding: .25rem .5rem;
  border-radius: 6px;
  font-size: .8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  border: 1px solid rgba(255,122,198,.35);
}

.tip-fab:hover::after { 
  opacity: 1; 
  transform: translateY(-50%) translateX(0);
}

/* Specific labels */
.tip-fab.coffee::after { content: "Buy me a coffee" }
.tip-fab.paypal::after { content: "Tip via PayPal" }

@media (max-width: 600px) {
  body {
    padding: 0.5rem; /* keep edges from touching */
  }

  .container {
    max-width: 100%;   /* fill mobile width */
    padding: 0 0.5rem; /* breathing room */
  }

  .lyrics-box {
    max-height: none;  /* let it grow with the page */
    font-size: 1rem;   /* easier to read on small screens */
  }

  /* Optional: stack search box vertically */
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box input,
  .search-box button {
    width: 100%;
  }

  /* FAB clean positioning */
  .tip-fab-container {
    left: 0.75rem;
    top: 3rem;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 900px) and (orientation: landscape) {
  body {
    padding: 0.5rem;
  }

  .container {
    max-width: 100%;
    padding: 0 1rem;
    display: flex;
    flex-direction: row; /* side-by-side layout */
    gap: 1rem;
  }

  /* Put search and lyrics side-by-side if you want */
  .search-box {
    flex-direction: column; /* still keep inputs stacked */
    min-width: 200px;
  }

  .lyrics-box {
    max-height: 80vh; /* give more height than portrait */
    flex: 1;          /* take up remaining width */
  }

  .tip-fab-container {
    left: auto;
    right: 0.75rem;
    bottom: 0.75rem;
  }
}

/* Landscape: keep a single column like portrait */
@media (max-width: 900px) and (orientation: landscape) {
  /* small safe padding; no fancy layout */
  body { padding: 0.5rem; }

  .container {
    max-width: 900px;       /* a bit wider is fine in landscape */
    padding: 0 1rem;
    display: block;         /* undo the row flex */
  }

  /* Title tight so content starts higher */
  h1 { margin: 0 0 .75rem; }

  /* Keep form stacked and full width */
  .search-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: .75rem;
  }
  .search-box input,
  .search-box button { width: 100%; }

  .controls { margin: 0 0 .5rem; }

  #result-heading { margin: .5rem 0; }

  /* Let lyrics grow naturally; avoid inner scroll traps */
  .lyrics-box {
    max-height: none;
    height: auto;
    overflow: visible;
  }

  /* FAB: bottom-right */
  .tip-fab-container {
    left: 0.75rem;
    top: 0.75rem;
  }
}
