/* ── FORM CARD ── */
.form-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 10px 48px var(--shadow-red);
  padding: 28px 22px;
  margin-top: -24px;
  position: relative;
  z-index: 2;
}

@media (min-width: 680px) {
  .form-card { padding: 36px 36px; }
}

.form-section {
  margin-bottom: 28px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: 6px;
  line-height: 1.3;
}

.label-tomato {
  flex-shrink: 0;
  position: relative;
  top: 1px;
}

.form-helper {
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 10px;
  line-height: 1.5;
}

.form-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15px;
  color: var(--near-black);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232, 53, 42, 0.12);
}

.form-input::placeholder { color: #C8C2C0; }

textarea.form-input {
  resize: vertical;
  min-height: 88px;
}

/* ── OPTION GRIDS ── */
.option-grid {
  display: grid;
  gap: 10px;
}

.effort-grid { grid-template-columns: 1fr 1fr; }

@media (min-width: 520px) {
  .effort-grid { grid-template-columns: repeat(4, 1fr); }
}

.distraction-grid { grid-template-columns: 1fr 1fr; }

@media (min-width: 680px) {
  .distraction-grid { grid-template-columns: repeat(3, 1fr); }
}

.option-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  padding: 13px 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.option-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(232, 53, 42, 0.14);
  border-color: var(--red);
}

.option-card.selected {
  border-color: var(--red);
  background: var(--red-light);
}

.option-card.selected .opt-label { color: var(--red); }
.option-card.selected .opt-icon svg { animation: iconPop 0.25s ease-out; }

.opt-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.opt-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--near-black);
  transition: color 0.2s;
  display: block;
  margin-bottom: 2px;
}

.opt-desc {
  font-size: 11px;
  color: var(--warm-gray);
  line-height: 1.4;
}

.card-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s, transform 0.2s;
}

.option-card.selected .card-check {
  opacity: 1;
  transform: scale(1);
  animation: checkmarkAppear 0.2s ease-out;
}

/* ── DURATION SLIDER ── */
.duration-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.duration-badge {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
}

.slider-wrap { flex: 1; }

#duration-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  --pct: 22.2%;
  background: linear-gradient(
    to right,
    var(--red) 0%, var(--red) var(--pct),
    var(--red-light) var(--pct), var(--red-light) 100%
  );
}

#duration-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(232, 53, 42, 0.35);
  cursor: pointer;
  transition: width 0.15s, height 0.15s;
}

#duration-slider::-webkit-slider-thumb:hover { width: 32px; height: 32px; }

#duration-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--red-light);
}

#duration-slider::-moz-range-thumb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(232, 53, 42, 0.35);
  cursor: pointer;
}

.preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-btn {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--near-black);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}

.preset-btn:hover:not(.active) {
  border-color: var(--red);
  color: var(--red);
}

.preset-btn.active {
  border-color: var(--red);
  background: var(--red-light);
  color: var(--red);
  font-weight: 600;
}

/* ── DATE/TIME ── */
.datetime-row {
  display: flex;
  gap: 10px;
}

.datetime-row .form-input { flex: 1; }

@media (max-width: 400px) {
  .datetime-row { flex-direction: column; }
}

.date-warning {
  font-size: 12px;
  color: var(--yellow);
  margin-top: 6px;
  display: none;
}

.date-warning.visible { display: block; }

/* ── SLIDE FIELD ── */
.slide-field {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin-top 0.3s;
}

.slide-field.open {
  max-height: 300px;
  opacity: 1;
  margin-top: 14px;
}

/* ── ERRORS ── */
.field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  display: none;
}

.field-error.visible { display: block; }

/* ── GENERATE BUTTON ── */
.btn-generate {
  width: 100%;
  height: 56px;
  background: linear-gradient(to right, var(--red), var(--red-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 53, 42, 0.38);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.btn-generate:not(:disabled):hover {
  transform: scale(1.01);
  box-shadow: 0 8px 28px rgba(232, 53, 42, 0.45);
}

.btn-generate:not(:disabled):active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(232, 53, 42, 0.25);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .btn-generate { height: 52px; font-size: 15px; }
}

/* ── QUEUE CHIPS (above form task input) ── */
.queue-chips-bar {
  margin-bottom: 10px;
}

.queue-chips-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.queue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-light);
  border: 1.5px solid rgba(232, 53, 42, 0.25);
  border-radius: 20px 18px 22px 19px;
  padding: 5px 12px 5px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--red-dark);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(232, 53, 42, 0.1);
}

.queue-chip:hover {
  background: var(--red);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 53, 42, 0.25);
}

/* ── SMART SUGGESTION ── */
.smart-suggestion {
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  animation: fadeInUp 0.3s ease-out;
}

.smart-suggestion-text {
  font-size: 13px;
  color: var(--near-black);
  margin-bottom: 10px;
  line-height: 1.5;
}

.smart-suggestion-text strong {
  color: var(--red);
}

.btn-use-suggestion {
  background: var(--yellow);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-use-suggestion:hover { opacity: 0.85; }
