/* Recipients List */
.recipients-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 20px;
}

.recipients-page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ion-color-dark);
  margin: 0;
}

.recipients-add-btn {
  --background: rgba(109, 40, 217, 0.1);
  --color: var(--ion-color-primary);
  --border-radius: 999px;
  --box-shadow: none;
  --padding-start: 16px;
  --padding-end: 16px;
  font-size: 14px;
  font-weight: 700;
  height: 40px;
  margin: 0;
}

/* Back Button Consistency */
.recipients-back-button {
  --color: var(--color-text-primary);
  --background: #ffffff;
  --background-activated: var(--color-surface-raised);
  --border-radius: 12px;
  --box-shadow: none;
  width: 44px;
  height: 44px;
  margin-left: 8px;
}

.recipients-back-button ion-icon {
  color: var(--color-text-primary);
  font-size: 24px;
}

.recipients-shell {
  padding-bottom: calc(130px + var(--ion-safe-area-bottom, 0px));
}

.search-row {
  margin: 0 20px 12px;
}

.search-input-container {
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 48px;
}

.search-icon {
  font-size: 20px;
  color: var(--ion-color-medium);
  margin-right: 12px;
}

.search-input {
  --padding-start: 0;
  --padding-end: 0;
  --placeholder-color: var(--ion-color-medium);
  --placeholder-opacity: 1;
  font-size: 15px;
  color: var(--ion-color-dark);
}

.recipient-list-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  margin: 0 20px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.rlc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
}

.rlc-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(109, 40, 217, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ion-color-primary);
  font-size: 20px;
  font-weight: 700;
}

.rlc-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rlc-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rlc-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ion-color-dark);
  margin: 0;
}

.rlc-relationship {
  font-size: 13px;
  font-weight: 600;
  color: var(--ion-color-primary);
  background: rgba(109, 40, 217, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.rlc-location {
  font-size: 13px;
  font-weight: 400;
  color: var(--ion-color-medium);
  margin: 0;
}

.rlc-activity {
  font-size: 12px;
  font-weight: 400;
  color: var(--ion-color-medium);
  margin: 2px 0 0;
}

.rlc-chevron {
  font-size: 18px;
  color: #9ca3af;
}

.empty-state-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px;
  margin: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.esc-icon {
  font-size: 44px;
  color: var(--ion-color-primary);
  margin-bottom: 16px;
}

.esc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ion-color-dark);
  margin: 0 0 8px;
}

.esc-msg {
  font-size: 14px;
  font-weight: 400;
  color: var(--ion-color-medium);
  margin: 0 0 20px;
}

/* Recipient Detail */
.recipient-summary-card {
  margin: 20px;
  background: #ffffff;
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.rsc-avatar {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  object-fit: cover;
}

.rsc-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: rgba(109, 40, 217, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ion-color-primary);
  font-size: 32px;
  font-weight: 700;
}

.rsc-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rsc-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--ion-color-dark);
  margin: 0;
}

.rsc-relationship {
  font-size: 14px;
  font-weight: 600;
  color: var(--ion-color-primary);
  margin: 0;
}

.rsc-location {
  font-size: 14px;
  font-weight: 400;
  color: var(--ion-color-medium);
  margin: 0;
}

.rsc-stats-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.rsc-stat-box {
  flex: 1;
  background: #fafafa;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rsc-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--ion-color-dark);
  margin: 0;
}

.rsc-stat-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--ion-color-medium);
  margin: 0;
}

.rsc-cta-btn {
  --background: var(--ion-color-primary);
  --border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  height: 52px;
  margin: 8px 0 0;
}

.detail-section-header {
  margin: 24px 20px 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ion-color-dark);
}

.detail-section-header-with-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.detail-section-header-with-meta h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ion-color-dark);
}

.detail-section-header-with-meta p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ion-color-medium);
  font-weight: 400;
}

.recipient-history-date-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(23, 24, 39, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
  margin-bottom: -2px;
  margin-left: 4px;
}

.recipient-history-stack {
  margin: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recipient-history-item {
  width: 100%;
  border: none;
  background: #ffffff;
  border-radius: 24px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.recipient-history-item.service-grocery,
.recipient-alert-card.service-grocery {
  background: rgba(109, 40, 217, 0.05);
}

.recipient-history-item.service-medication,
.recipient-alert-card.service-medication {
  background: rgba(22, 163, 74, 0.06);
}

.recipient-history-item.service-electricity,
.recipient-alert-card.service-electricity {
  background: rgba(245, 158, 11, 0.08);
}

.recipient-history-item.service-airtime,
.recipient-alert-card.service-airtime {
  background: rgba(249, 115, 22, 0.08);
}

.recipient-history-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recipient-history-badge ion-icon {
  font-size: 18px;
}

.recipient-history-badge.service-grocery,
.recipient-alert-icon-wrap.service-grocery {
  background: rgba(109, 40, 217, 0.1);
  color: #6d28d9;
}

.recipient-history-badge.service-medication,
.recipient-alert-icon-wrap.service-medication {
  background: rgba(22, 163, 74, 0.14);
  color: #16a34a;
}

.recipient-history-badge.service-electricity,
.recipient-alert-icon-wrap.service-electricity {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
}

.recipient-history-badge.service-airtime,
.recipient-alert-icon-wrap.service-airtime {
  background: rgba(249, 115, 22, 0.14);
  color: #ea580c;
}

.recipient-history-badge.service-default,
.recipient-alert-icon-wrap.service-default {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}

.recipient-history-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recipient-history-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.recipient-history-title-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recipient-history-topline h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ion-color-dark);
}

.recipient-history-support-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(23, 24, 39, 0.56);
}

.recipient-history-amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ion-color-primary);
  font-variant-numeric: tabular-nums;
}

.recipient-history-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ion-color-medium);
}

.recipient-history-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recipient-history-meta-row-compact {
  align-items: center;
}

.recipient-history-status {
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.recipient-history-trailing {
  font-size: 16px;
  flex-shrink: 0;
}

.recipient-history-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.recipient-history-detail-chip {
  background: rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recipient-history-share-chip {
  background: rgba(255, 255, 255, 0.78);
  border: none;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: #171827;
}

.recipient-history-share-chip ion-icon {
  font-size: 18px;
  color: var(--ion-color-primary);
  flex-shrink: 0;
}

.recipient-history-share-chip.service-grocery ion-icon {
  color: #6d28d9;
}

.recipient-history-share-chip.service-medication ion-icon {
  color: #16a34a;
}

.recipient-history-share-chip.is-disabled {
  background: rgba(255, 255, 255, 0.52);
  color: rgba(23, 24, 39, 0.42);
  opacity: 0.58;
  cursor: not-allowed;
}

.recipient-history-share-chip.is-disabled ion-icon,
.recipient-history-share-chip.is-disabled .recipient-history-detail-label,
.recipient-history-share-chip.is-disabled .recipient-history-detail-value {
  color: rgba(23, 24, 39, 0.38);
}

.recipient-history-share-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recipient-history-detail-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(23, 24, 39, 0.42);
}

.recipient-history-detail-value {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: #171827;
}

.recipient-history-description {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(23, 24, 39, 0.64);
}

.recipient-history-status.status-created,
.recipient-alert-pill.status-created,
.recipient-history-trailing.status-created,
.recipient-history-status.status-pending,
.recipient-alert-pill.status-pending,
.recipient-history-trailing.status-pending {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.recipient-history-status.status-redeemed,
.recipient-alert-pill.status-redeemed,
.recipient-history-trailing.status-redeemed,
.recipient-history-status.status-completed,
.recipient-alert-pill.status-completed,
.recipient-history-trailing.status-completed {
  background: rgba(22, 163, 74, 0.14);
  color: #16a34a;
}

.recipient-history-status.status-partial,
.recipient-alert-pill.status-partial,
.recipient-history-trailing.status-partial {
  background: rgba(109, 40, 217, 0.12);
  color: #6d28d9;
}

.recipient-history-status.status-default,
.recipient-alert-pill.status-default,
.recipient-history-trailing.status-default {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}

@media (max-width: 360px) {
  .recipient-history-details-grid {
    grid-template-columns: 1fr;
  }
}

.recipient-alerts-stack {
  margin: 0 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recipient-alert-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.recipient-alert-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recipient-alert-icon-wrap ion-icon {
  font-size: 20px;
}

.recipient-alert-icon-wrap.service-medication ion-icon {
  font-size: 22px;
}

.recipient-alert-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recipient-alert-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.recipient-alert-topline h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ion-color-dark);
}

.recipient-alert-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ion-color-medium);
}

.recipient-alert-pill {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.recipient-empty-inline-card {
  margin: 0 20px 8px;
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.recipient-custom-basket-icon {
  display: block;
}

.recipient-empty-inline-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(109, 40, 217, 0.08);
  color: var(--ion-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.recipient-empty-inline-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recipient-empty-inline-copy h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ion-color-dark);
}

.recipient-empty-inline-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ion-color-medium);
}

/* Recipient Form */
.recipient-form-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  margin: 12px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rf-photo-picker {
  background: #f8f7fb;
  border-radius: 24px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.rf-photo-preview {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.rf-photo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(109, 40, 217, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ion-color-primary);
  font-size: 24px;
}

.rf-photo-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ion-color-primary);
}

.rf-photo-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.rf-input-shell {
  min-height: 56px;
  background: #f8f7fb;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 8px 16px 7px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.rf-text-shell,
.rf-phone-shell {
  width: 100%;
  appearance: none;
  border-color: transparent;
  text-align: left;
}

.rf-input-shell:focus-within {
  background: #ffffff;
  border-color: rgba(109, 40, 217, 0.42);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1);
}

.rf-field-label {
  color: rgba(17, 24, 39, 0.62);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0;
}

.rf-input-shell:focus-within .rf-field-label {
  color: var(--ion-color-primary);
}

.rf-field {
  --background: transparent;
  --padding-start: 0;
  --padding-end: 0;
  --padding-top: 0;
  --padding-bottom: 0;
  --color: #111827;
  --placeholder-color: rgba(17, 24, 39, 0.34);
  --placeholder-opacity: 1;
  --highlight-color-focused: transparent;
  --highlight-color-valid: transparent;
  --highlight-color-invalid: transparent;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  min-height: 20px;
  caret-color: var(--ion-color-primary);
}

.rf-field::part(native) {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  padding: 0;
  caret-color: var(--ion-color-primary);
}

.rf-field input::placeholder {
  color: rgba(17, 24, 39, 0.34);
  font-weight: 400;
}

.rf-phone-shell {
  align-items: stretch;
}

.rf-phone-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.rf-phone-prefix {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 76px;
  flex-shrink: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.rf-phone-flag {
  font-size: 17px;
  line-height: 1;
}

.rf-phone-code {
  font-variant-numeric: tabular-nums;
}

.rf-phone-field {
  flex: 1;
  min-width: 0;
}

.rf-phone-hint {
  font-size: 12px;
  color: var(--ion-color-medium);
  margin-top: -4px;
}

.rf-actions {
  margin: 0 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rf-submit-btn {
  --background: var(--ion-color-primary);
  --border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  height: 52px;
  width: 100%;
}

/* Country Bottom Sheet */
.rf-country-trigger {
  width: 100%;
  border: 1.5px solid transparent;
  background: #f8f7fb;
  border-radius: 12px;
  padding: 8px 16px 7px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-align: left;
  min-height: 56px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.rf-country-trigger:focus-visible {
  background: #ffffff;
  border-color: rgba(109, 40, 217, 0.42);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1);
  outline: none;
}

.rf-country-trigger:disabled {
  opacity: 0.6;
}

.rf-country-label {
  font-size: 12px;
  font-weight: 650;
  color: rgba(17, 24, 39, 0.62);
  line-height: 1.1;
  letter-spacing: 0;
}

.rf-country-trigger:focus-visible .rf-country-label {
  color: var(--ion-color-primary);
}

.rf-country-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rf-country-value {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
}

.rf-country-value.is-placeholder {
  color: rgba(17, 24, 39, 0.34);
  font-weight: 400;
}

.rf-country-chevron {
  font-size: 17px;
  color: rgba(17, 24, 39, 0.46);
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.country-sheet-modal {
  --border-radius: 24px 24px 0 0;
  --height: min(560px, 72vh);
}

.country-sheet-modal::part(content) {
  height: min(560px, 72vh);
  max-height: calc(100vh - var(--ion-safe-area-top) - 24px);
  overflow: hidden;
}

.country-sheet-shell {
  height: 100%;
  min-height: 360px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.country-sheet-header {
  min-height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 56px 6px;
  position: relative;
  background: #ffffff;
}

.country-sheet-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ion-color-dark);
}

.country-sheet-close {
  position: absolute;
  right: 12px;
  top: 8px;
  width: 44px;
  height: 44px;
  --padding-start: 0;
  --padding-end: 0;
  --color: var(--ion-color-primary);
  margin: 0;
}

.country-sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: calc(180px + var(--ion-safe-area-bottom));
}

.country-sheet-scroll::-webkit-scrollbar {
  display: none;
}

.country-sheet-list {
  padding: 4px 20px 0;
  background: transparent;
}

.country-sheet-option {
  width: 100%;
  min-height: 52px;
  border: none;
  background: transparent;
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.country-sheet-option:last-child {
  border-bottom: none;
}

.country-sheet-option-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ion-color-primary);
}

.country-sheet-flag {
  font-size: 21px;
  line-height: 1;
  flex-shrink: 0;
}

.country-sheet-name,
.country-sheet-code {
  font-size: 15px;
  line-height: 1.25;
}

.country-sheet-option.is-selected .country-sheet-name,
.country-sheet-option.is-selected .country-sheet-code,
.location-sheet-option.is-selected .location-sheet-name {
  font-weight: 700;
}

.location-sheet-helper {
  margin: 0 20px 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(109, 40, 217, 0.08);
  color: var(--ion-color-primary);
  font-size: 13px;
  line-height: 1.35;
}

.location-sheet-group {
  padding: 0 20px;
}

.location-sheet-group-title {
  margin: 18px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ion-color-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.location-sheet-option {
  padding: 12px 0;
}

.location-sheet-option-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ion-color-primary);
}

.location-sheet-name {
  font-size: 15px;
  line-height: 1.25;
}

.location-sheet-description {
  font-size: 12px;
  line-height: 1.3;
  color: var(--ion-color-medium);
}
