/* ─── EvaluationForm.module.css ─── */
/* Grila de evaluare Ro-VIBE 2026 — Anexa 4 */

.wrapper {
  margin-top: 2rem;
}

/* ── Sticky total header ── */
.stickyHeader {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.stickyTitle {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}

.totalScore {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.totalValue {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  transition: color 0.3s;
}

.totalMax {
  font-size: 1rem;
  color: var(--text-muted);
}

.totalBar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  margin-top: 0.75rem;
  overflow: hidden;
}

.totalBarFill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease, background 0.4s ease;
}

/* ── Criterion card ── */
.criterionCard {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.criterionCard:hover {
  box-shadow: var(--shadow-md);
}

.criterionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  cursor: default;
}

.criterionNumber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.criterionTitle {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.criterionMax {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.criterionBody {
  padding: 1.25rem 1.5rem;
}

/* ── Band pills ── */
.bandGroup {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.bandPill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  background: var(--surface-hover);
  color: var(--text-muted);
}

.bandPill:hover {
  transform: scale(1.05);
}

.bandPillSelected {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Band colors */
.bandLow {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.bandMedLow {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.bandMedHigh {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.bandHigh {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

/* ── Descriptor table ── */
.descriptorTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.descriptorTable td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.descriptorTable tr:last-child td {
  border-bottom: none;
}

.descriptorRange {
  width: 70px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
}

.descriptorText {
  color: var(--text-main);
}

.descriptorActive td {
  background: rgba(79, 70, 229, 0.06);
  border-radius: 0;
}

.descriptorActive .descriptorRange {
  color: var(--primary);
}

/* ── Fine-tune slider ── */
.sliderRow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  transition: background 0.2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid var(--surface-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid var(--surface-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.sliderValue {
  min-width: 44px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.criterionBar {
  height: 3px;
  border-radius: 2px;
  background: var(--border-color);
  overflow: hidden;
}

.criterionBarFill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ── Comment area ── */
.commentSection {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.commentLabel {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.commentTextarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface-hover);
  color: var(--text-main);
  font-size: 0.92rem;
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.commentTextarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ── Submit area ── */
.submitArea {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.draftBtn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface-color);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.draftBtn:hover:not(:disabled) {
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.draftBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.finalizeBtn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--success);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.finalizeBtn:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.finalizeBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toast {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease-out;
}

.toastSuccess {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.toastError {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* ── Badges ── */
.draftBadge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  font-weight: 600;
}

.lockedBadge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Locked state ── */
.lockedMessage {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(100, 116, 139, 0.06);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.criterionLocked {
  opacity: 0.75;
  pointer-events: none;
}

/* ── Confirmation modal ── */
.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.modalCard {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.modalIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  margin: 0 auto 1.25rem;
}

.modalTitle {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.modalText {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modalActions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.modalCancel {
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: background 0.2s;
}

.modalCancel:hover {
  background: var(--border-color);
}

.modalConfirm {
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--danger);
  color: white;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s;
}

.modalConfirm:hover:not(:disabled) {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.modalConfirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Submit row ── */
.submitRow {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-end;
}

/* ── Save & Next button ── */
.saveNextBtn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.saveNextBtn:hover:not(:disabled) {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.saveNextBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Entry navigation ── */
.entryNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0;
  margin-top: 1rem;
}

.navBtn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface-color);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.navBtn:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.navBtnPrimary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  margin-left: auto;
}

.navBtnPrimary:hover {
  background: #4338ca;
}

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

