/* Installed rider PWA: keep the existing notification control in the header. */
.app-header .notification-settings--header {
  position: relative;
  flex: 0 0 auto;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.app-header .notification-settings--header > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px;
  min-height: 40px !important;
  padding: 0 13px !important;
  border: 1px solid rgba(255, 255, 255, .19);
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

.app-header .notification-settings--header > summary::-webkit-details-marker {
  display: none;
}

.app-header .notification-settings--header > summary::after {
  display: none !important;
  content: none !important;
}

.app-header .notification-settings--header > summary:hover,
.app-header .notification-settings--header[open] > summary {
  background: rgba(255, 255, 255, .15);
}

.app-header .notification-settings--header > summary:focus-visible {
  outline: 3px solid rgba(132, 169, 255, .5);
  outline-offset: 2px;
}

.app-header .notification-settings--header > summary small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #b8c7df;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.app-header .notification-settings--header > summary small::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #91a0b8;
  content: "";
}

.app-header .notification-settings--header[data-push-state="enabled"] > summary small {
  color: #9ee7c9;
}

.app-header .notification-settings--header[data-push-state="enabled"] > summary small::before {
  background: #37d69a;
  box-shadow: 0 0 0 3px rgba(55, 214, 154, .14);
}

.app-header .notification-settings--header[data-push-state="blocked"] > summary small,
.app-header .notification-settings--header[data-push-state="unsupported"] > summary small {
  color: #ffd6a3;
}

.app-header .notification-settings--header[data-push-state="blocked"] > summary small::before,
.app-header .notification-settings--header[data-push-state="unsupported"] > summary small::before {
  background: #ffae5b;
}

.app-header .notification-settings--header > .notification-settings-card {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(380px, calc(100vw - 24px));
  margin: 0;
  padding: 20px;
  border: 1px solid #dce5f3;
  border-radius: 18px;
  background: #fff;
  color: #142743;
  box-shadow: 0 22px 55px rgba(8, 25, 54, .24);
}

.app-header .notification-settings--header .section-title {
  padding-bottom: 15px;
}

.app-header .notification-settings--header .section-title h2 {
  color: #142743;
  font-size: 18px;
}

.app-header .notification-settings--header .section-title p,
.app-header .notification-settings--header .bank-account-note {
  color: #6f7e94;
}

.app-header .notification-settings--header #toggle-rider-push {
  min-height: 46px !important;
  margin-top: 17px;
  padding: 12px 16px !important;
  border: 0 !important;
  background: linear-gradient(135deg, #356df3, #2857ce) !important;
  color: #fff !important;
  font-size: 13px !important;
}

.app-header .notification-settings--header #toggle-rider-push:disabled {
  opacity: .62;
}

@media (max-width: 820px) {
  .app-header .notification-settings--header > .notification-settings-card {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 92px);
    overflow: auto;
  }
}

@media (min-width: 561px) and (max-width: 620px) {
  body.rider-push-panel-open .app-header {
    padding-bottom: var(--rider-push-panel-space, 252px) !important;
  }

  body.rider-push-panel-open #rider > .rider-mobile-quick-nav {
    top: calc(76px + var(--rider-push-panel-space, 252px));
  }

  .app-header .notification-settings--header > .notification-settings-card {
    /* Open directly below the header; the quick menu is pushed beneath it. */
    top: 84px;
    max-height: calc(100dvh - 100px);
  }
}

@media (max-width: 560px) {
  body.rider-push-panel-open .app-header {
    padding-bottom: var(--rider-push-panel-space, 252px) !important;
  }

  body.rider-push-panel-open #rider > .rider-mobile-quick-nav {
    top: calc(68px + var(--rider-push-panel-space, 252px));
  }

  body.rider-push-header-active .app-header .header-actions > button {
    min-height: 38px;
    padding: 0 8px !important;
    font-size: 11px !important;
  }

  .app-header .notification-settings--header > summary {
    min-height: 38px !important;
    padding: 0 9px !important;
    font-size: 11px;
  }

  .app-header .notification-settings--header > summary small {
    width: 7px;
    overflow: hidden;
    color: transparent !important;
    font-size: 0;
  }

  .app-header .notification-settings--header > summary small::before {
    flex: 0 0 auto;
  }

  .app-header .notification-settings--header > .notification-settings-card {
    /* Open directly below the header; the quick menu is pushed beneath it. */
    top: 76px;
    max-height: calc(100dvh - 92px);
  }

}

@media (max-width: 380px) {
  body.rider-push-header-active .app-header .brand-logo {
    width: 94px !important;
  }

  body.rider-push-header-active .app-header .header-actions {
    gap: 3px;
  }

  body.rider-push-header-active .app-header .header-actions > button {
    padding: 0 6px !important;
    font-size: 10px !important;
  }

  .app-header .notification-settings--header > summary {
    padding: 0 6px !important;
    font-size: 10px;
  }

  .app-header .notification-settings--header > summary small {
    display: none;
  }
}
