/* ------------------------------------------------------------------ *
 * Choir Attendance — custom styles layered on top of Tailwind CDN.
 * ------------------------------------------------------------------ */

:root {
  --gold: #e5ba73;
  --charcoal: #1a1a2e;
}

/* Glass card: the core surface used throughout the app. */
.glass {
  background: rgba(34, 34, 58, 0.45);
  border: 1px solid rgba(229, 186, 115, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
}

/* Signature element: horizontal "musical staff" lines in the backdrop. */
.staff-lines {
  height: 120px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--gold) 0px,
    var(--gold) 1px,
    transparent 1px,
    transparent 24px
  );
}

/* Inputs */
.field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 31, 0.6);
  padding: 0.8rem 1rem;
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field::placeholder { color: rgba(255, 255, 255, 0.35); }
.field:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 186, 115, 0.18);
}
.field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(229, 186, 115, 0.85);
}

/* Gold button */
.btn-gold {
  background: linear-gradient(135deg, #e5ba73, #caa45e);
  color: #12121f;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.btn-gold:hover { filter: brightness(1.05); box-shadow: 0 10px 30px -10px rgba(229, 186, 115, 0.6); }
.btn-gold:active { transform: scale(0.98); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  border: 1px solid rgba(229, 186, 115, 0.4);
  color: var(--gold);
  transition: background 0.2s;
}
.btn-ghost:hover { background: rgba(229, 186, 115, 0.1); }

/* Instrument colour pills */
.pill { font-size: 0.7rem; padding: 0.15rem 0.6rem; border-radius: 9999px; letter-spacing: 0.05em; }
.pill-Violin     { background: rgba(229,186,115,.15); color:#e5ba73; }
.pill-Guitar     { background: rgba(147,197,253,.15); color:#93c5fd; }
.pill-Vocal      { background: rgba(110,231,183,.15); color:#6ee7b7; }
.pill-Keyboard   { background: rgba(216,180,254,.15); color:#d8b4fe; }
.pill-Flute      { background: rgba(249,168,212,.15); color:#f9a8d4; }
.pill-Percussion { background: rgba(253,186,116,.15); color:#fdba74; }
.pill-Mandolin   { background: rgba(94,234,212,.15);  color:#5eead4; }
.pill-Other      { background: rgba(203,213,225,.15); color:#cbd5e1; }

/* Modal + toast animations */
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.animate-pop { animation: pop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.animate-fadein { animation: fadein 0.2s ease; }

@keyframes flash-green { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.7);} 100% { box-shadow: 0 0 0 28px rgba(74,222,128,0);} }
.flash-green { animation: flash-green 0.6s ease-out; }

/* Spinner */
.spinner {
  width: 1.1rem; height: 1.1rem;
  border: 2px solid rgba(18,18,31,.35);
  border-top-color: #12121f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .animate-pop, .animate-fadein, .flash-green, .spinner { animation: none !important; }
}

/* ---- Print styles for the QR card sheet ---- */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .no-print { display: none !important; }
  .print-grid { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .qr-card {
    border: 1px solid #1a1a2e !important;
    background: #fff !important;
    color: #1a1a2e !important;
    break-inside: avoid;
    box-shadow: none !important;
  }
}
