/* =========================================================
   MY GREY POWER
   MY REMINDERS
   ========================================================= */

.reminders-page {
  display: none;
}

.reminders-page.active-page {
  display: block;
}


/* =========================================================
   HERO
   ========================================================= */

.reminders-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;

  margin-bottom: 28px;
  padding: 28px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--surface);
}

.reminders-hero h1 {
  margin: 6px 0 10px;

  font-size: clamp(
    2rem,
    4vw,
    3.2rem
  );

  line-height: 1;
}

.reminders-hero p {
  max-width: 620px;

  margin: 0;

  color: var(--muted);

  font-size: 1.05rem;
  line-height: 1.7;
}

.reminders-hero-actions {
  display: flex;
  align-items: center;
}


/* =========================================================
   MAIN SECTION
   ========================================================= */

.reminders-section {
  padding: 28px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--surface);
}

.reminders-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;

  margin-bottom: 28px;
}

.reminders-toolbar h2 {
  margin: 6px 0 0;
}


/* =========================================================
   GROUPS
   ========================================================= */

.reminder-group {
  padding: 22px 0;

  border-top: 1px solid var(--border);
}

.reminder-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.reminder-group-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  margin-bottom: 16px;
}

.reminder-group-heading h2 {
  margin: 4px 0 0;

  font-size: 1.35rem;
}

.reminder-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 36px;
  min-height: 36px;

  padding: 6px 10px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: var(--soft);

  font-weight: 800;
}


/* =========================================================
   REMINDER LIST
   ========================================================= */

.reminders-list {
  display: grid;
  gap: 12px;
}

.reminder-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 18px;

  padding: 16px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--soft);
}

.reminder-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 68px;

  padding: 8px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--surface);
}

.reminder-date-day {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.reminder-date-month {
  margin-top: 5px;

  color: var(--muted);

  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reminder-item-copy {
  min-width: 0;
}

.reminder-item-text {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;

  overflow-wrap: anywhere;
}

.reminder-item-meta {
  margin-top: 6px;

  color: var(--muted);

  font-size: 0.9rem;
}

.reminder-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reminders-empty {
  padding: 18px;

  border: 1px dashed var(--border);
  border-radius: 14px;

  color: var(--muted);

  background: var(--soft);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.reminders-primary-action,
.reminders-save-action,
.reminders-secondary-action,
.reminder-done-button,
.reminder-delete-button {
  appearance: none;

  border: 0;
  border-radius: 12px;

  padding: 11px 16px;

  font: inherit;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.15s ease;
}

.reminders-primary-action,
.reminders-save-action,
.reminder-done-button {
  background: #1473e6;
  color: #ffffff;
}

.reminders-secondary-action {
  border: 1px solid var(--border);

  background: var(--surface);
  color: var(--text);
}

.reminder-delete-button {
  border: 1px solid var(--border);

  background: var(--surface);
  color: #a33a3a;
}

.reminders-primary-action:hover,
.reminders-save-action:hover,
.reminders-secondary-action:hover,
.reminder-done-button:hover,
.reminder-delete-button:hover {
  transform: translateY(-1px);
}

.reminders-primary-action:active,
.reminders-save-action:active,
.reminders-secondary-action:active,
.reminder-done-button:active,
.reminder-delete-button:active {
  transform: translateY(0);
}


/* =========================================================
   EDITOR
   ========================================================= */

.reminder-editor {
  position: fixed;
  inset: 0;

  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background: rgba(
    15,
    23,
    42,
    0.42
  );
}

.reminder-editor[hidden] {
  display: none;
}

.reminder-editor-card {
  width: min(
    100%,
    640px
  );

  max-height: 90vh;
  overflow-y: auto;

  padding: 26px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--surface);

  box-shadow:
    0 24px 70px
    rgba(
      15,
      23,
      42,
      0.22
    );
}

.reminder-editor-heading {
  margin-bottom: 20px;
}

.reminder-editor-heading h2 {
  margin: 6px 0 0;
}

.reminder-field {
  display: grid;
  gap: 8px;

  margin-bottom: 18px;
}

.reminder-field label {
  font-weight: 800;
}

.reminder-field label span {
  color: var(--muted);

  font-size: 0.85rem;
  font-weight: 500;
}

.reminder-field textarea,
.reminder-field input {
  width: 100%;
  box-sizing: border-box;

  border: 1px solid var(--border);
  border-radius: 12px;

  padding: 12px 13px;

  background: var(--soft);
  color: var(--text);

  font: inherit;
}

.reminder-field textarea {
  resize: vertical;
}

.reminder-field textarea:focus,
.reminder-field input:focus {
  outline: 2px solid rgba(
    20,
    115,
    230,
    0.2
  );

  border-color: #1473e6;
}

.reminder-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.reminder-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  margin-top: 8px;
}


/* =========================================================
   BOTTOM NOTE
   ========================================================= */

.reminders-note {
  margin-top: 22px;

  padding: 16px 18px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--soft);

  color: var(--muted);
}

.reminders-note strong {
  color: var(--text);
}


/* =========================================================
   DARK MODE
   ========================================================= */

body.dark-theme .reminder-editor {
  background: rgba(
    0,
    0,
    0,
    0.58
  );
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (
  max-width: 760px
) {

  .reminders-hero,
  .reminders-toolbar {
    flex-direction: column;
  }

  .reminders-hero-actions {
    width: 100%;
  }

  .reminders-primary-action {
    width: 100%;
  }

  .reminder-item {
    grid-template-columns: 72px 1fr;
  }

  .reminder-item-actions {
    grid-column: 1 / -1;

    justify-content: flex-end;
  }

  .reminder-field-row {
    grid-template-columns: 1fr;
  }

}

@media (
  max-width: 520px
) {

  .reminders-hero,
  .reminders-section {
    padding: 20px;
  }

  .reminder-item {
    grid-template-columns: 1fr;
  }

  .reminder-date-block {
    align-items: flex-start;
  }

  .reminder-item-actions {
    justify-content: stretch;
  }

  .reminder-item-actions button {
    flex: 1;
  }

  .reminder-form-actions {
    flex-direction: column-reverse;
  }

  .reminder-form-actions button {
    width: 100%;
  }

}