/*
 * Design System - Ideas (Ideas Garden)
 *
 * Idea-specific styling. Shared "project" UI (index sections, cards,
 * notebook, state banner, lifecycle, journal sections, inline-edit
 * forms) lives in design/project.css.
 */

/* Inline nudge for almost-ready ideas */
.idea-nudge {
  display: inline-block;
  margin-right: var(--space-sm);
}

.idea-nudge a {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--ink-dark);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  transition: all var(--transition-base);
}

.idea-nudge a:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Card variant: almost-ready (idea-specific green highlight) */
.idea-card-almost-ready {
  background: var(--ui-green);
  border-color: var(--ui-green-accent);
}

.idea-card-almost-ready:hover {
  background: var(--ui-green-accent);
  border-color: var(--ui-green-accent);
  box-shadow: var(--shadow-card-hover);
}

/* ============================================
   Idea show page: hibernate/wake/complete modals
   ============================================ */

.idea-complete-modal-content,
.idea-hibernate-modal-content {
  max-width: var(--content-max-width-narrow);
}

/* Hibernate / wake-up / reopen button in top right of the state banner */
.state-hibernate-btn,
.state-wake-btn,
.state-reopen-btn {
  position: absolute;
  top: var(--space-base);
  right: var(--space-base);
  width: var(--size-icon-sm);
  height: var(--size-icon-sm);
  padding: 0;
  background: rgba(255, 255, 255, var(--opacity-bright));
  border: 1px solid var(--parchment);
  border-radius: 50%;
  font-size: var(--font-size-lg);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  opacity: var(--opacity-fade);
}

.state-hibernate-btn:hover,
.state-wake-btn:hover,
.state-reopen-btn:hover {
  opacity: var(--opacity-full);
  background: rgba(255, 255, 255, var(--opacity-full));
  border-color: var(--parchment-dark);
  box-shadow: var(--shadow-sm);
  transform: scale(var(--scale-hover));
}

/* Ready ideas inline badge (e.g., in week planner) */
.almost-ready-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background: linear-gradient(135deg, var(--ui-green) 0%, var(--ui-green-accent) 100%);
  border: 1px solid var(--ui-green-accent);
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--ink-dark);
  white-space: nowrap;
}

/* ============================================
   Task Grooming Wizard

   Class names are deliberately distinct from the week-planning wizard's
   `.wizard-*` classes in task-components.css — the two wizards share
   the word "wizard" but not a design language.
   ============================================ */

.task-grooming-wizard {
  max-width: var(--workspace-max-width);
  margin: 0 auto;
  padding: var(--space-lg);
}

.grooming-card {
  background: var(--bg-white-bright);
  border: 2px solid var(--parchment);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  box-shadow: var(--shadow-base);
}

.grooming-header {
  margin-bottom: var(--space-xl);
  text-align: center;
}

.grooming-header h1 {
  margin: 0 0 var(--space-sm) 0;
  font-family: var(--font-accent);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  color: var(--ink-dark);
  letter-spacing: var(--letter-spacing-accent);
}

.grooming-subtitle {
  margin: 0;
  font-size: var(--font-size-lg);
  color: var(--ink-medium);
  line-height: var(--line-height-normal);
}

.task-pieces-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
  margin-bottom: var(--space-xl);
}

.task-piece-item {
  display: flex;
  gap: var(--space-base);
  padding: var(--space-base);
  background: var(--bg-white-semi);
  border: 2px solid var(--parchment);
  border-radius: var(--border-radius);
  transition: all var(--transition-base);
}

.task-piece-item:hover {
  background: var(--bg-white-full);
  border-color: var(--parchment-dark);
}

.piece-checkbox {
  flex-shrink: 0;
  padding-top: var(--space-xs);
}

.piece-checkbox-input {
  width: var(--size-checkbox);
  height: var(--size-checkbox);
  cursor: pointer;
}

.piece-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.piece-title-row {
  display: flex;
}

.piece-title-input {
  width: 100%;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--ink-dark);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  background: var(--bg-white-bright);
  transition: all var(--transition-base);
}

.piece-title-input:focus {
  outline: none;
  border-color: var(--ui-green-accent);
  background: var(--bg-white-full);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-green-accent) 20%, transparent);
}

.piece-estimate-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.estimate-label {
  font-size: var(--font-size-base);
  color: var(--ink-medium);
  margin: 0;
}

.piece-estimate-input {
  width: var(--input-width-sm);
  font-size: var(--font-size-base);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  background: var(--bg-white-bright);
  transition: all var(--transition-base);
}

.piece-estimate-input:focus {
  outline: none;
  border-color: var(--ui-green-accent);
  background: var(--bg-white-full);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-green-accent) 20%, transparent);
}

.estimate-unit {
  font-size: var(--font-size-base);
  color: var(--ink-medium);
}

.grooming-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-base);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--parchment);
}

/* ============================================
   Ready Ideas in Week Planner
   ============================================ */

.ready-ideas-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}

.ready-idea-item {
  padding-left: var(--space-base);
  border-left: 3px solid var(--ui-green-accent);
}

.ready-idea-item h4 {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.idea-state-icon-inline {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.idea-link {
  color: var(--ink-dark);
  text-decoration: none;
}

.idea-link:hover {
  text-decoration: underline;
}

.ready-idea-tasks {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* ============================================
   Mobile Responsive (idea-specific only; generic index
   behaviour lives in design/project.css)
   ============================================ */

@media (max-width: 768px) {
  /* Hide the hibernate button on mobile (state icon is the watermark) */
  .state-hibernate-btn {
    display: none;
  }
}
