/* Custom styles for Munshid Vocal Audition Platform */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #047857; /* Emerald 700 */
  --primary-dark: #065f46;
  --primary-light: #10b981;
  --accent: #d97706; /* Amber 600 / Gold */
  --bg-main: #f8fafc;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  direction: rtl;
  text-align: right;
  background-color: var(--bg-main);
  color: #1e293b;
  -webkit-tap-highlight-color: transparent;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Pulsing record button animation */
@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.recording-pulse {
  animation: pulse-recording 1.5s infinite;
}

/* Audio visualizer canvas */
.visualizer-canvas {
  width: 100%;
  height: 60px;
  background-color: #0f172a;
  border-radius: 0.5rem;
}

/* Score slider styling & jitter prevention */
input[type=range] {
  accent-color: #059669;
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  cursor: pointer;
  height: 24px;
  background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 9999px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background-color: #059669;
  cursor: grab;
  margin-top: -6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}

input[type=range]:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.15);
}

/* Hide number spinner arrows to prevent internal layout shifts */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield;
}

/* Prevent layout jump and scroll anchoring jitter during slider drag */
#rubric-form,
#evaluation-studio {
  overflow-anchor: none;
  overscroll-behavior: contain;
}

body.is-sliding {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing !important;
}

/* Tab active styles */
.tab-active {
  color: #047857;
  border-bottom: 3px solid #047857;
  font-weight: 700;
}

/* Glassmorphism effects */
.glass-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Custom audio player */
audio {
  width: 100%;
  border-radius: 8px;
}

