/* Fenetre "Options du compte-rendu" - Whisp It
 * Reprend .whisp-modal-* (modal.css), .auth-segmented-nav (auth.css) et .whisp-task-item / .whisp-checkbox
 * (meeting-detail.css). Ce fichier ne regle que la mise en page propre a cette fenetre.
 */

.report-options-card {
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  align-items: stretch;
  text-align: left;
  overscroll-behavior: contain;
}

.report-options-card .whisp-modal-title,
.report-options-card .whisp-modal-message {
  text-align: center;
}

.report-options-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.report-options-group .form-label {
  margin: 0;
}

/* Curseur de taille : Court - Moyen - Complet, crans aimantes, orange Whisp It.
 * Un vrai <input type="range"> invisible recoit le doigt, la souris et le clavier ;
 * le rendu (piste, remplissage, pastille) suit la variable --p (0, 0.5, 1) avec une transition. */
.report-size-group {
  --thumb: 26px;
  --ease-snap: cubic-bezier(0.34, 1.4, 0.64, 1);
  gap: 6px;
}

.report-size-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-size-auto {
  min-height: 32px;
  padding: 6px 14px;
  border: 1.5px solid var(--border-card, #e2e8f0);
  border-radius: 999px;
  background: var(--bg-input, #f8fafc);
  color: var(--text-secondary, #64748b);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.report-size-auto:active {
  transform: scale(0.96);
}

.report-size-auto.active {
  background: var(--accent-orange-soft, rgba(255, 94, 58, 0.1));
  border-color: var(--accent-orange-border, rgba(255, 94, 58, 0.25));
  color: #c2410c; /* orange fonce : texte lisible (4.9:1) sur le fond orange pale */
}

.report-size-slider {
  position: relative;
  height: 44px;
  margin: 0 2px;
  touch-action: pan-y;
}

.report-size-track,
.report-size-tick,
.report-size-thumb {
  pointer-events: none;
}

.report-size-track {
  position: absolute;
  top: 50%;
  left: calc(var(--thumb) / 2);
  right: calc(var(--thumb) / 2);
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--border-card, #e2e8f0);
  overflow: hidden;
}

.report-size-fill {
  width: calc(var(--p, 0.5) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent-orange, #ff5e3a);
  transition: width 0.32s var(--ease-snap), background-color 0.25s ease;
}

.report-size-tick {
  position: absolute;
  top: 50%;
  left: calc(var(--thumb) / 2 + var(--p) * (100% - var(--thumb)));
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg-card, #ffffff);
  opacity: 0.9;
  transform: translate(-50%, -50%);
}

.report-size-thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--thumb) / 2 + var(--p, 0.5) * (100% - var(--thumb)));
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-orange, #ff5e3a);
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  transition: left 0.32s var(--ease-snap), transform 0.18s ease, border-color 0.25s ease, box-shadow 0.2s ease;
}

.report-size-slider:active .report-size-thumb {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 0 0 8px var(--accent-orange-soft, rgba(255, 94, 58, 0.1));
}

.report-size-slider:has(.report-size-input:focus-visible) .report-size-thumb {
  box-shadow: 0 0 0 4px var(--accent-orange-border, rgba(255, 94, 58, 0.25));
}

/* Mode Auto : le curseur reste lisible mais passe en gris */
.report-size-slider.is-auto .report-size-fill {
  background: var(--text-muted, #94a3b8);
}

.report-size-slider.is-auto .report-size-thumb {
  border-color: var(--text-muted, #94a3b8);
}

.report-size-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.report-size-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb);
  height: 44px;
}

.report-size-input::-moz-range-thumb {
  width: var(--thumb);
  height: 44px;
  border: 0;
}

.report-size-labels {
  display: flex;
  justify-content: space-between;
}

.report-size-label {
  min-width: 64px;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text-secondary, #64748b);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.report-size-label:first-child { text-align: left; }
.report-size-label:last-child { text-align: right; }

.report-size-label.active {
  color: var(--text-primary, #0f172a);
  font-weight: 700;
}

.report-size-caption {
  margin: 0;
  min-height: 1.4em;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
}

.report-options-list {
  display: flex;
  flex-direction: column;
  padding: 0 14px;
  background: var(--bg-input, #f8fafc);
  border: 1.5px solid var(--border-card, #e2e8f0);
  border-radius: 16px;
}

.report-options-list .whisp-task-item {
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
}

.report-options-list .whisp-checkbox {
  margin-top: 0;
}

.report-options-list .whisp-task-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
}

.report-options-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
}

.report-options-textarea {
  width: 100%;
  min-height: 76px;
  padding: 12px 16px;
  background-color: var(--bg-input, #f8fafc);
  border: 1.5px solid var(--border-input, #e2e8f0);
  border-radius: 16px;
  font: inherit;
  font-size: 14px;
  color: var(--text-primary, #0f172a);
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: var(--transition-normal);
}

.report-options-textarea:focus {
  background-color: var(--bg-input-focus, #ffffff);
  border-color: var(--text-secondary, #64748b); /* pas d orange au focus (regle UI Whisp It) */
}

/* Boutons toujours visibles en bas de la fenetre, meme quand la liste defile (petits ecrans) */
.report-options-card .whisp-modal-actions {
  position: sticky;
  bottom: -20px;
  width: auto;
  margin: 0 -20px -20px;
  padding: 12px 20px 20px;
  background: var(--bg-card, #ffffff);
  border-top: 1px solid var(--border-card, #e2e8f0);
}

.report-options-card .whisp-modal-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .report-options-overlay,
  .report-options-overlay .whisp-modal-card,
  .report-size-fill,
  .report-size-thumb,
  .report-size-auto,
  .report-size-label {
    transition: none;
  }

  .report-size-slider:active .report-size-thumb {
    transform: translate(-50%, -50%);
  }
}
