.ab-friend-notification-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ab-friend-notification-toggle {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.ab-friend-notification-toggle:hover {
  background: rgba(15, 23, 42, 0.06);
}

.ab-friend-notification-badge {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.ab-friend-notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10020;
  width: min(340px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}

.ab-friend-notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f5;
}

.ab-friend-notification-close,
.ab-friends-modal-card header button {
  border: 0;
  background: transparent;
  font-size: 23px;
  cursor: pointer;
}

.ab-friend-notification-list {
  max-height: 390px;
  overflow-y: auto;
}

.ab-friend-request {
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f5;
}

.ab-friend-request p {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
}

.ab-friend-request p a {
  color: #172033;
  text-decoration: none;
}

.ab-friend-request > div,
.ab-profile-friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ab-friend-request button,
.ab-friend-primary,
.ab-friend-secondary,
.ab-friend-danger {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.ab-friend-request .is-accept,
.ab-friend-primary {
  background: #2563eb;
  color: #fff;
}

.ab-friend-primary:disabled {
  background: #e8efff;
  color: #2453a6;
  cursor: default;
}

.ab-friend-request .is-decline,
.ab-friend-secondary {
  border-color: #cbd5e1;
  background: #fff;
  color: #475569;
}

.ab-friend-danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.ab-profile-friend-actions {
  align-items: center;
  padding: 18px 24px 6px;
}

.ab-friend-feedback {
  flex-basis: 100%;
  min-height: 18px;
  margin: 0;
  color: #526174;
  font-size: 12px;
}

.ab-profile-stats {
  grid-template-columns: repeat(2, 1fr);
}

.ab-profile-stats .ab-friends-list-trigger,
.ab-profile-stats > span {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  background: #fff;
  color: #354052;
  font: inherit;
  text-align: center;
}

.ab-profile-stats .ab-friends-list-trigger {
  cursor: pointer;
}

.ab-profile-stats .ab-friends-list-trigger:hover {
  background: #f7f9fc;
  color: #f97316;
}

.ab-profile-stats > * + * {
  border-left: 1px solid #edf0f5;
}

.ab-friends-modal[hidden],
.ab-friend-notification-panel[hidden],
.ab-friend-notification-badge[hidden],
.ab-friend-danger[hidden] {
  display: none !important;
}

.ab-reviews-modal-card {
  max-width: 560px;
}

.ab-written-reviews-list {
  max-height: min(65vh, 560px);
  overflow-y: auto;
}

.ab-written-review {
  padding: 16px;
  border-bottom: 1px solid #edf0f5;
}

.ab-written-review:last-child {
  border-bottom: 0;
}

.ab-written-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ab-written-review-head time,
.ab-written-review-meta {
  color: #64748b;
  font-size: 13px;
}

.ab-written-review-meta,
.ab-written-review-comment {
  margin: 8px 0 0;
}

.ab-written-review-meta a {
  color: #ea580c;
  font-weight: 600;
  text-decoration: none;
}

.ab-friends-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.ab-friends-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.ab-friends-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(620px, calc(100vh - 36px));
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
}

.ab-friends-modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f5;
}

.ab-friends-modal-card h2 {
  margin: 0;
  font-size: 18px;
}

.ab-friends-modal-list {
  max-height: 520px;
  overflow-y: auto;
  padding: 8px;
}

.ab-friends-modal-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  color: #172033;
  text-decoration: none;
}

.ab-friends-modal-list a:hover {
  background: #f7f9fc;
}

.ab-friend-empty {
  margin: 0;
  padding: 20px 16px;
  color: #7b8796;
  font-size: 13px;
  text-align: center;
}

body.ab-modal-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .ab-friend-notification-panel {
    position: fixed;
    top: 58px;
    right: 8px;
    left: 8px;
    width: auto;
  }

  .ab-profile-friend-actions {
    padding-right: 18px;
    padding-left: 18px;
  }
}
