/* plan.css – Plan activity styles */

#plan-activity {
  background: linear-gradient(135deg, #6bb6ff 0%, #7dd3fc 50%, #86efac 100%);
  overflow-y: auto;
}

.plan-view {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 20px;
  box-sizing: border-box;
}

.plan-border-wrap {
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.plan-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 32px 40px;
  min-height: 70vh;
  color: #1a202c;
}

.plan-page-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 12px;
  text-align: center;
}

/* Notes toggle and block */
.plan-notes-toggle {
  text-align: left;
  margin-bottom: 8px;
}

.plan-notes-toggle-btn {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: #718096;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.plan-notes-toggle-btn:hover {
  color: #4a5568;
}

.plan-notes-block {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(107, 182, 255, 0.06);
  border: 1px solid rgba(107, 182, 255, 0.15);
  border-radius: 10px;
}

.plan-notes-minimize {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 20px;
  color: #a0aec0;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.2s ease;
}

.plan-notes-minimize:hover {
  color: #4a5568;
}

.plan-notes-textarea {
  border: none;
  background: transparent;
  font-size: 16px;
  font-family: inherit;
  color: #2d3748;
  padding: 4px 8px;
  padding-right: 32px;
  outline: none;
  resize: none;
  min-height: 40px;
  max-height: 176px;
  line-height: 1.5;
  overflow-y: hidden;
}

.plan-notes-textarea::placeholder {
  color: #a0aec0;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

/* Past view: Back on top row, "Past Days" centered on next row */
.plan-header--past {
  flex-wrap: wrap;
}

.plan-header--past .plan-nav-btn {
  flex: 0 0 auto;
}

.plan-header--past .plan-date--past {
  flex: 1 1 100%;
  order: 2;
  margin-top: 12px;
  margin-bottom: 4px;
}

/* Future view: spacer on right so "Future Days" title is centered */
.plan-header--future .plan-header-spacer {
  min-width: 5.5em;
  flex-shrink: 0;
}

.plan-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-date {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
  text-align: center;
  flex: 1;
}

.plan-nav-btn {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.plan-nav-btn:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.plan-close-btn {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-close-btn:hover {
  background: #edf2f7;
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  position: relative;
}

.plan-row.done {
  background: rgba(72, 187, 120, 0.04);
  border-radius: 8px;
  padding: 4px 6px;
  margin: 0 -6px;
}

.plan-row.done .plan-text {
  opacity: 0.7;
}

.plan-circle {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 5px;
  position: relative;
  padding: 0;
}

.plan-circle:not(:disabled):hover {
  border-color: #4a9bd9;
}

.plan-circle.done {
  background: #48bb78;
  border-color: #48bb78;
}

.plan-circle.done::after {
  content: '✓';
  color: white;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.plan-circle:disabled {
  opacity: 0.3;
  cursor: default;
}

.plan-time-group {
  display: flex;
  align-items: center;
  width: 155px;
  min-width: 155px;
  flex-shrink: 0;
  margin-top: 3px;
}

.plan-time-value {
  display: flex;
  align-items: center;
  gap: 0;
}

.plan-time-part {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 17px;
  font-family: inherit;
  color: #4a5568;
  padding: 2px 0;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.plan-time-part:focus {
  /* no underline */
}

.plan-time-part::placeholder {
  color: #cbd5e0;
  font-size: 15px;
}

.plan-time-sep {
  font-size: 17px;
  color: #a0aec0;
  margin: 0 1px;
  user-select: none;
}

.plan-time-sep--dash {
  margin: 0 3px;
}

.plan-time-sep--trail {
  margin-left: 4px;
  color: #a0aec0;
}

.plan-time-group--filled .plan-time-part {
  color: #2d3748;
}

.plan-text {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  font-family: inherit;
  color: #2d3748;
  padding: 3px 8px;
  outline: none;
  resize: none;
  min-height: 32px;
  line-height: 1.5;
  margin-left: -10px;
}

.plan-text::placeholder {
  color: #a0aec0;
}

.plan-textarea {
  overflow: hidden;
}

.plan-row-remove {
  background: none;
  border: none;
  font-size: 22px;
  color: #cbd5e0;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.plan-row:hover .plan-row-remove {
  opacity: 1;
}

.plan-row-remove:hover {
  color: #e53e3e;
}

.plan-row-sprint-btn {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  padding: 6px 8px;
  margin-left: 2px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.plan-row:hover .plan-row-sprint-btn {
  opacity: 1;
}

.plan-row-sprint-btn:hover {
  color: #4a9bd9;
}

.plan-row-drag {
  background: none;
  border: none;
  font-size: 20px;
  color: #cbd5e0;
  cursor: grab;
  padding: 6px 8px;
  margin-left: 2px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.plan-row--dragging {
  opacity: 0.4;
}

.plan-row--drag-over {
  border-top: 2px solid #4a9bd9;
}

.plan-row:hover .plan-row-drag {
  opacity: 1;
}

.plan-new-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.plan-new-row:focus-within {
  opacity: 1;
}

.plan-new-row-plus {
  display: flex;
  align-items: center;
  padding: 4px 0;
}

.plan-new-row-plus-spacer {
  width: 28px;
}

.plan-row-add-btn {
  background: none;
  border: 1px dashed #cbd5e0;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 14px;
  color: #a0aec0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-row-add-btn:hover {
  border-color: #4a9bd9;
  color: #4a9bd9;
}

/* Past view */
.plan-past-item {
  margin-bottom: 8px;
}

.plan-past-item-header {
  cursor: pointer;
}

.plan-past-item-header-date {
  width: 100%;
  text-align: left;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-past-item-header-date:hover {
  background: #edf2f7;
}

.plan-past-item-header.open .plan-past-item-header-date {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.plan-past-item-content {
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 12px;
  background: white;
}

.plan-past-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.plan-past-entry.done .plan-past-text {
  opacity: 0.7;
}

.plan-past-circle {
  width: 14px;
  height: 14px;
  min-width: 14px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.plan-past-circle.done {
  background: #48bb78;
  border-color: #48bb78;
}

.plan-past-circle.done::after {
  content: '✓';
  color: white;
  font-size: 9px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.plan-past-time {
  font-size: 17px;
  font-family: inherit;
  color: #718096;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 125px;
  width: 125px;
  flex-shrink: 0;
}

.plan-past-text {
  font-size: 17px;
  font-family: inherit;
  color: #2d3748;
}

.plan-past-notes {
  font-size: 15px;
  font-family: inherit;
  font-style: italic;
  color: #718096;
  margin: 0 0 10px 0;
  padding: 8px 12px;
  background: rgba(107, 182, 255, 0.06);
  border-radius: 8px;
  border-left: 3px solid rgba(107, 182, 255, 0.3);
  white-space: pre-wrap;
  line-height: 1.5;
}

.plan-empty {
  text-align: center;
  color: #a0aec0;
  padding: 20px;
  font-size: 14px;
}

/* Future view */
.plan-future-form {
  margin-bottom: 16px;
}

.plan-future-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.plan-future-date {
  font-size: 22px;
  font-weight: 600;
  color: #2d3748;
}

.plan-future-date-btns {
  display: flex;
  gap: 4px;
}

.plan-future-date-btn {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-future-date-btn:hover {
  background: #edf2f7;
}

.plan-save-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0;
}

.plan-save-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: #4a9bd9;
  color: white;
  transition: all 0.2s ease;
}

.plan-save-btn:hover {
  background: #3a8bc5;
}

.plan-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 16px 0;
}

.plan-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 12px;
}

.plan-past-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-past-item-header-edit {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: #4a9bd9;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.plan-past-item-header-edit:hover {
  background: #edf2f7;
}

/* ===== RESPONSIVE (Mobile) ===== */
@media (max-width: 600px) {
  .plan-view {
    padding: 20px 12px;
  }

  .plan-border-wrap {
    max-width: 100%;
  }

  .plan-container {
    padding: 20px 14px;
    min-height: auto;
    max-width: 100%;
  }

  .plan-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .plan-date {
    font-size: 17px;
    flex: 1 1 100%;
    order: -1;
  }

  .plan-nav-btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .plan-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .plan-time-group {
    width: 140px;
    min-width: 140px;
  }

  .plan-time-part {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    font-size: 15px;
  }

  .plan-time-sep {
    font-size: 15px;
  }

  .plan-text {
    flex: 1 1 100%;
    font-size: 16px;
    min-width: 0;
    margin-left: -10px;
  }

  .plan-new-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .plan-future-date-row {
    flex-wrap: wrap;
  }

  .plan-future-date {
    font-size: 15px;
  }

  .plan-past-entry {
    flex-wrap: wrap;
    gap: 4px;
  }

  .plan-past-text {
    font-size: 16px;
  }

  .plan-past-time {
    font-size: 14px;
  }

  .plan-past-item-header {
    flex-wrap: wrap;
  }

  .plan-past-item-header-date {
    font-size: 14px;
    padding: 10px 12px;
  }
}
