/* ==========================================================
   GLOBAL SETTINGS
   ========================================================== */
:root {
  --bg-main: black;
  --bg-panel: #1e1e1e;
  --text-main: #b8b8b8;
  --accent: #505050;
  --accent-hover: #505050;
  --border: #333;
  --label-color: #ccc;
  --nav-bg: #505050;
  --green: #b8ffb8;
  --yellow: #ffec99;
  --blue: #a3c4ff;
  --disable: #806f6fd6;
  --green1: #228b22;
  --green2: #34bd42;
}

html {
  overflow-y: scroll;
}

body {
  background-color: transparent;
  color: var(--text-main);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  overflow: visible;
  scrollbar-width: 1px;
}

/* 2. Stile per Chrome, Safari, Edge (WebKit) */
body::-webkit-scrollbar {
  width: 1px; /* Larghezza esatta desiderata */
}

/* 3. Opzionale: Stile per il "thumb" (cursore) WebKit */
body::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3); /* Colore semi-trasparente */
  border-radius: 5px; /* Angoli arrotondati */
}

/* ==========================================================
   CONTAINER & SECTIONS
   ========================================================== */
.container {
  max-width: 90vw;
  margin: auto;
  background-color: var(--bg-panel);
  border-radius: 12px;
  padding: 20px 25px 2px 25px;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
}

.section-yellow { background-color: var(--yellow); color: #111; border-radius: 10px; padding: 14px; margin-top: 14px; display:none;}
.section-green  {background-color: var(--green);color: #111;border-radius: 10px;padding: 14px;/* margin-top: 14px; */}
.section-blue   { background-color: var(--blue);   color: #111; border-radius: 10px; padding: 14px; margin-top: 14px; }

/* ==========================================================
   NAV HEADER (Welcome + Prompt/Group/Sound)
   ========================================================== */
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 20px;
  background-color: var(--nav-bg);
  border-radius: 10px;
  min-height: 56px; /* uniforma l’altezza e centra tutto */
  margin: 0px !important;
}

.nav-header .welcome-text {
  font-weight: bold;
  color: #111;
  font-size: 15px;
}

.nav-header .nav-buttons {
  display: flex;
  gap: 10px;
}

/*
modifiche css ivan
*/

.nav-header .nav-buttons button {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  height: 36px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
}
.nav-header .nav-buttons button:hover {
  background: var(--accent-hover);
}

/* ==========================================================
   CONTROL BAR (Save, Audio, Reset, Project, Search)
   ========================================================== */
.control-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 20px 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-height: 116px;
}

.control-bar .buttons {
  display: flex;
  gap: 10px;
  height: 40px;
  width: -webkit-fill-available;
  /* border: 1px solid var(--border); */
  /* background-color: #2a2a2a; */
  /* color: var(--text-main); */
}

/* modificato da ivan 26/12/2025 */
.control-bar button {
  border: none !important;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: 0.2s;
  padding: 8px 14px;
  background-color: rgb(85 91 84);
  border-radius: 8px;
  color: var(--text-main);
}
#btn-save{
  background-color:#005a80;
  color:white;
}
#btn-save:hover{
  background-color:#053e56;
  color:white;
}
#btn-reset{
  background-color:#570303;
}
#btn-reset:hover{
  background-color:#311313;
}
#btn-generate, #project-list{
  background-color:greenyellow;
  color:black;
}
#btn-generate:hover, #project-list:hover{
  background-color:#6c9926;
  color:black;
}

#btn-generate:disabled{
  background-color:#3a4a21;
  color:black;
}
#btn-complete, #btn-project{
  background-color:yellow;
  color:black;
}
#btn-complete:hover, #btn-project:hover{
  background-color:#7d7d00;
  color:black;
}
#btn-generate-AVI{
  background-color:#2788a5;
  color:rgb(0, 0, 0);
}

.control-bar button:hover { color: white;background-color:transparent }
.track_nav button:hover { color: white;background-color:transparent }

.control-bar button:disabled {color: #000000d6;cursor:not-allowed}

/* modificato da ivan 26/12/2025 */
.control-bar select {
  width: 200px;
  background-color: rgb(114, 114, 114);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: 0.2s;
  margin:unset;
  height: 40px;
}
.control-bar select:hover { background-color: var(--accent-hover); }

.control-bar .search {
  margin-left: auto;
  flex-shrink: 0;
}

.control-bar .search input {
  height: 38px;
  min-width: 220px;
  max-width: 320px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: #2a2a2a;
  color: var(--text-main);
  font-size: 14px;
  padding: 8px 14px;
  box-sizing: border-box;
}

/* modificato da ivan 26/12/2025 */
.control-bar  .btn-complete{
  color: rgb(216, 222, 218);
  margin-left: auto;
  position: relative;
  min-width: 70px !important;
  height: 26px;
}
.track_nav  .btn-complete{
  color: #c1c7c3;
  font-size: 14px;
  /* font-weight:bold; */
  position:relative;
  min-width: 70px !important;
  height: 36px;
  
}

/* ==========================================================
   LABELS & INPUTS
   ========================================================== */
label,
.ai-label {
  font-family: system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--label-color);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

label {
  margin-top: 14px;
}

/* ── Riga artista: select lascia spazio quadrato all'icona chat ── */
#group {
  flex: 1;
  width: auto;
  min-width: 0;
}
#parlacon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-left: 6px;
  margin-bottom: 0;
  margin-top: 10px;
  background-color: #2a2a2a;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}
#parlacon:hover {
  border-color: var(--gold);
  background-color: #333;
}
#parlacon svg {
  width: 20px;
  height: 20px;
}

select, textarea, input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: 1px solid var(--border);
  background-color: #2a2a2a;
  color: var(--text-main);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
  overflow-y: auto;
  scrollbar-width: none;
}
textarea::-webkit-scrollbar { display: none; }

/* ==========================================================
   LYRICS / STYLE AFFIANCATI
   ========================================================== */
.lyrics-style-wrapper {
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
  align-items: stretch;
  gap: 12px;
  width: 24px;
  box-sizing: border-box;
  margin-top: 10px;
}

.lyrics-box{
  width: 100%;
  display: block;
  flex: 1;
  box-sizing: border-box;
}
.style-box {
  width: 50%;
  display: none;
  flex-direction: column;
  box-sizing: border-box;
}

.lyrics-box textarea,
.style-box textarea {
  flex: 1;
  width: 100%;
  min-height: 342px;
  border: 1px solid var(--border);
  padding: 8px;
  background: #2a2a2a;
  color: #eee;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 6px;
  box-sizing: border-box;
}
/* ==========================================================
   BUTTONS & INTERACTION
   ========================================================== */
button {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
}
button:hover { background: var(--accent-hover); }

/* ==========================================================
   TOAST
   ========================================================== */
#toast-container {
  all: unset;
  position: fixed !important;
  bottom: 50px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  z-index: 99999 !important;
  pointer-events: none !important;
}

.toast {
  padding: 10px 16px;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px);
  animation: toastIn 0.3s forwards, toastOut 0.3s ease forwards;
  animation-delay: 0s, var(--duration, 3s);
  text-align: center;

}

.toast.success { background: #1d7932; }
.toast.error   { background: #aa2936; }
.toast.warn    { background: #be7303; }


@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(10px); }
}


/* ==========================================================
   LOADER
   ========================================================== */
.loader {
  display: none;
  border: 2px solid #ff0000;
  border-top-color: #ff4d4d;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  margin-left: 33px;
  vertical-align: middle;
  animation: spin 1s linear infinite;
  position: absolute;
}
@keyframes spin { from {transform:rotate(0deg);} to {transform:rotate(360deg);} }

/* ==========================================================
   MENU CONTESTUALE – versione pulita per tema scuro
   ========================================================== */

/* Menu principale */
.context-menu {
  position: fixed;
  background: #333;
  color: #eee;
  border: 1px solid #555;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  width: 240px;
  display: none;
  z-index: 9999;
  font-size: 14px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.context-menu ul {
  list-style: none;
  padding: 6px 0;
  margin: 0;
}

.context-menu li {
  padding: 8px 15px;
  cursor: pointer;
  color: #eee;
  transition: background 0.2s;
}

.context-menu li:hover {
  background: #007bff;
  color: #fff;
}

/* Sottomenu lingue */
.lang-submenu {
  position: fixed;
  margin-left: 5px;
  background: #444;
  color: #eee;
  border: 1px solid #666;
  border-radius: 6px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  min-width: 150px;
  max-height: 60vh;
  padding: 5px 0;
  list-style: none;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10001; /* deve stare sopra al menu principale */
  transform: translate(20px,5px);
  display: none;
}

/* inserito il 25/10/2025 Ivan 
nuova impaginazione a 2 colonne */

.track_nav{
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: transparent;
  /* border-radius: 12px; */
  /* padding: 0px 16px; */
  margin: 0px auto;
  /* border: 1px solid #222; */
  /* max-width: 90vw; */
  width: 90vw;
  /* box-shadow: 0 0 10px #000; */
}
.track_nav button{
  min-height: 36px;
  /* width: 143px; */
  line-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  /* border: 1px solid #3a3a3a; */
  background: #2a2a2a;
  color: #ddd;
  text-decoration: none;
  transition: background .2s, transform .1s;
  margin: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
}
.btn-crediti{
  cursor: pointer;
}
.btn-crediti:hover{
  color:aqua
}

/* === CARD DEL BRANO === */
.track-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #151515;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 6px auto;
  border: 1px solid #222;
  max-width: 95%;
  box-shadow: 0 0 10px #000;
  min-width: 870px;
}

/* Cover a destra */
.track-cover {
  width: 88px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

/* Corpo a sinistra: titolo, wave-bg, waveform, pulsanti */
.track-body {
  flex: 1;
  min-width: 0px;
  position: relative;         /* contenitore per il canvas-background */
  overflow: hidden;
  border-radius: 8px;
  padding: 8px 10px;
}

/* Titolo brano */
.track-title {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  height: 1.6em;
  position: relative;
  z-index: 1;
}

/* Canvas wave — background assoluto SOLO dentro .track-body (non sulla cover) */
.eq-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  border-radius: 8px;
  background: transparent;
}
/* === Equalizzatore bande gialle — wrapper azzerato, canvas gestito come absolute === */
.eq {
  height: 0;
  overflow: visible;
  margin: 0;
  padding: 0;
}
.eq.playing { opacity: 1; }

.eq span,
.eq.playing span {
  display: none;
}

/* === STRUTTURA CONTROLLI === */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  width: unset;
  position: relative;
  z-index: 1;
}

/* === WAVEFORM SVG — sopra il canvas === */
.waveform {
  position: relative;
  z-index: 1;
}

/* === BOTTONI GENERICI === */
.controls button,
.controls a {
  min-height: 30px;        /* altezza ridotta */
  line-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #3a3a3a;
  background: #2a2a2a;
  color: #ddd;
  text-decoration: none;
  transition: background .2s, transform .1s;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* hover comune */
.controls button:hover,
.controls a:hover {
  background: #333;
  transform: scale(1.03);
}

/* === PULSANTI PLAYER (Stop / Play / Pause) === */
.controls .btn-stop {
    background: transparent;
    color: #fff;
    border: 2px solid #3a3a3a;
    width: 36px;
    height: 36px;
    padding: 0px;
    border-radius: 50%;
}
.controls .btn-play {
    background: transparent;
    color: #fff;
    border: 2px solid #3a3a3a;
    width: 36px;
    height: 36px;
    padding: 0px;
    border-radius: 50%;
}
.svgbtn{
  width:20px;
  height:20px;
  fill: #fff;
  pointer-events: none;
  stroke-width: 4px;
  stroke: currentColor;
}
.controls .btn-pause {
  background: transparent;
  color: #fff;
  border: 2px solid #3a3a3a;
  width: 36px;
  height: 36px;
  padding: 0px;
  border-radius: 50%;
}
.controls .btn-recicle {
  background: transparent;
  color: #fff;
  border: 2px solid #3a3a3a;
  width: 36px;
  height: 36px;
  padding: 0px;
  border-radius: 50%;
}
.btn-recicle svg{
  width: 25px;
  height: 25px;
}
.audiorange{
  width:200px;
  padding:0px;
  margin:0px;
  height: 3px;
  background-color: chartreuse;
}
/*   slide range */

input[type=range] {
  -webkit-appearance: none;
  margin: 0;
  /* width: 200px; */
  padding: 0;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
  background: #32e443;
}
input[type=range]::-webkit-slider-thumb {
  height: 8px;
  width: 3px;
  border-radius: 0px;
  background: #ffffff;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -3px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
  background: #367ebd;
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  height: 8px;
  width: 3px;
  border-radius: 0px;
  background: #ffffff;
  cursor: pointer;
}
input[type=range]::-ms-track {
  width: 100%;
  height: 3px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  border-width: 16px 0;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #2a6495;
}
input[type=range]::-ms-fill-upper {
  background: #3071a9;
}
input[type=range]::-ms-thumb {
  height: 8px;
  width: 3px;
  border-radius: 0px;
  background: #ffffff;
  cursor: pointer;
}
input[type=range]:focus::-ms-fill-lower {
  background: #3071a9;
}
input[type=range]:focus::-ms-fill-upper {
  background: #367ebd;
}

/* === BOTTONI EXPORT (MP3 / WAV / MP4 / STEM) === */
.controls button[class^="btn-export-"] {
  color: #fff;
  transition: background .2s, transform .1s;
  background: transparent;
  color: #fff;
  border: 2px solid #3a3a3a;
  width: 36px;
  height: 36px;
  padding: 0px;
  border-radius: 50%;
  font-size: x-large;
}
.controls .btn-share-mp3{
  color: #fff;
  transition: background .2s, transform .1s;
  background: transparent;
  color: #fff;
  border: 2px solid #3a3a3a;
  width: 36px;
  height: 36px;
  padding: 0px;
  border-radius: 50%;
  font-size: x-large;
}
/* colori distinti per tipo */
.controls .btn-export-mp3 {}   /* blu */
.controls .btn-export-wav { background: #16a085; }   /* verde acqua */
.controls .btn-export-mp4 { background: #c0392b; }   /* rosso */
.controls .btn-export-stem { background: #d35400; }  /* arancio */
.controls .btn-export-pub { background: #a09216; }   /* oro */
.controls .btn-export-doc { background: #9016a0; }   
/* hover (leggermente più chiaro) */
.controls .btn-export-mp3:hover { background: #3498db; }
.controls .btn-export-wav:hover { background: #1abc9c; }
.controls .btn-export-mp4:hover { background: #e74c3c; }
.controls .btn-export-stem:hover { background: #e67e22; }
.controls .btn-export-pub:hover { background: #9e9548; }
.controls .btn-export-doc:hover { background: #ab1abe;  }
.token{
  font-size: large;
  color: #1abc9c;
  font-weight: bold;
}

.toast-container-error{
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 30%;
  border: 11px solid #810d0d;
  background: transparent;
  color: black;
  text-align: center;
  padding: 20px;
  text-decoration: blink;
  font-weight: bold;
}
.pubblicato{
  background-color: #0b350b;
}
.invisibile{
  display: none !important;
}
.btn-export-pub.pubblicato{
  background-color: #aa601f;
  content:'Publisced';
}
/* stato disabilitato */
.controls button[class^="btn-export-"]:disabled {
  background: #555;
  color: #999;
  cursor: not-allowed;
  transform: none;
}

/* stato "in lavorazione" */
.controls button[class^="btn-export-"].exporting {
  background: #8e44ad;  /* viola */
}

/* stato completato */
.controls button[class^="btn-export-"].done {
  background: #2ecc71;  /* verde */
}

/* sezione avatar */
.avatar-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.avatar-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #222;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: 2px solid #444;
}

/* effetto al passaggio */
.avatar-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* evita icona immagine mancante */
.avatar-preview:not([src]), 
.avatar-preview[src=""], 
.avatar-preview[src="img/default_avatar.png"] {
  background-image: url('img/default_avatar.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  content: none;
}

/* in elaborazione a 4 sezioni lampeggianti*/
.circle-container {
  position: relative;
  width: 37px;
  height: 37px;
  /* margin: 7px 0 0 155px; */
  display: none;
  top: -28px;
  left: -7px;
}

/* Lampeggio rosso */
@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.3; }
}

.right-panel2{
  display:flex;
  width: 100%;
}
.right-panel3{
  display: flex;
  gap: 12px;
  width: 24px;
  margin-top: 10px;
  flex-direction: column;
}

.creator_avatar{
  width: 60px;
  height: 60px;
  background-size: cover;
  border: 2px solid gray;
  border-radius: 50%;
  margin: 0px;
  position: relative;
}
.construct{
  /* max-height: 77vh; */
  overflow: auto;
}
/* Per browser basati su WebKit (Chrome, Edge, Safari) */
.container::-webkit-scrollbar {
  width: 6px;              /* Larghezza verticale */
  height: 6px;             /* Altezza orizzontale (per scroll orizzontale) */
}

.container::-webkit-scrollbar-track {
  background: transparent; /* Colore dello sfondo del binario */
}

.container::-webkit-scrollbar-thumb {
  background-color: #444;  /* Colore della barra */
  border-radius: 3px;
}

/* Su Firefox (supporto limitato ma possibile dal 2021) */
.container {
             /* Riduce la larghezza */
  overflow: hidden;
  scrollbar-color: #444 transparent; /* Colore barra e sfondo */
}

.track_list{
  overflow: auto;
}

/* ==========================================================
    group_shoping ora group_creator_php
========================================================== */

/* campo principale */
#artist-field {
  position: relative;
  width: 100%;
  height: 1200px;
  overflow: visible;
}

#center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: auto;
  opacity: 0.95;
  z-index: 5;
  pointer-events: none;
}

#artist-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  max-width: 90%;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 25px 30px;
  border-radius: 15px;
  text-align: center;
  line-height: 1.5em;
  z-index: 10;
  display: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

#artist-info.visible {
  display: block;
}

#info-stems {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  text-align: center;
}

/* nodi artisti */
.artist-image-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.artist-image-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* testo sotto l'immagine */
.genre-overlay {
  font-size: 12px;
  color: #ccc;
  text-align: center;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

/* nome gruppo */
.artist-label {
  font-size: 13px;
  color: #fff;
  text-align: center;
  margin-top: 3px;
  max-width: 100px;
  line-height: 1.2em;
}

/* ==========================================================
    button byu credit readme_credit_year.php
========================================================== */

button { all: unset; }

.btn-credit button {
  background: var(--blue);
  color: #000;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
  display: inline-block;
  text-align: center;
}

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

.btn-credit button:disabled {
  background-color: var(--disable);
  cursor: not-allowed;
}

/* =======================================
   STILI PER IL MODALE PNPB (POPUP) 14/11/2025 Ivan
   ======================================= */

/* Il contenitore Modale (Overlay) */
.modal {
  display: none; /* Nascosto di default */
  position: fixed; /* Si sovrappone a tutto */
  z-index: 1000; /* Assicura che sia sopra ogni altro elemento */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Abilita lo scroll se il contenuto è troppo lungo */
  background-color: rgba(0,0,0,0.8); /* Sfondo semi-trasparente scuro */
  padding-top: 50px; /* Spazio dall'alto */
}

/* Il contenuto del Modale (la scatola interna) */
.modal-content {
  background-color: #333; /* Colore di sfondo scuro */
  margin: 5% auto; /* 5% dall'alto e centrato orizzontalmente */
  padding: 20px;
  border: 1px solid #555;
  width: 90%; /* Larghezza su schermi piccoli */
  max-width: 600px; /* Larghezza massima su schermi grandi */
  border-radius: 8px;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
  color: #fff;
}

/* Titolo del modale */
.modal-content h2 {
    color: #4CAF50; /* Verde PNPB */
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Stile per il pulsante di chiusura (X) */
.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

/* Stili per gli input all'interno del modale */
#vip-form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #ccc;
}

#vip-form input[type="text"],
#vip-form input[type="number"],
#vip-form select,
#vip-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    display: inline-block;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #444;
    color: #fff;
}

/* Stile per il pulsante di azione all'interno del modale */
#vip-form #btn-apply-vip {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: 20px;
}

#vip-form #btn-apply-vip:hover {
    background-color: #45a049;
}

.track-card.prev-1{
  width: 40%;
}
.track-body.prev-1{
  display: flex;
}
.track-title.prev-1{
  font-size: 16px;
  height: auto;
  margin:unset;
  padding:unset;
  width:100%;
}
.controls.prev-1{
  margin:unset;
  width:70%;
}
.bottom.prev-1{
  display: flex;
  flex-direction: row;
  justify-content: space-between; /* o flex-start */
  gap: 10px;
}
.red{
  color: red !important;
}
.white{
  color: white !important;
}
.green{
  color: green !important;
  border-color: green !important;
}
.track-cover.prev-1{
  width: 70px;
  margin-left: auto;
}
.loader1{
  display: none;
  border: 6px solid #ff0000;
  border-top-color: #ff4d4d;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-left: 0px;
  vertical-align: middle;
  animation: spin 1s 
linear infinite;
}
.loader1.prev-1.visibile{
  display:block !important;
}
.loader1.prev-1{
  display:none;
  position: absolute;
  left: calc( 50% - 26px );
}
.filter-controls{
  width: 42vw;
  margin-left: auto;
}
.search-input-container{
  width: auto;
  display: flex;
  padding: unset;
  align-items: end;
  margin-left: auto;
  flex-direction: row;
}
.clear-filters-btn{
  margin: unset !important;
  padding: unset !important;
  border: unset !important;
  height: min-content;
  width: fit-content !important;
  position: absolute;
  right: 6vw;
}
.filter-modal{
  display: block;
  position: absolute;
  background-color: gray;
  padding: 10px;
  width: 400px;
  right: 2.5vw;
  overflow-y: scroll;
  max-height: 400px;
  margin-top: 10px;
  z-index: 1000;
}
.filter-section{
  height: fit-content;
}
.filter-section .checkbox-item{
  display: inline-flex;
  width:30px;
  align-items: baseline;
}
.filter-modal label{
  margin:0 4px 0 0;
  width:200px;
  text-align:left;
  white-space: nowrap;
  padding:unset;
  border:unset;
  border-radius:unset;
}
.main-content{
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: row;
  height: auto;
  /* line-height: .3; */
  padding-bottom: 20px;
}
.filter-master{
    column-count: 2;
    column-gap: 20px;
    max-height: 8.5em;
    overflow: hidden;
}
.right-panel{
  margin-right:20px;
  width: 40%;
  height: auto;
}
.left-panel{
  width: 60%;
  display: flex;
  flex-direction: row;
}
.cursore-lampadina{
  cursor: url(../cursore_personale_1.png) 0 0, help;
  width: 16px;
  height: 16px;
  font-size: 16px;
}
.filter-modal button{
  position: absolute;
  top: 0px;
  right: 0px;
}
.extra-info{
  position:absolute;
  right:20px;
  transform:translateY(-100%);
  background-color: gray;
  padding:0 10px;
  cursor: pointer;
  margin-top: 2px;
}
.btn-prev{
  background: #3424f1 !important;
  color: #fff !important;
  border: 2px solid #3a3a3a !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0px !important;
  border-radius: 50% !important;
}
.btn-next{
  background: #3424f1 !important;
  color: #fff !important;
  border: 2px solid #3a3a3a !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0px !important;
  border-radius: 50% !important;
}
.half{
  display: flex;
  align-items: center;
}
.eq-container{
  display: flex;    
  gap: 40px;
}
.waveform {
  width: 200px;
  height: 40px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.waveform-svg rect {
  
}

.waveform-svg .played rect {
  fill: #22cf31;
}
#video-creation-ffmpeg{
  display: none;
  position:fixed;
  top:0;left:0;
  width:100%;height:100%;
  background:rgba(0,0,0,0.9);
  color:#fff;
  z-index:9999;
  justify-content:center;
  align-items:center;
  overflow: auto;
}
    .grid-ffmpeg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .card-ffmpeg { border: 1px solid #333; border-radius: 10px; padding: 12px; }
    .row-ffmpeg { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
    .row-ffmpeg > * { flex: 1; }
    .tight-ffmpeg { flex: 0 0 auto; }
    .muted-ffmpeg { font-size: 12px; opacity: .8; }
    .mono-ffmpeg { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
    .full-ffmpeg { grid-column: 1 / -1; }
    .ok-ffmpeg { color: #86efac; }
    .err-ffmpeg { color: #fca5a5; }
    .pill-ffmpeg { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid #444; font-size: 12px; opacity: .9; }


@media (max-width: 480px) and (orientation: portrait) {
  .main-content{
    display:flex;
    flex-direction:column;
  }
  h1{
    font-size: larger;
    width: 80%;}
  .right-panel{
    width:100%;
    height: auto;
    margin: 0 0 10px 0;
  }
  .left-panel{
    width:100%;
    margin: 0 0 10px 0;
  }
  .half{
    margin:0 15px 0 0
  }
  textarea{
    margin: 0 15px 0 0;
    width: 100%;
  }
  .track-card{
    flex-direction: column;
    min-width:unset;
  }
  .eq-container{
    flex-direction:column;
    gap: unset;
  }
  .controls{
    flex-direction: row;
    width: auto;
    gap: 10px;
  }
  .lyrics-style-wrapper {
    flex-direction: column;
  }
  .lyrics-box,
  .style-box {
    width: 100%;
  }
  .control-bar {
    flex-direction: column;
    align-items: stretch;
    max-height: unset;
    margin:12px 0 10px 0;
  }
  .control-bar .buttons {
    display: flex;
    flex-direction: row;
    height: auto;
    flex-wrap: wrap;
  }
  .control-bar button{
    width: calc( 50vw - 54px);
    height:unset;
  }
  .control-bar .btn-complete{
    height:unset;
    margin-left: unset;
  }
  .control-bar .search {
    margin-left: 0;
    width: 100%;
  }
  .control-bar select {
     width: calc(90vw - 10px);
  }
  .track_nav{
    display: flex;
    gap: 10px 0;
    padding: unset;
    margin: unset;
    flex-wrap: wrap;
    flex-direction: row;
    max-width: none;
    width: 75vw;
  }
  .track_nav button {
    margin: unset !important;
    padding: unset !important;
  }  
  .filter-controls {
    margin: unset;
    width: 70%;
  }
  .filter-modal {
    width: 90vw;
    left: 50%;
    transform: translateX(-50%);
  }
  .extra-info {
    transform: translateY(-4.5vh);
    height: 2vh;
  }
  hr{
    margin: 3vh 0;
  }
  .container{
    padding:unset;
  }
  .control-bar button:hover {color: white;background: var(--accent-hover);}
  .track_nav button:hover { color: white; }
  .creator_avatar{
    width:30px;
    height:30px;
  }
  .nav-header .welcome-text{
    font-size:10px;
  }
  .nav-header .nav-buttons{
    font-size:small
  }
  .token{
    font-size:small;
  }
  .nav-header{
    min-height:35px;
    padding:5px 10px;
  }
}
/* ── Modal scelta tipo video (prompt_creator) ────────────────── */
#lb-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lb-video-modal .lb-vm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}
#lb-video-modal .lb-vm-box {
    position: relative;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 24px 20px 20px;
    width: 340px;
    max-width: 94vw;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
#lb-video-modal .lb-vm-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
#lb-video-modal .lb-vm-subtitle {
    font-size: 12px;
    color: #888;
    margin-bottom: 18px;
}
#lb-video-modal .lb-vm-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
#lb-video-modal .lb-vm-btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #24243e;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
    width: 100%;
    box-sizing: border-box;
}
#lb-video-modal .lb-vm-btn:hover              { background: #2e2e50; }
#lb-video-modal .lb-vm-btn-suno:hover         { border-color: #38a852; }
#lb-video-modal .lb-vm-btn-custom:hover       { border-color: #2B87F2; }
#lb-video-modal .lb-vm-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}
#lb-video-modal .lb-vm-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
#lb-video-modal .lb-vm-label {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
#lb-video-modal .lb-vm-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
    overflow-wrap: break-word;
}
#lb-video-modal .lb-vm-footer {
    display: flex;
    padding-top: 10px;
    border-top: 1px solid #333;
    margin-top: 4px;
}
#lb-video-modal .lb-vm-cancel {
    flex: 1;
    height: 30px;
    box-sizing: border-box;
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 6px;
    color: #aaa;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
#lb-video-modal .lb-vm-cancel:hover { background: #333; color: #fff; }
