/* === TOP HEADER BAR – VALORANT STYLE =================================== */

.va-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  /* Tight bar, no vertical padding */
  padding: 0 18px;
  height: 56px;

  display: flex;
  align-items: stretch;
  justify-content: space-between;

  background: linear-gradient(180deg, rgb(0 0 0 / 40%), rgb(255 255 255 / 0%));
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.va-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(148, 163, 184, 0.45),
      transparent);
  pointer-events: none;
}


.va-header-right {
  padding-right: 25px;
}

.va-header-left,
.va-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.va-header-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--txt);
  font-weight: normal;
}

/* Center cluster (tabs + main controls) */

.va-header-center {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  height: 100%;

  display: flex;
  align-items: stretch;
  pointer-events: none;
}

/* Top nav tabs (PLAY / COLLECTION / … vibe) */

.va-header-nav {
  display: none;
}

.va-header-tab {
  position: relative;
  font-family: var(--font-secondary);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.8);
  padding: 0 10px 6px;
}

.va-header-tab--active {
  color: #ffffff;
}

.va-header-tab--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 46px;
  height: 3px;
  background: var(--bg-accent);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

/* === CONTROLS ROW (Single / Team pill – SPIN – TEAM / SETTINGS) ======== */

.wheel-controls {
  pointer-events: auto;

  position: relative;
  height: 100%;
  width: 100%;

  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.wheel-controls-left {
  gap: 20px;
}

.wheel-controls-left,
.wheel-controls-right {
  display: flex;
  padding-left: 115px;
  padding-right: 150px;
  justify-items: center;
  align-items: center;
}

.team-header-selector {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 16px;
  position: relative;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.team-header-selector--active {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.team-header-select-field {
  display: none;
  /* keep native select for logic, hide visually */
}

.team-header-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100px;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--txt);
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.team-header-dropdown--disabled {
  cursor: default;
  opacity: 0.6;
}

.team-header-dropdown-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-header-dropdown-arrow {
  position: absolute;
  right: 10px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
  opacity: 0.9;
}

.team-header-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.75);
  width: 138px;
  max-height: none;
  overflow: visible;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}

.team-header-dropdown--open+.team-header-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.team-header-dropdown-option {
  padding: 6px 12px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  text-align: start;
}

.team-header-dropdown-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.team-header-dropdown-option.is-selected {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--txt);
}

/* Single / Team pill */

.spin-mode-toggle {
  display: inline-flex;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.16);
  height: 30px;
}

.spin-mode-toggle .mode-option {
  padding: 0 16px;
  font-size: 1em;
  font-family: "Tungsten", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 160ms ease-out,
    color 160ms ease-out,
    box-shadow 160ms ease-out,
    transform 140ms ease-out,
    opacity 140ms ease-out;
}

.spin-mode-toggle .mode-option.active,
.spin-mode-toggle .mode-option[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.75);
  color: black;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.55);
  opacity: 1;
  transform: translateY(-1px);
}

.spin-mode-toggle .mode-option:not(.active):not([aria-pressed="true"]) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0.7;
  transform: translateY(0);
}

/* Vertical separators */

.nav-separator {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.35);
  align-self: center;
}

/* SPIN button – big trapezoid in the middle */

.spin-button {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: var(--spin-button-width);

  height: 100%;
  padding: 0 40px;
  /* horizontal only */
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Tungsten", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 2em;

  background: rgba(255, 255, 255, 0.6);
  color: black;
  border: 1px solid rgba(255, 255, 255, 0.6);
  ;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  clip-path: polygon(0% 0%, 100% 0%, 85% 100%, 15% 100%);
  border-radius: 0;
  z-index: 2;
  /* ensure it sits above nav buttons */
}

.spin-button-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  white-space: nowrap;
}

.spin-button-label--single {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.spin-button-label--team {
  opacity: 0;
  transform: translate(-50%, -40%);
}

.spin-button--team .spin-button-label--single {
  opacity: 0;
  transform: translate(-50%, -60%);
}

.spin-button--team .spin-button-label--team {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* keep the centering when animating */
.spin-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
}

.spin-button:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
}

.spin-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* TEAM / SETTINGS buttons – glassy tabs */

.va-nav-btn {
  height: 100%;
  padding: 0 18px;
  width: 150px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Tungsten", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 0.72rem;

  color: var(--txt);
  background: none;
  border: none;
  cursor: pointer;
}

#teamsBtn {
  position: relative;
  width: 200px;
  padding-left: 50px;
  clip-path: polygon(27% 0, 100% 0, 100% 100%, 4% 100%);
}

.va-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
}

.obs-header-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.obs-header-btn {
  width: auto;
  padding-inline: 10px;
}

.obs-header-icon {
  display: block;
  width: 30px;
  height: 30px;
}

.obs-header-caption {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  position: relative;
}

.obs-header-wrapper::after {
  content: 'Copied';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translate(-50%, -6px);
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: #22c55e;
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}

.obs-header-wrapper--copied::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.obs-header-tooltip {
  position: absolute;
  top: 50px;
  max-width: 260px;
  min-width: 100px;
  padding: 4px 8px;
  font-size: 0.7rem;
  line-height: 1.2;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 3px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 140ms ease-out, transform 140ms ease-out;
  white-space: normal;
}

.obs-header-wrapper:hover {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
}

.obs-header-wrapper .va-nav-btn:hover {
  background: unset;
  border-color: unset;
}

.obs-header-wrapper:hover .obs-header-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE TWEAKS ================================================= */

@media (max-width: 1650px) {
  .va-header-title {
    display: none;
  }
}

@media (max-width: 980px) {

  /* Header becomes a compact 2-row column */
  .va-header {
    padding: 6px 8px;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    height: 30px;
  }

  /* Hide big title on mobile to save space */
  .va-header-left {
    display: none;
  }

  /* Hide OBS header on mobile */
  .va-header-right {
    display: none;
  }

  .va-header-center {
    position: static;
    transform: none;
    flex: 1;
    height: auto;
    width: 100%;
    display: block;
    pointer-events: auto;
  }

  /* 2-row grid:
     row1: [ toggle ][ actions ]
     row2: [     team selector  ] */
  .wheel-controls {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 4px;
    align-items: center;
  }

  /* Let children participate directly in the grid */
  .wheel-controls-left {
    display: contents;
    padding: 0;
  }

  /* TEAM / SINGLE toggle – row 1, left */
  .spin-mode-toggle {
    grid-row: 1;
    grid-column: 1;
    height: 28px;
  }

  .spin-mode-toggle .mode-option {
    padding: 0 10px;
    font-size: 0.75rem;
  }

  /* Team selector – row 2, full width */
  .team-header-selector {
    grid-row: auto;
    grid-column: 1 / span 2;

    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -40px;
    /* pushes it just below the header bottom border */
    margin-left: 0;
    align-items: stretch;
  }

  .team-header-dropdown {
    width: 5.6rem;
  }

  .team-header-dropdown-menu {
    left: 0;
    right: auto;
    width: 8rem;
  }

  /* Edit Team / Settings – row 1, right */
  .wheel-controls-right {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
  }

  .va-nav-btn,
  .va-header-btn {
    height: 30px;
    padding-inline: 10px;
    min-width: 0;
    font-size: 0.7rem;
  }

  #teamsBtn {
    width: auto;
    padding-inline: 10px;
    clip-path: none;
    /* simpler shape on mobile */
  }

  /* No spin button in the header on mobile */
  .spin-button {
    display: none !important;
  }

  .obs-header-wrapper {
    display: none !important;
  }
}