/* ─── Profile reminders list ─────────────────────────────────────────────── */
.reminder-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--kith-border);
}

.reminder-item:last-of-type {
  border-bottom: none;
}

.reminder-item-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.reminder-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.reminder-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.reminder-item-title {
  font-size: var(--text-base);
  color: var(--kith-text);
  font-weight: 500;
}

.reminder-item-meta {
  font-size: var(--text-sm);
  color: var(--kith-text-muted);
}

.reminder-birthday-note {
  font-size: var(--text-xs);
  color: var(--kith-text-dim);
  font-style: italic;
  margin-top: 2px;
}

/* Fix 8 — edit/delete button group */
.reminder-item-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}

.reminder-edit-btn {
  background: transparent;
  border: 1px solid var(--kith-border);
  color: var(--kith-text-dim);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.reminder-edit-btn:hover {
  color: var(--kith-green);
  border-color: var(--kith-green);
}

.reminder-delete-btn {
  background: transparent;
  border: 1px solid var(--kith-border);
  color: var(--kith-text-dim);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.reminder-delete-btn:hover {
  color: var(--kith-red);
  border-color: var(--kith-red);
}

.reminder-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px dashed var(--kith-border);
  color: var(--kith-text-dim);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: var(--text-sm);
  cursor: pointer;
  font-family: inherit;
  margin-top: 10px;
  transition: border-color 0.15s, color 0.15s;
}

.reminder-add-btn:hover {
  border-color: var(--kith-green);
  color: var(--kith-green);
}

/* ─── Home screen reminder cards ─────────────────────────────────────────── */
.reminder-card {
  background: var(--kith-surface);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reminder-card.upcoming {
  opacity: 0.65;
}

/* Left: avatar + text block */
.rc-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.rc-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--kith-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--kith-text-muted);
  flex-shrink: 0;
  cursor: pointer;
}

.rc-avatar:hover { opacity: 0.8; }

.rc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rc-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--kith-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.rc-name:hover { color: var(--kith-green); }

.rc-sub {
  font-size: var(--text-xs);
  color: var(--kith-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-due {
  font-size: var(--text-xs);
  color: var(--kith-text-muted);
}

.rc-due.overdue {
  color: var(--kith-red);
  font-weight: 600;
}

/* Right: icon row + done button, stacked, right-aligned */
.rc-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}

.rc-icons {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.rc-icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-sm);
  opacity: 0.85;
  transition: opacity 0.15s;
  line-height: 1;
}

.rc-icon-btn:hover { opacity: 1; }
.rc-icon-btn.disabled { opacity: 0.25; pointer-events: none; }

.rc-done-btn {
  height: 32px;
  background: transparent;
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-sm);
  color: var(--kith-text-muted);
  font-size: var(--text-xs);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  padding: 0 8px;
}

.rc-done-btn:hover {
  border-color: var(--kith-green);
  color: var(--kith-green);
}

.rc-done-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.reminders-empty {
  font-size: var(--text-sm);
  color: var(--kith-text-dim);
  padding: 4px 0;
}

/* ─── Add/Edit reminder bottom sheet ─────────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.sheet-backdrop.open {
  opacity: 1;
}

.reminder-sheet {
  background: var(--kith-surface);
  border-top: 1px solid var(--kith-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 12px 20px 32px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sheet-backdrop.open .reminder-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--kith-border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--kith-text);
  margin-bottom: 20px;
}

.sheet-section-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--kith-text-dim);
  margin-bottom: 8px;
  margin-top: 16px;
}

.reminder-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-border);
  color: var(--kith-text-muted);
  border-radius: var(--radius-lg);
  padding: 7px 16px;
  font-size: var(--text-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.preset-btn:hover {
  border-color: var(--kith-green);
  color: var(--kith-green);
}

.preset-btn.active {
  background: var(--kith-green);
  border-color: var(--kith-green);
  color: #000;
  font-weight: 600;
}

.reminder-text-input {
  width: 100%;
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-md);
  color: var(--kith-text);
  font-size: var(--text-base);
  font-family: inherit;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.reminder-text-input:focus { border-color: var(--kith-green); }
.reminder-text-input::placeholder { color: var(--kith-text-dim); }

/* ─── Date input row + calendar popup ────────────────────────────────────── */
.cal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reminder-date-text {
  flex: 1;
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-md);
  color: var(--kith-text);
  font-size: var(--text-base);
  font-family: inherit;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.reminder-date-text:focus { border-color: var(--kith-green); }
.reminder-date-text::placeholder { color: var(--kith-text-dim); }

.cal-icon-btn {
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-md);
  color: var(--kith-text-muted);
  font-size: 1.2rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.cal-icon-btn:hover { border-color: var(--kith-green); }

.cal-popup {
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 4px;
}

/* ─── Calendar internals (shared by popup) ───────────────────────────────── */

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-month-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--kith-text);
}

.cal-nav {
  background: transparent;
  border: none;
  color: var(--kith-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.cal-nav:hover { color: var(--kith-text); }

.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.cal-dow-row span {
  text-align: center;
  font-size: 0.65rem;
  color: var(--kith-text-dim);
  text-transform: uppercase;
  padding: 2px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--kith-text-muted);
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}

.cal-cell.empty {
  pointer-events: none;
}

.cal-cell.day:hover {
  background: var(--kith-surface);
  color: var(--kith-text);
}

.cal-cell.today {
  color: var(--kith-green);
  font-weight: 600;
}

.cal-cell.selected {
  background: var(--kith-green);
  color: #000;
  font-weight: 700;
}

.cal-cell.selected.today {
  color: #000;
}


.reminder-note-input {
  width: 100%;
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-md);
  color: var(--kith-text);
  font-size: var(--text-base);
  font-family: inherit;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.reminder-note-input:focus { border-color: var(--kith-green); }
.reminder-note-input::placeholder { color: var(--kith-text-dim); }

.interpret-confirm {
  background: var(--kith-surface-2);
  border: 1px solid var(--kith-green);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 16px;
}

.interpret-summary {
  font-size: var(--text-base);
  color: var(--kith-text);
  margin-bottom: 12px;
  line-height: 1.5;
}

.interpret-confirm-btns {
  display: flex;
  gap: 10px;
}

.interpret-yes-btn {
  background: var(--kith-green);
  border: none;
  border-radius: var(--radius-lg);
  color: #000;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 8px 20px;
  cursor: pointer;
  font-family: inherit;
}

.interpret-edit-btn {
  background: transparent;
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-lg);
  color: var(--kith-text-muted);
  font-size: var(--text-sm);
  padding: 8px 20px;
  cursor: pointer;
  font-family: inherit;
}

.reminder-save-btn {
  width: 100%;
  margin-top: 20px;
  background: var(--kith-green);
  border: none;
  border-radius: var(--radius-md);
  color: #000;
  font-size: var(--text-base);
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.reminder-save-btn:hover    { opacity: 0.88; }
.reminder-save-btn:disabled { opacity: 0.5; cursor: default; }
