/* reset minimale */
* {
  box-sizing: border-box;
}

body.tessera {
  background: #000;
  color: #fff;
  font-family: Montserrat, sans-serif;
  line-height: 1.4;
  padding: 0; /* togli il padding qui */
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  /* opzionale: padding per evitare che il testo tocchi i bordi */
  padding: 10rem 1rem;
}

.container > *:not(#hero-video) {
  position: relative;
  z-index: 2;
}

#hero-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  filter: brightness(50%);
  pointer-events: none;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 600;
  color: #ff3ace;
}

/************************************************************************************/
/* SEZIONE TESSERAMENTO */
/* form */
form {
  display: grid;
  gap: 1rem;
}

/* etichette */
label {
  display: block;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  color: #ff3ace;
}

/* input e textarea */
input[type="text"],
input[type="date"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 4px;
  color: #fff;
}

input::placeholder {
  color: #ccc;
}

/* checkbox in linea */
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.checkbox input {
  width: auto;
  transform: scale(1.1);
}

/* firma (canvas) */
.signature-container {
  position: relative;
  border: 1px solid #fff;
  border-radius: 4px;
  overflow: hidden;
  height: 200px;
}

#signature-pad {
  width: 100%;
  height: 100%;
  background: transparent;
}

#clear-signature {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 4px;
}

/* bottone invio */
.btn {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #e91e63;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

 

  /* Alert box */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-weight: bold;
  display: none;
}
.alert.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.alert.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* tutto ciò che è <img> non traboccherà mai dal suo contenitore */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
/************************************************************************************/

/************* SALVATAGGIO FIRMA TESSERAMENTO ********************************/

/* Contenitore firma */
.signature-container {
  width: 100%;
  max-width: 680px;
  margin: 8px 0 16px;
}

/* Etichetta */
.signature-label {
  display: block;
  margin-bottom: 6px;
  color: #ff4db6;           /* magenta del tema */
  font-weight: 600;
}

/* Box canvas */
.signature-box {
  background: #fff;         /* sfondo bianco per vedere la firma nera */
  border: 2px solid #ff4db6;
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
}

/* Canvas */
#signature-pad {
  display: block;
  width: 100%;
  height: 220px;            /* altezza fissa coerente con JS */
  background: #fff;
  touch-action: none;       /* evita lo scroll mentre si firma sul mobile */
  cursor: crosshair;
}

/* Azioni sotto il canvas */
.signature-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Bottone cancella ben visibile sul tema scuro */
.btn-clear-signature {
  appearance: none;
  border: none;
  outline: none;
  padding: 8px 14px;
  border-radius: 8px;
  background: #ff4db6;      /* magenta */
  color: #111;               /* testo scuro per contrasto */
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, opacity .2s ease;
}
.btn-clear-signature:hover { opacity: .9; }
.btn-clear-signature:active { transform: translateY(1px); }
