/* YA-V2 — Compact member notification bell */
.ya-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1100;
}

.ya-notification-button {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(245,200,75,.5);
  border-radius: 50%;
  background: #101827;
  color: #f5c84b;
  font-size: 21px;
  cursor: pointer;
}

.ya-notification-button:hover,
.ya-notification-button:focus-visible {
  border-color: #f5c84b;
  box-shadow: 0 0 10px rgba(245,200,75,.25);
}

.ya-notification-count {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 2px 4px;
  border-radius: 12px;
  background: #b52635;
  color: white;
  font: bold 11px Arial,sans-serif;
  text-align: center;
}

.ya-notification-count[hidden],
.ya-notification-panel[hidden] {
  display: none !important;
}

.ya-notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 24px));
  max-height: 420px;
  overflow-y: auto;
  background: #0b1321;
  border: 1px solid #a8873b;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
  color: #f4f4f4;
  font: 14px Arial,sans-serif;
  padding: 12px;
}

.ya-notification-heading,
.ya-notification-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ya-notification-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid #354052;
}

.ya-notification-panel button {
  background: transparent;
  border: 0;
  color: #f5c84b;
  cursor: pointer;
}

#ya-notification-list {
  padding: 10px 0;
}

.ya-notification-item {
  display: block;
  padding: 10px 4px;
  border-bottom: 1px solid #283347;
  color: #f4f4f4;
  text-decoration: none;
}

.ya-notification-item:hover {
  background: #17243a;
}

.ya-notification-item.unread {
  border-left: 3px solid #f5c84b;
  padding-left: 8px;
}

.ya-notification-settings {
  padding-top: 10px;
  border-top: 1px solid #354052;
}

@keyframes ya-bell-ring {
  0%,100% { transform: rotate(0); }
  20%,60% { transform: rotate(15deg); }
  40%,80% { transform: rotate(-15deg); }
}

.ya-notification-button.ringing {
  animation: ya-bell-ring .55s ease-in-out 2;
}

@media (prefers-reduced-motion: reduce) {
  .ya-notification-button.ringing {
    animation: none;
  }
}

/* YA-V2 — Sliding Chrome Push control */
#ya-push-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #f5c84b;
  border-radius: 8px;
  background: #101827;
  color: #f5c84b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  animation: ya-push-slide 6s ease-in-out both;
}

@keyframes ya-push-slide {
  0% {
    transform: translateX(-35px);
    opacity: 0;
  }
  15%, 75% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-35px);
    opacity: 0;
  }
}

#ya-push-toggle:focus-visible,
#ya-push-toggle:hover {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  #ya-push-toggle {
    animation: none;
  }
}

/* YA-V2 — Mobile notification panel repair */
@media screen and (max-width: 768px) {
  #ya-notification-panel {
    position: fixed !important;
    top: 90px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 70vh;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
    overflow-y: auto;
  }

  .ya-notification-settings {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  #ya-push-toggle {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .ya-notification-item {
    overflow-wrap: anywhere;
  }
}

/* YA-V2 — Mobile viewport alignment */
@media screen and (max-width: 768px) {
  #ya-notification-panel {
    position: fixed !important;
    left: 50vw !important;
    right: auto !important;
    top: 100px !important;
    width: calc(100vw - 32px) !important;
    max-width: 360px !important;
    transform: translateX(-50%) !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
  }
}

/* YA-V2 — Centered mobile notification dropdown */
@media screen and (max-width: 768px) {
  #ya-notification-panel {
    position: fixed !important;
    top: 90px !important;
    left: 0 !important;
    right: 0 !important;
    width: calc(100vw - 32px) !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
  }

  #ya-notification-panel:not([hidden]) {
    animation: ya-center-dropdown .3s ease-out;
  }

  @keyframes ya-center-dropdown {
    from {
      transform: translateY(-20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  #ya-push-toggle {
    animation: none !important;
    opacity: 1 !important;
  }
}
