@import url('assets/server-lobby-v1/asset-layout.css');

@font-face {
  font-family: Barlow;
  src: url('assets/fonts/barlow-condensed-black.ttf') format('truetype');
  font-weight: 900;
  font-display: swap;
}

.home-account {
  position: absolute;
  z-index: 55;
  top: 20px;
  right: 2.8%;
  width: clamp(190px, 15.104vw, 290px);
  margin: 0;
}

.home-account > summary {
  position: relative;
  display: block;
  min-height: 48px;
  aspect-ratio: var(--layer-ratio);
  cursor: pointer;
  list-style: none;
  outline-offset: 6px;
}

.home-account > summary::-webkit-details-marker { display: none; }

.home-account__trigger > img {
  position: absolute;
  width: var(--layer-width);
  max-width: none;
  height: auto;
  left: var(--layer-left);
  top: var(--layer-top);
  pointer-events: none;
}

.home-account__label {
  transform: translateY(2px);
  position: absolute;
  inset: 20% 8% 24% 34%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff0ca;
  font: 900 clamp(16px, 1.25vw, 24px) / 1 Barlow, sans-serif;
  text-shadow: 0 2px #42210d;
  white-space: nowrap;
}

.home-account__label svg {
  width: .75em;
  height: .75em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform .2s;
}

.home-account[open] .home-account__label svg { transform: rotate(180deg); }

.home-account__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: max(100%, 240px);
  padding: 16px;
  border: 2px solid #ba8536;
  border-radius: 10px;
  background: linear-gradient(#fff6dc, #f3deb2);
  box-shadow: 0 6px 0 #5b321b, 0 14px 30px #0c295955;
  color: #563519;
}

.home-account__profile {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding: 0 6px 12px;
  border-bottom: 1px solid #bc9458;
}

.home-account__profile small { font-size: 12px; }
.home-account__profile strong { font: 900 23px / 1.2 Barlow, sans-serif; }

.home-account__play {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border-radius: 5px;
  color: inherit;
  font: 700 15px / 1.2 Arial, sans-serif;
  text-decoration: none;
}

.home-account__logout {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 10px;
  border-radius: 5px;
  color: #9c321a;
  font: 700 15px / 1.2 Arial, sans-serif;
  text-decoration: none;
}

.home-account__play:hover,
.home-account__logout:hover { background: #d8b76a40; }

@media (max-width: 700px) {
  .home-account--desktop { display: none; }

  .home-account--mobile {
    top: 20px;
    right: 2.8%;
    width: min(43.424vw, 230px);
    min-width: 0;
  }

  .home-account--mobile .home-account__label { font-size: clamp(14px, 4vw, 19px); }
  .home-account--mobile .home-account__menu { width: max(100%, 220px); }
}
