/* game-plan.css – Weekly divide-by-days grid */

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

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

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

.gp-container {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  padding: 18px 28px 28px;
  min-height: calc(100vh - 80px);
  color: #1a202c;
}

.gp-page-title {
  font-size: 21px;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 2px;
  text-align: center;
}

.gp-subtitle {
  font-size: 13px;
  color: #718096;
  text-align: center;
  margin-bottom: 14px;
}

/* ===== Header / week nav ===== */
.gp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.gp-week-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gp-week-label {
  font-size: 18px;
  font-weight: 600;
  color: #1a365d;
  letter-spacing: 0.3px;
}

.gp-thisweek-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #4a9bd9;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.gp-thisweek-btn:hover {
  color: #2b6cb0;
  text-decoration: underline;
}

.gp-nav-btn {
  background: rgba(107, 182, 255, 0.1);
  border: 1px solid rgba(107, 182, 255, 0.25);
  border-radius: 10px;
  color: #1a365d;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gp-nav-btn:hover {
  background: rgba(107, 182, 255, 0.18);
  border-color: rgba(107, 182, 255, 0.4);
}

/* ===== Week blocks ===== */
.gp-week-block + .gp-week-block {
  margin-top: 26px;
  padding-top: 4px;
}

.gp-grid-wrap {
  width: 100%;
  overflow-x: auto;
}

.gp-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.gp-corner {
  width: 188px;
  border-bottom: 2px solid #cbd5e0;
}

.gp-day-head {
  padding: 4px 4px 8px;
  text-align: center;
  border-bottom: 2px solid #cbd5e0;
  border-left: 1px solid #edf2f7;
}

.gp-day-head--today {
  border-bottom-color: #4a9bd9;
}

.gp-day-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
}

.gp-day-date {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #a0aec0;
  margin-top: 1px;
}

.gp-day-head--today .gp-day-name { color: #2b6cb0; }
.gp-day-head--today .gp-day-date { color: #4a9bd9; }

/* Subject (row label) cell */
.gp-subject-cell {
  position: relative;
  vertical-align: top;
  padding: 8px 6px 8px 0;
  border-bottom: 1px solid #cbd5e0;
}

.gp-subject-name {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1a365d;
  padding: 4px 46px 4px 2px;
  outline: none;
  box-sizing: border-box;
}

.gp-subject-name::placeholder {
  color: #cbd5e0;
  font-weight: 500;
}

.gp-subject-tools {
  position: absolute;
  top: 6px;
  right: 2px;
  display: flex;
  align-items: center;
  gap: 1px;
}

.gp-subject-del {
  background: none;
  border: none;
  color: #cbd5e0;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.gp-subject-cell:hover .gp-subject-del { opacity: 1; }
.gp-subject-del:hover { color: #e53e3e; }

/* (divider popover removed — replaced by inline "spread across days") */

/* Day cell */
.gp-cell {
  vertical-align: top;
  border-bottom: 1px solid #cbd5e0;
  border-left: 1px solid #e2e8f0;
  padding: 5px 0;
  min-height: 40px;
}

.gp-cell--today {
  background-color: rgba(107, 182, 255, 0.05);
}

/* A single task item within a cell */
.gp-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 28px;
}

.gp-cell-text {
  flex: 1;
  min-width: 0;
  min-height: 26px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  line-height: 16px;
  color: #2d3748;
  padding: 4px 4px 4px 8px;
  resize: none;
  overflow: hidden;
  outline: none;
  box-sizing: border-box;
  display: block;
}

.gp-cell-text::placeholder { color: #cbd5e0; }

.gp-item:focus-within {
  background-color: rgba(107, 182, 255, 0.09);
  border-radius: 6px;
}

/* Done state — green check, no strikethrough */
.gp-item--done .gp-cell-text {
  color: #4a5568;
}

/* → copy task to next day */
.gp-copy-btn {
  flex-shrink: 0;
  width: 16px;
  height: 18px;
  margin: 4px 1px 0 0;
  border: none;
  background: none;
  color: #4a9bd9;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.gp-item:hover .gp-copy-btn,
.gp-item:focus-within .gp-copy-btn {
  opacity: 0.7;
}

.gp-copy-btn:hover { opacity: 1; color: #2b6cb0; }

.gp-cell-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 4px 5px 0 2px;
  border-radius: 50%;
  border: 1px solid #cbd5e0;
  background: #fff;
  color: transparent;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gp-item:hover .gp-cell-check,
.gp-item:focus-within .gp-cell-check {
  opacity: 1;
}

.gp-cell-check:hover {
  border-color: #48bb78;
  color: #48bb78;
}

.gp-cell-check--done {
  opacity: 1;
  background: #48bb78;
  border-color: #48bb78;
  color: #fff;
}

/* ===== Show more / fewer weeks ===== */
.gp-week-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.gp-week-toggle {
  background: none;
  border: none;
  color: #4a9bd9;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.gp-week-toggle:hover {
  color: #2b6cb0;
  background: rgba(107, 182, 255, 0.08);
}

/* ===== Undo toast ===== */
.gp-undo-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #1f2937;
  color: #f3f4f6;
  padding: 12px 16px 12px 18px;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  font-size: 14px;
}

.gp-undo-btn {
  background: none;
  border: none;
  color: #7dd3fc;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.gp-undo-btn:hover { background: rgba(255, 255, 255, 0.1); }

/* ===== Empty state & add ===== */
.gp-empty {
  text-align: center;
  color: #718096;
  font-size: 15px;
  margin: 28px 0 8px;
}

.gp-add-subject {
  display: inline-block;
  margin-top: 16px;
  background: rgba(107, 182, 255, 0.1);
  border: 1px dashed rgba(107, 182, 255, 0.4);
  border-radius: 10px;
  color: #2b6cb0;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gp-add-subject:hover {
  background: rgba(107, 182, 255, 0.18);
  border-color: rgba(107, 182, 255, 0.6);
}

/* ===== Header row: title block + email CTA ===== */
.gp-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.gp-email-cta {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(107, 182, 255, 0.12);
  border: 1px solid rgba(107, 182, 255, 0.45);
  color: #1a4f8a;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gp-email-cta:hover {
  background: rgba(107, 182, 255, 0.22);
  border-color: rgba(107, 182, 255, 0.7);
}

/* ===== Local-save reassurance note ===== */
.gp-local-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: #5a7184;
  text-align: center;
}

/* Clear space so the fixed bottom toolbar never covers the last grid rows. */
.gp-view { padding-bottom: 84px; }

/* ===== Simplified bottom toolbar (Breathe / Gratitude / Work Sprint) ===== */
.gp-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 145;
  display: flex;
  justify-content: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

/* Matches the desktop Magic Toolbar: white rounded tiles on a translucent
   blue→green gradient bar (mirrors .toolbar-card / .toolbar-button). */
.gp-bottom-bar-inner {
  pointer-events: auto;
  display: flex;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, rgba(107, 182, 255, 0.65) 0%, rgba(125, 211, 252, 0.65) 50%, rgba(134, 239, 172, 0.65) 100%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.gp-bottom-btn {
  min-width: 120px;
  height: 54px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.95);
  color: #1a365d;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.gp-bottom-btn:hover {
  transform: scale(1.05);
  background: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.gp-bottom-btn:active { transform: scale(1.02); }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .gp-view { padding: 8px; padding-bottom: 88px; }
  .gp-container { padding: 16px 12px 22px; }
  .gp-grid { min-width: 720px; }
  .gp-corner { width: 96px; }
  .gp-nav-btn { padding: 7px 12px; font-size: 14px; }
  .gp-week-label { font-size: 16px; }
  .gp-email-cta { font-size: 12.5px; padding: 7px 12px; }
  .gp-bottom-bar-inner { gap: 8px; padding: 8px 10px; border-radius: 18px; }
  .gp-bottom-btn { min-width: 92px; height: 48px; font-size: 14px; border-radius: 12px; }
}
