/* Clan background, compact navigation and chat polish. */

.clan-frame {
  background-image:
    linear-gradient(180deg, rgba(5, 12, 9, .24) 0%, rgba(5, 12, 9, .48) 48%, rgba(3, 8, 6, .76) 100%),
    url('/assets/clan-background-v20261024-1.webp') !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.clan-title-box,
.clan-header-card,
.clan-panel,
.clan-card,
.clan-member-card,
.clan-request-card {
  border-color: rgba(223, 193, 116, .42);
  background: linear-gradient(125deg, rgba(31, 55, 39, .93), rgba(9, 21, 14, .96));
  box-shadow: inset 0 1px rgba(255, 246, 205, .07), 0 7px 18px rgba(0, 0, 0, .34);
}

.clan-back-button {
  border-color: rgba(229, 197, 119, .62);
  color: #fff0bd;
  background: linear-gradient(145deg, #365e3e, #193021);
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 4px 11px rgba(0, 0, 0, .32);
}

.clan-title-box > img {
  display: none;
}

.clan-title-box::before {
  content: "";
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background-image: url('/assets/clan-nav-icons-v20261024-2.webp') !important;
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 300% 300%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .72));
}

.clan-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: 100%;
  gap: 4px;
  margin: 0 0 10px;
  padding: 5px 4px 8px;
  overflow: visible;
  border-bottom: 1px solid rgba(225, 194, 117, .24);
  background: linear-gradient(180deg, rgba(7, 17, 11, .99) 0%, rgba(7, 17, 11, .97) 78%, rgba(7, 17, 11, .9) 100%);
  box-shadow: 0 9px 14px -11px rgba(0, 0, 0, .95);
  backdrop-filter: blur(8px);
  scrollbar-width: none;
}

.clan-tabs::-webkit-scrollbar {
  display: none;
}

.clan-tabs button {
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 51px;
  min-height: 51px;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 33px 1px 4px;
  overflow: hidden;
  border: 1px solid rgba(191, 211, 174, .25);
  border-radius: 10px;
  color: rgba(235, 235, 208, .78);
  text-align: center;
  text-overflow: clip;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .95);
  white-space: nowrap;
  font-size: clamp(6.5px, 1.8vw, 9px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(145deg, rgba(39, 67, 48, .94), rgba(15, 32, 21, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 3px 8px rgba(0, 0, 0, .28);
}

.clan-tabs button::before {
  content: "" !important;
  position: absolute;
  top: 2px;
  left: 50%;
  width: 31px;
  height: 31px;
  opacity: .9;
  transform: translateX(-50%);
  background-image: url('/assets/clan-nav-icons-v20261024-2.webp') !important;
  background-position: 0 0;
  background-repeat: no-repeat !important;
  background-size: 300% 300% !important;
  filter: saturate(1.03) drop-shadow(0 2px 3px rgba(0, 0, 0, .88));
}

.clan-tabs button::after {
  display: none !important;
}

.clan-tabs button.active {
  border-color: rgba(240, 207, 121, .9);
  color: #fff0b5;
  background: linear-gradient(145deg, #4a714f, #213d2a);
  box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 0 12px rgba(219, 185, 93, .2), 0 4px 9px rgba(0, 0, 0, .38);
}

.clan-tabs button.active::before {
  opacity: 1;
  filter: saturate(1.16) brightness(1.09) drop-shadow(0 2px 4px rgba(0, 0, 0, .9));
}

.clan-tab-overview::before { background-position: 0 0 !important; }
.clan-tab-members::before { background-position: 50% 0 !important; }
.clan-tab-chat::before { background-position: 100% 0 !important; }
.clan-tab-buildings::before { background-position: 0 50% !important; }
.clan-tab-treasury::before { background-position: 50% 50% !important; }
.clan-tab-requests::before { background-position: 100% 50% !important; }
.clan-tab-manage::before { background-position: 0 100% !important; }
.clan-tab-search::before { background-position: 50% 100% !important; }
.clan-tab-create::before { background-position: 100% 100% !important; }

.clan-tabs:has(.clan-tab-search) {
  grid-auto-columns: minmax(62px, 78px);
  justify-content: center;
}

.clan-content {
  scroll-padding-top: 64px;
}

.clan-content > .clan-panel {
  position: relative;
  z-index: 1;
}

.clan-chat-box {
  scroll-behavior: auto !important;
  overflow-anchor: none;
}

@media (max-width: 360px) {
  .clan-tabs {
    gap: 3px;
    padding-inline: 2px;
  }

  .clan-tabs button {
    height: 49px;
    min-height: 49px;
    padding: 32px 0 3px;
    border-radius: 9px;
    font-size: 6.5px;
  }

  .clan-tabs button::before {
    width: 30px;
    height: 30px;
  }
}

/* Dedicated clan-building artwork rendered by the original image nodes. */
.clan-building-icon {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.clan-building-icon > img {
  display: block !important;
  width: 92% !important;
  height: 92% !important;
  object-fit: contain !important;
  filter: saturate(1.08) contrast(1.04) drop-shadow(0 3px 4px rgba(0, 0, 0, .72));
}
