/* RBS Forum R25: targeted UI regression fixes on top of R24.
   Prize modal / notification cards / profile friends. Presentation only.
   No purchase, reward, balance, friend or notification callbacks changed. */

/* ========== CASE PRIZE: sharp dialog, no oversized/blurred card ========== */
body.rbs-modern.rbs-breach #prize,
body.rbs-modern.rbs-breach #prize .modal-dialog,
body.rbs-modern.rbs-breach #prize .modal-content {
  filter: none !important;
  -webkit-filter: none !important;
}
body.rbs-modern.rbs-breach #prize .modal-dialog {
  width: min(500px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  margin: max(12px, 3vh) auto !important;
}
body.rbs-modern.rbs-breach #prize .modal-content {
  width: 100%;
  background: linear-gradient(165deg, #162a31 0%, #071b1c 100%) !important;
  background-image: linear-gradient(165deg, #162a31 0%, #071b1c 100%) !important;
  background-size: auto !important;
  border: 1px solid rgba(56, 226, 166, .62) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .70), 0 0 0 1px rgba(56, 226, 166, .08) !important;
  overflow: hidden;
}
body.rbs-modern.rbs-breach #prize .modal-header {
  min-height: 48px;
  padding: 8px 60px 8px 18px;
  background: rgba(9, 43, 37, .85) !important;
  border-bottom: 1px solid rgba(56, 226, 166, .22) !important;
}
body.rbs-modern.rbs-breach #prize .modal-header .close {
  color: #e9fff5 !important;
  background: #14342f !important;
  border: 1px solid rgba(72, 238, 183, .34) !important;
  border-radius: 10px;
  z-index: 2;
}
body.rbs-modern.rbs-breach #prize .modal-body {
  padding: clamp(16px, 3vw, 26px) !important;
  text-align: center;
  overflow-y: auto;
  overflow-x: hidden;
}
body.rbs-modern.rbs-breach #prize .modal-content h4 {
  color: #f0fff7 !important;
  text-transform: none !important;
  text-shadow: none !important;
  font-size: clamp(22px, 4vw, 29px) !important;
  font-weight: 800;
  line-height: 1.25;
  margin: 2px 0 14px !important;
}
body.rbs-modern.rbs-breach #prize #prize_area {
  text-align: center !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 18px !important;
  min-height: 210px;
}
body.rbs-modern.rbs-breach #prize #prize_area .subject-block {
  margin: 0 auto;
  flex: 0 0 auto;
  max-width: 100%;
  transform: none !important;
  -webkit-transform: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}
body.rbs-modern.rbs-breach #prize #prize_area .subject-block img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
body.rbs-modern.rbs-breach #prize .modal-body > p {
  color: #b7d8cb !important;
  font-size: 13px !important;
  line-height: 1.65;
  text-align: center;
  margin: 0 auto 4px;
  max-width: 40ch;
  overflow-wrap: anywhere;
}
/* The third-party case CSS may mark the whole page as blurred. The new AJAX
   no longer adds that class; this selector also protects already-open dialogs. */
body.rbs-modern.rbs-breach #prize.modal-backdrop-blur,
body.rbs-modern.rbs-breach #hidden_modals .modal-backdrop-blur {
  filter: none !important;
  -webkit-filter: none !important;
}

/* ========== NOTIFICATIONS: retain semantic types, unify dark cards ========== */
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block {
  display: block;
  position: relative;
  min-width: 0;
  padding: 18px 48px 17px 20px;
  margin: 0 0 12px;
  border-radius: 14px !important;
  background: linear-gradient(120deg, #112d2b, #0a2022) !important;
  color: #e9fff6 !important;
  border: 1px solid rgba(67, 195, 158, .32) !important;
  border-left: 4px solid #32d99a !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .17) !important;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block.success {
  background: linear-gradient(120deg, #0f362a, #0a2222) !important;
  border-left-color: #40e59f !important;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block.info,
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block.primary {
  background: linear-gradient(120deg, #102f3a, #0b2027) !important;
  border-left-color: #61bdf2 !important;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block.warning {
  background: linear-gradient(120deg, #302a17, #191f1c) !important;
  border-left-color: #efbb60 !important;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block.error,
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block.danger {
  background: linear-gradient(120deg, #381f27, #201b23) !important;
  border-left-color: #fb7280 !important;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block :not(a):not(.m-icon) {
  color: #e9fff6 !important;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block a {
  color: #73e6da !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block > span:not(a):not(.m-icon) {
  color: #a0c5b9 !important;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block > .m-icon.icon-remove {
  position: absolute;
  inset: 9px 9px auto auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(145, 213, 194, .28);
  border-radius: 9px;
  background: #15342f;
  color: #c4e9da !important;
  opacity: 1;
  cursor: pointer;
}
/* Fallback close glyph: independent of legacy m-icon fonts. */
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block > .m-icon.icon-remove {
  font-size: 0 !important;
  background-image: linear-gradient(45deg, transparent 44%, #c4e9da 45%, #c4e9da 55%, transparent 56%),
                    linear-gradient(-45deg, transparent 44%, #c4e9da 45%, #c4e9da 55%, transparent 56%) !important;
  background-size: 14px 14px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block > .m-icon.icon-remove::before,
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block > .m-icon.icon-remove::after {
  content: none !important;
  display: none !important;
}
body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block > .m-icon.icon-remove:hover {
  background: #205044;
  color: #fff !important;
}
body.rbs-modern.rbs-breach #notifications_line .block_head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body.rbs-modern.rbs-breach #notifications_line .block_head .btn {
  position: static !important;
  margin: 0 0 0 auto;
  flex: 0 0 auto;
}

/* ========== PROFILE FRIENDS: no clipped avatars or fading bottom row ========== */
body.rbs-modern.rbs-breach .profile-page .block #friends {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  align-items: start;
  padding: 6px 0 10px;
}
body.rbs-modern.rbs-breach .profile-page .block #friends::after {
  display: none !important;
  content: none !important;
  background: none !important;
}
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend,
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend.playground {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 4px;
  margin: 0 !important;
  width: 100% !important;
  min-width: 0;
  height: auto !important;
  text-align: center;
  border: 1px solid rgba(84, 170, 145, .18);
  background: rgba(13, 41, 39, .5);
  border-radius: 11px;
}
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend:hover {
  border-color: rgba(66, 232, 168, .53);
  background: rgba(18, 61, 48, .65);
}
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend > img {
  width: min(80px, 100%) !important;
  height: 76px !important;
  aspect-ratio: 1;
  border-radius: 10px !important;
  object-fit: cover;
  margin: 0 !important;
}
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend .playground,
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend .playground .frame,
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend .playground .frame img,
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend .playground img {
  width: 76px !important;
  height: 76px !important;
  max-width: 100%;
}
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend > span {
  max-width: 100%;
  width: 100%;
  min-height: 1.4em;
  color: #a5f7d8;
  line-height: 1.35;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend:focus-visible {
  outline: 2px solid #54f5b2;
  outline-offset: 2px;
}
@media (max-width: 575.98px) {
  body.rbs-modern.rbs-breach #prize .modal-body { padding: 16px !important; }
  body.rbs-modern.rbs-breach #notifications_line #notifications .noty-block { padding: 14px 44px 14px 14px; }
  body.rbs-modern.rbs-breach .profile-page .block #friends { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  body.rbs-modern.rbs-breach #prize .modal-dialog,
  body.rbs-modern.rbs-breach .profile-page .block #friends > a.small-friend { transition: none !important; }
}
