/* ============================================================
   Reminder Settings — dues & invoice reminder schedule
   ============================================================ */

/* ---------- Master toggle card ---------- */

.reminder-enabled-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--phoa-border);
  border-radius: var(--phoa-r-card);
  background: #fff;
  margin-bottom: 22px;
}

.reminder-enabled-card.is-enabled {
  background: linear-gradient(150deg, #F1FAF4, #FAFEFB);
  border-color: #C4D9C9;
}

.reminder-enabled-card-main {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.reminder-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--phoa-success-bg);
  color: var(--phoa-success-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.reminder-toggle-title {
  font-size: 15.5px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-text);
}

.reminder-toggle-desc {
  font-size: 13px;
  color: var(--phoa-muted-2);
  margin-top: 3px;
  line-height: 1.55;
  max-width: 480px;
}

/* ---------- Config sections ---------- */

.reminder-config {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 22px;
}

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

.reminder-eyebrow {
  font-size: 13px;
  font-weight: var(--phoa-fw-extrabold);
  letter-spacing: 0.04em;
  color: #7A869E;
  margin-bottom: 10px;
}

.reminder-section-header .reminder-eyebrow {
  margin-bottom: 0;
}

.reminder-help-text {
  font-size: 12.5px;
  color: var(--phoa-muted-3);
  margin-top: 4px;
  line-height: 1.5;
}

.reminder-add-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid #CBD6EA;
  background: #fff;
  color: var(--phoa-primary);
  font-size: 13px;
  font-weight: var(--phoa-fw-bold);
  border-radius: 9px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.reminder-add-btn:hover {
  border-color: var(--phoa-primary);
  background: #F5F8FF;
}

/* ---------- Reminder rows list ---------- */

.reminder-list {
  border: 1px solid var(--phoa-border-card);
  border-radius: 13px;
  overflow: hidden;
}

.reminder-list:empty {
  display: none;
}

.reminder-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--phoa-border-divider);
  background: #fff;
  transition: background-color 0.12s ease;
}

.reminder-row:last-child {
  border-bottom: none;
}

.reminder-row:hover {
  background: var(--phoa-subtle-1);
}

.reminder-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: var(--phoa-fw-extrabold);
  white-space: nowrap;
  flex-shrink: 0;
}

.reminder-pill.is-before {
  background: #EEF3FF;
  color: #3B6EF6;
}

.reminder-pill.is-on {
  background: #EAF0FA;
  color: #3E63B4;
}

.reminder-pill.is-after {
  background: #FFF1E8;
  color: #D9822B;
}

.reminder-note {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #5A6580;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-channels {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.reminder-channel-badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.reminder-channel-badge.is-email {
  background: #EEF3FF;
  color: #3B6EF6;
}

.reminder-channel-badge.is-sms {
  background: #E9F7F0;
  color: #1FA463;
}

.reminder-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 4px;
}

.reminder-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--phoa-muted-4);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.reminder-icon-btn:hover {
  background: var(--phoa-bg);
  color: var(--phoa-primary);
}

.reminder-icon-btn.is-danger:hover {
  background: var(--phoa-danger-bg);
  color: var(--phoa-danger-text);
}

.reminder-empty {
  padding: 16px 17px;
  border: 1px solid var(--phoa-border-card);
  border-top: none;
  border-radius: 0 0 13px 13px;
  font-size: 13px;
  color: var(--phoa-muted-3);
  text-align: center;
}

/* ---------- Send time ---------- */

.reminder-sendtime-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reminder-sendtime-input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--phoa-border-input-2);
  border-radius: 11px;
  font-size: 15px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-text);
  outline: none;
  background: #fff;
}

.reminder-sendtime-input:focus {
  border-color: var(--phoa-primary);
}

.reminder-sendtime-row .reminder-help-text {
  margin-top: 0;
  max-width: 320px;
}

/* ---------- Disabled-state warning banner ---------- */

.reminder-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 18px;
  background: #FFF8EC;
  border: 1px solid #F0E2C4;
  border-left: 3px solid #E0A82E;
  border-radius: var(--phoa-r-icon-btn);
  margin-bottom: 22px;
}

.reminder-warning-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--phoa-warning-text);
  font-size: 16px;
}

.reminder-warning-text {
  font-size: 13px;
  color: #7A5B1E;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.reminder-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--phoa-border-divider);
  padding-top: 18px;
}

/* ============================================================
   Add / Edit reminder modal
   ============================================================ */

.reminder-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(20, 30, 70, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}

.reminder-modal-panel {
  width: 100%;
  max-width: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 70px -20px rgba(20, 30, 70, 0.5);
}

.reminder-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--phoa-border-divider);
}

.reminder-modal-title {
  font-size: 19px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-navy);
}

.reminder-modal-sub {
  font-size: 13px;
  color: var(--phoa-muted-3);
  margin-top: 2px;
}

.reminder-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--phoa-muted-3);
  cursor: pointer;
  border: none;
  background: transparent;
  flex-shrink: 0;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.reminder-modal-close:hover {
  background: var(--phoa-subtle-4);
  color: var(--phoa-text);
}

.reminder-modal-body {
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reminder-field-label {
  display: block;
  font-size: 13.5px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-heading);
  margin-bottom: 9px;
}

.reminder-required {
  color: var(--phoa-danger-text);
}

.reminder-optional {
  font-weight: var(--phoa-fw-semibold);
  color: var(--phoa-muted-4);
}

.reminder-when-chips {
  display: flex;
  gap: 9px;
}

.reminder-when-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: var(--phoa-fw-bold);
  cursor: pointer;
  text-align: center;
  border: 1px solid var(--phoa-border-input-2);
  background: #fff;
  color: var(--phoa-muted-1);
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.reminder-when-chip.is-active {
  border-color: var(--phoa-primary);
  background: #F5F8FF;
  color: var(--phoa-primary);
}

.reminder-days-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--phoa-border-input-2);
  border-radius: var(--phoa-r-input);
  overflow: hidden;
  max-width: 240px;
  background: #fff;
}

.reminder-days-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: none;
  font-size: 14.5px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-text);
  outline: none;
}

.reminder-days-suffix {
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  background: var(--phoa-subtle-4);
  color: var(--phoa-muted-1);
  font-size: 13px;
  font-weight: var(--phoa-fw-bold);
  border-left: 1px solid var(--phoa-border);
  white-space: nowrap;
}

.reminder-channel-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.reminder-channel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--phoa-border);
  border-radius: var(--phoa-r-input);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.reminder-channel-row:hover {
  background: var(--phoa-subtle-1);
}

.reminder-channel-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #C6D0E2;
  background: #fff;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.reminder-channel-row.is-checked .reminder-channel-checkbox {
  border-color: var(--phoa-primary);
  background: var(--phoa-primary);
}

.reminder-channel-checkbox::after {
  content: '';
  width: 11px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}

.reminder-channel-row.is-checked .reminder-channel-checkbox::after {
  opacity: 1;
}

.reminder-channel-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.reminder-channel-icon.is-email {
  background: #EEF3FF;
  color: #3B6EF6;
}

.reminder-channel-icon.is-sms {
  background: #E9F7F0;
  color: #1FA463;
}

.reminder-channel-label {
  font-size: 14px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-text);
}

.reminder-textarea {
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--phoa-border-input-2);
  border-radius: var(--phoa-r-input);
  font-size: 14px;
  line-height: 1.55;
  color: var(--phoa-text);
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
}

.reminder-textarea:focus {
  border-color: var(--phoa-primary);
  outline: none;
}

.reminder-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid var(--phoa-border-divider);
}

.reminder-modal-footer button[disabled] {
  background: #C4CFE4;
  border-color: #C4CFE4;
  cursor: not-allowed;
  opacity: 1;
}
