/* Customer-only feedback styling. Keep feedback beside its source and scope
   changes away from Crew surfaces. */
.ah-body {
  --feedback-error-surface: rgba(45, 30, 30, .96);
  --feedback-error-line: rgba(214, 133, 126, .24);
  --feedback-error-accent: #d9948e;
  --feedback-error-ink: #f2e8e7;
  --feedback-error-secondary: #c8b7b5;
  --feedback-error-hover: rgba(214, 133, 126, .06);
  --customer-feedback-warning: #d6bd8c;
  --customer-feedback-warning-surface: rgba(54, 45, 31, .82);
  --customer-feedback-warning-line: rgba(214, 189, 140, .22);
  --customer-feedback-success: #a4b69c;
  --customer-feedback-info: #a7b3c2;
}

/* Toasts and Django messages use one quiet, translucent notification surface. */
.ah-body .ah-messages,
.ah-body #feedback-toast-container {
  gap: 8px;
}

.ah-body .ah-message {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(28, 29, 33, .96);
  color: #f5f5f7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.ah-body .ah-message.success { border-color: rgba(164, 182, 156, .24); }
.ah-body .ah-message.error { border-color: var(--feedback-error-line); }
.ah-body .ah-message.warning { border-color: var(--customer-feedback-warning-line); }
.ah-body .ah-message.info { border-color: rgba(167, 179, 194, .24); }

.ah-body .ah-message-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ah-body .ah-message-text strong {
  color: #f5f5f7;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.ah-body .ah-message-description {
  color: #c7c7cc;
  font-size: .8125rem;
  font-weight: 400;
}

.ah-body .ah-message.success .ah-message-dot { background: var(--customer-feedback-success); }
.ah-body .ah-message.error .ah-message-dot { background: var(--feedback-error-accent); }
.ah-body .ah-message.warning .ah-message-dot { background: var(--customer-feedback-warning); }
.ah-body .ah-message.info .ah-message-dot { background: var(--customer-feedback-info); }

.ah-body .ah-message-dot,
.ah-body .ah-message.success .ah-message-dot,
.ah-body .ah-message.error .ah-message-dot,
.ah-body .ah-message.warning .ah-message-dot,
.ah-body .ah-message.info .ah-message-dot {
  box-shadow: none;
}

.ah-body .ah-message-close {
  border-radius: 50%;
  color: #aeb0b6;
}

.ah-body .ah-message-close:hover {
  background: rgba(255, 255, 255, .09);
  color: #f5f5f7;
}

.ah-body .ah-msg-pill {
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #e5e5e7 !important;
}

.ah-body .ah-msg-pill.ah-msg-success { border-color: rgba(164, 182, 156, .24) !important; }
.ah-body .ah-msg-pill.ah-msg-error { border-color: var(--feedback-error-line) !important; color: var(--feedback-error-accent) !important; }
.ah-body .ah-msg-pill.ah-msg-warning { border-color: var(--customer-feedback-warning-line) !important; color: var(--customer-feedback-warning) !important; }

/* Validation stays next to the field or action that needs attention. */
.ah-body .ah-main :is(
  .errorlist,
  .ah-form-field-error,
  .ah-profile-field-error,
  .mp-field-error,
  .tp-field-error,
  .ah-field-error,
  .ah-form-error,
  .tp-filter-error
) {
  color: var(--feedback-error-accent);
  font-family: var(--ah-text, system-ui, sans-serif);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ah-body .ah-main :is(.ah-form-errors, .mp-error-banner, .feedback-error-summary) {
  border-color: var(--feedback-error-line) !important;
  border-radius: 16px !important;
  background: var(--feedback-error-surface) !important;
  color: var(--feedback-error-ink) !important;
  box-shadow: none !important;
}

.ah-body .ah-main :is(.ah-auth-lede[role="alert"]:not(.ah-auth-notice--warning), .ah-inline-notice--error) {
  color: var(--feedback-error-accent);
}

.ah-body .ah-main .ah-auth-notice--warning { color: var(--customer-feedback-warning); }

.ah-body .ah-main .ah-inline-notice--error,
.ah-body .ah-main .ah-inline-notice--warning {
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--feedback-error-line);
  border-radius: 14px;
  background: var(--feedback-error-surface);
  line-height: 1.55;
}

.ah-body .ah-main .ah-inline-notice--warning {
  border-color: var(--customer-feedback-warning-line);
  background: var(--customer-feedback-warning-surface);
  color: var(--customer-feedback-warning);
}

.ah-body .ah-main :is(
  .ah-transfer-notice--error,
  .ah-payment-notice--rejected,
  .tp-cart-feedback.is-error
) {
  border-color: var(--feedback-error-line);
  border-radius: 14px;
  background: var(--feedback-error-surface);
  color: var(--feedback-error-accent);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.ah-body .ah-main :is(.ah-transfer-notice--warning, .ah-payment-notice--exception,
  .ah-order-action-banner--pending, .ah-order-action-banner--warning,
  .ah-pickup-missed-alert, .ah-confirm-expiry-note) {
  border-color: var(--customer-feedback-warning-line);
  border-radius: 14px;
  background: var(--customer-feedback-warning-surface);
  color: var(--customer-feedback-warning);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.ah-body .ah-main :is(.ah-transfer-notice--success) {
  border-color: rgba(164, 182, 156, .24);
  border-radius: 14px;
  background: rgba(42, 52, 41, .72);
  color: var(--customer-feedback-success);
  box-shadow: none;
}

.ah-body .ah-main :is(.ah-transfer-notice--info, .ah-order-action-banner--verifying) {
  border-color: rgba(167, 179, 194, .22);
  border-radius: 14px;
  background: rgba(38, 44, 52, .78);
  color: var(--customer-feedback-info);
  box-shadow: none;
}

.ah-body .ah-main :is(.ah-profile-field-error, .mp-field-error) {
  overflow-wrap: anywhere;
}

/* Customer notification history: quiet grouped surfaces and platform-sized controls. */
.ah-notification-history {
  --an-plate-bg: #17181c;
  --an-header-bg: rgba(255, 255, 255, .025);
  --an-feed-bg: rgba(255, 255, 255, .018);
  --an-row-bg: rgba(255, 255, 255, .035);
  --an-row-hover: rgba(255, 255, 255, .065);
  --an-row-unread: rgba(167, 179, 194, .075);
  --an-dock-bg: rgba(255, 255, 255, .025);
  --an-dock-hover: rgba(255, 255, 255, .075);
  --an-border: rgba(255, 255, 255, .12);
  --an-border-subtle: rgba(255, 255, 255, .08);
  --an-border-strong: rgba(255, 255, 255, .2);
  --an-bevel: inset 0 1px 0 rgba(255, 255, 255, .06);
  --an-shadow: 0 14px 36px rgba(0, 0, 0, .32);
  --an-shadow-sm: 0 4px 14px rgba(0, 0, 0, .2);
  --an-text-title: #f5f5f7;
  --an-text-body: #e5e5e7;
  --an-text-muted: #a1a1a6;
  --an-text-dim: #86868b;
  --an-cyan: #a7b3c2;
  --an-cyan-soft: rgba(167, 179, 194, .1);
  --an-cyan-border: rgba(167, 179, 194, .22);
  --an-green: #a4b69c;
  --an-green-soft: rgba(164, 182, 156, .1);
  --an-green-border: rgba(164, 182, 156, .22);
  --an-amber: #d6bd8c;
  --an-amber-soft: rgba(214, 189, 140, .1);
  --an-amber-border: rgba(214, 189, 140, .22);
  --an-crimson: #d9948e;
  --an-crimson-soft: rgba(217, 148, 142, .1);
  --an-crimson-border: rgba(217, 148, 142, .22);
}

.ah-body .ah-notification-history .ah-notif-master-chassis {
  box-shadow: var(--an-shadow), var(--an-bevel);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.ah-body .ah-notification-history .ah-notification-history-row,
.ah-body .ah-notification-history .ah-notification-history-row.is-unread {
  box-shadow: none !important;
  transition: background-color .18s ease, border-color .18s ease, opacity .18s ease;
}

.ah-body .ah-notification-history .ah-notification-history-row:hover {
  box-shadow: none !important;
  transform: none;
}

.ah-body .ah-notification-history .ah-notification-history-row.is-unread {
  border-left-width: 3px !important;
}

.ah-body .ah-notification-history .ah-notification-history-dot,
.ah-body .ah-notification-history .ah-notification-category {
  box-shadow: none !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.ah-body .ah-notification-history :is(.ah-notif-segment-btn, .ah-notification-batch,
  .ah-notif-dismiss-btn, .ah-notif-page-pill) {
  min-height: 44px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.ah-body .ah-notification-history .ah-notif-segment-btn.is-active {
  box-shadow: none;
}

.ah-body .ah-notification-history .ah-notification-category {
  font-family: var(--ah-text, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.ah-body .ah-notification-history .ah-notif-dismiss-btn {
  width: 48px;
  min-width: 48px;
}

/* Header notification sheet shares the same muted materials and status colors. */
.ah-body #ah-customer-bell-dropdown .ah-bell-popover {
  background: rgba(28, 29, 33, .98);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

.ah-body #ah-customer-bell-dropdown .ah-bell-popover-beak {
  background: #1c1d21;
  box-shadow: none;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-popover-title,
.ah-body #ah-customer-bell-dropdown .ah-bell-item-title {
  color: #f5f5f7;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-toolbar-btn {
  min-height: 44px;
  height: auto;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-read-all,
.ah-body #ah-customer-bell-dropdown .ah-bell-history-link {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .12);
  color: #d7d7dc;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-clear-all {
  background: rgba(217, 148, 142, .08);
  border-color: rgba(217, 148, 142, .2);
  color: #d9948e;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-filters.ah-cupertino-segmented-pills button {
  min-height: 44px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-filters.ah-cupertino-segmented-pills button.is-active {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .16);
  color: #f5f5f7;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-swipe-action {
  display: none !important;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-swipe-card {
  background: rgba(255, 255, 255, .035);
  border-color: rgba(255, 255, 255, .085);
}

.ah-body #ah-customer-bell-dropdown .ah-bell-swipe-card:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
}

.ah-body #ah-customer-bell-dropdown .ah-bell-item-icon--ticket {
  background: rgba(167, 179, 194, .1);
  border-color: rgba(167, 179, 194, .2);
  color: #a7b3c2;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-dismiss-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #9A9DA6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .15s ease;
}

.ah-body #ah-customer-bell-dropdown .ah-bell-dismiss-btn:hover {
  background: rgba(196, 81, 75, 0.18);
  border-color: rgba(196, 81, 75, 0.45);
  color: #ff857d;
  transform: scale(1.08);
}

.ah-body #ah-customer-bell-dropdown .ah-bell-dismiss-btn:active {
  background: rgba(196, 81, 75, 0.32);
  border-color: rgba(196, 81, 75, 0.65);
  color: #ff857d;
  transform: scale(0.92);
}

.ah-body #ah-customer-bell-dropdown .ah-bell-toolbar-btn:focus-visible,
.ah-body #ah-customer-bell-dropdown .ah-bell-dismiss-btn:focus-visible,
.ah-body #ah-customer-bell-dropdown .ah-bell-item:focus-visible,
.ah-body #ah-customer-bell-dropdown .ah-bell-load-more:focus-visible {
  outline: 2px solid #c7d2e0;
  outline-offset: 2px;
}

.ah-body #ah-session-warning {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) 12px auto;
  z-index: 1000001;
  width: fit-content;
  max-width: min(560px, calc(100vw - 24px));
  margin-inline: auto;
  padding: 12px 16px;
  border: 1px solid var(--feedback-error-line);
  border-radius: 16px;
  background: rgba(28, 29, 33, .97);
  color: var(--feedback-error-ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .36);
  line-height: 1.5;
  text-align: center;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.ah-body #ah-session-warning a {
  color: #f5f5f7;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 767px) {
  .ah-body details#ah-customer-bell-dropdown[open] .ah-bell-sheet-backdrop {
    background: rgba(0, 0, 0, .56);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .ah-body #ah-customer-bell-dropdown .ah-bell-popover {
    background: #1c1d21 !important;
    border-color: rgba(255, 255, 255, .12) !important;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, .38) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
  }
}

.ah-body .ah-main :is(button, a, input, select, textarea):focus-visible,
.ah-body .ah-message-close:focus-visible,
.ah-body .feedback-retry:focus-visible {
  outline-color: #c7d2e0;
}

@media (prefers-reduced-motion: reduce) {
  .ah-body .ah-message,
  .ah-body .ah-main :is(.ah-notification-history-row, .ah-notif-dismiss-btn,
    .ah-notif-segment-btn, .ah-notif-batch-btn) {
    animation: none !important;
    transition: none !important;
  }
  .ah-body #ah-customer-bell-dropdown .ah-bell-popover { animation: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .ah-body .ah-message {
    background: #1c1d21;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
