/**
 * App overrides on top of Sneat (ThemeSelection MIT).
 * Demo reference: https://demos.themeselection.com/sneat-bootstrap-html-admin-template-free/html/
 */

.buy-now {
  display: none !important;
}

/* Auth pages: horizontal logo + title (single line, slate text, white pill) */
.auth-title-lockup {
  min-width: 0;
  max-width: min(100%, 28rem);
  padding: 0.65rem 1rem 0.65rem 0.85rem;
  background: var(--bs-paper-bg, #fff);
  border: 1px solid rgba(95, 109, 122, 0.12);
  border-radius: 0.85rem 0.45rem 0.45rem 0.85rem;
  box-shadow: 0 0.08rem 0.35rem rgba(47, 43, 61, 0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.auth-title-lockup:hover {
  border-color: rgba(95, 109, 122, 0.22);
  box-shadow: 0 0.15rem 0.5rem rgba(47, 43, 61, 0.1);
}
.auth-title-lockup:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb, 105, 108, 255), 0.45);
  outline-offset: 3px;
}
.auth-title-lockup__title {
  min-width: 0;
  color: #5f6d7a;
  font-weight: 600;
  font-size: clamp(0.8rem, 2.9vw, 1.05rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navbar: name + role beside avatar (Sneat-style user block) */
.navbar-user-meta__name {
  max-width: 12rem;
}

/* Navbar user photo: fill Sneat’s square .avatar box as a true circle (no oval from h-auto) */
.layout-navbar .navbar-dropdown.dropdown-user .avatar img.layout-navbar-user-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.tile-link {
  text-decoration: none;
  color: inherit;
}

.tile {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.375rem rgba(47, 43, 61, 0.12);
  background: var(--bs-paper-bg, #fff);
  border: 1px solid var(--bs-border-color, rgba(47, 43, 61, 0.12));
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.75rem rgba(47, 43, 61, 0.16);
}

.tile-image {
  flex: 1;
  min-height: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Player list tiles: photo fills image area (covers box; hides transparent PNG gaps) */
.player-tile .tile-image {
  position: relative;
  background: var(--bs-gray-200, #ebeef1);
}

.player-tile .tile-image > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-tile .tile-image img.avatar-tile {
  object-fit: cover;
  object-position: center;
}

.player-tile .tile-image .avatar-tile:not(img) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-tile {
  position: relative;
}

.player-tile-status {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0.125rem 0.35rem rgba(47, 43, 61, 0.2);
  pointer-events: none;
}

.player-tile-status--complete .bx {
  color: var(--bs-success, #28c76f);
}

.player-tile-status--partial .bx {
  color: var(--bs-warning, #ff9f43);
}

.player-tile-status--none .bx {
  color: var(--bs-secondary, #8592a3);
}

.player-tile-status--empty .bx {
  color: var(--bs-secondary, #8592a3);
}

.tile-footer {
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  background: var(--bs-paper-bg, #fff);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
}

.tile-image .avatar-tile {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

.tile-image .avatar-tile:not(img) {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  min-height: 0;
  border: none;
}

/* Fixed “photograph” frame for player profile (rate player page) */
.player-profile-photo-frame {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
  border-radius: 0.375rem;
  overflow: hidden;
  background: var(--bs-gray-100, #f5f5f9);
  border: 1px solid var(--bs-border-color, rgba(47, 43, 61, 0.12));
  box-shadow:
    0 0.25rem 0.5rem rgba(47, 43, 61, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.player-profile-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (min-width: 992px) {
  .player-profile-photo-frame {
    max-width: 248px;
  }
}

.player-profile-photo-frame--placeholder {
  font-size: 2.35rem;
  min-height: 0;
}

.player-rate-sidebar-name,
.player-rate-sidebar-blurb {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.player-rate-sidebar-name {
  max-width: 20rem;
}

.player-rate-sidebar-blurb {
  max-width: 22rem;
}

.star-row {
  display: inline-flex;
  gap: 2px;
  user-select: none;
}

.star-row button.star {
  border: none;
  background: transparent;
  padding: 0 1px;
  line-height: 1;
  font-size: 1.1rem;
  color: var(--bs-gray-300, #e4e6ef);
  cursor: pointer;
}

.star-row button.star.active {
  color: var(--bs-warning, #ffab00);
}

.star-row button.star:hover,
.star-row button.star:focus {
  color: var(--bs-warning, #ffab00);
  opacity: 0.85;
}

/* Shared inline rating widget (Hive games + per-player rating) */
.hive-rating-stars {
  display: inline-flex;
  gap: 0.08rem;
  color: #ffab00;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

.hive-rate-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.hive-rate-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  cursor: pointer;
  user-select: none;
}

.hive-rate-star-btn {
  border: 0;
  background: transparent;
  color: #d6d9e0;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
  width: 1rem;
  text-align: center;
}

.hive-rate-star-btn.is-on {
  color: #ffab00;
}

.hive-rate-status {
  font-size: 0.74rem;
  color: #8592a3;
}

.hive-rate-clear-btn {
  border: 0;
  background: transparent;
  color: #8592a3;
  line-height: 1;
  padding: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.hive-rate-clear-btn i {
  font-size: 1rem;
  line-height: 1;
}

.hive-rate-clear-btn:hover,
.hive-rate-clear-btn:focus {
  color: #ea5455;
  background: rgba(234, 84, 85, 0.1);
  outline: none;
}

.hive-rate-clear-btn[hidden] {
  display: none !important;
}

/* Global page loader overlay */
.app-page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 245, 249, 0.85);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.app-page-loader--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.app-page-loader__gif {
  width: min(180px, 36vw);
  height: min(180px, 36vw);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

body.app-page-loading {
  overflow: hidden;
}

/* ---- Club member badge -------------------------------------------------- */
.user-avatar-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  line-height: 0;
}
/* When a .user-avatar-wrap is nested inside Sneat's fixed-size .avatar box
   (e.g. the navbar), it should fill the parent so the inner <img>'s
   width/height: 100% rules still resolve to the intended pixel size. */
.avatar > .user-avatar-wrap {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.avatar > .user-avatar-wrap > img,
.avatar > .user-avatar-wrap > .avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}
.user-club-pip {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5b400 0%, #ff8a00 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  line-height: 1;
}
.user-club-pip i {
  font-size: 0.65rem;
  line-height: 1;
}
.user-club-pip--lg {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.95rem;
  bottom: 0;
  right: 0;
  border-width: 3px;
}
.user-club-pip--lg i {
  font-size: 1rem;
}
.club-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7e0 0%, #ffe2b3 100%);
  color: #8a5a00;
  border: 1px solid rgba(245, 180, 0, 0.55);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.club-member-chip i {
  color: #d68a00;
  font-size: 0.85rem;
}
.club-member-chip--sm {
  font-size: 0.62rem;
  padding: 0.04rem 0.4rem;
}
.club-member-chip--sm i {
  font-size: 0.72rem;
}
