@import url("guipo-tokens.css");

html {
  background-color: var(--gs-bg-dark);
}

html.guipo-shell-pending body {
  visibility: hidden;
}

.gs-interface {
  width: min(100% - 2rem, var(--gs-max));
  margin-inline: auto;
}

.gs-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #210303;
  border-bottom: none;
}

.gs-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--gs-header-h);
  position: relative;
}

.gs-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.gs-logo img {
  display: block;
  width: auto;
  height: auto;
  max-height: calc(var(--gs-header-h) - 2px);
  max-width: 142px;
  object-fit: contain;
}

.gs-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.gs-nav a {
  color: var(--gs-text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  transition: color var(--gs-ease), background var(--gs-ease);
}

.gs-nav a:hover,
.gs-nav a.is-active {
  color: var(--gs-gold);
  background: var(--gs-gold-dim);
}

.gs-header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--gs-font);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--gs-ease), box-shadow var(--gs-ease), background var(--gs-ease);
}

.gs-btn--outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: transparent;
}

.gs-btn--outline:hover {
  border-color: var(--gs-gold);
  color: var(--gs-gold);
}

.gs-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gs-border);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.25rem;
}

.gs-nav-short {
  display: none;
}

body.gs-nav-lock {
  overflow: hidden;
}

@media (max-width: 820px) {
  :root {
    --gs-header-h: 64px;
  }

  .gs-interface {
    width: min(100% - 1.25rem, var(--gs-max));
  }

  .gs-menu-toggle {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-left: auto;
    z-index: 201;
  }

  .gs-header__inner {
    gap: 0.75rem;
    min-height: var(--gs-header-h);
  }

  .gs-logo img {
    max-height: calc(var(--gs-header-h) - 2px);
    max-width: 118px;
  }

  .gs-header__actions {
    display: none;
  }

  .gs-header.is-nav-open .gs-header__actions {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(18, 2, 3, 0.98);
    border-top: 1px solid var(--gs-border);
    justify-content: center;
  }

  .gs-header.is-nav-open .gs-header__actions .gs-btn {
    width: 100%;
    max-width: 420px;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .gs-nav {
    display: none;
    position: fixed;
    top: var(--gs-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 199;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem 1.25rem 5.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(18, 2, 3, 0.98);
    border-bottom: 1px solid var(--gs-border);
  }

  .gs-nav.is-open {
    display: flex;
  }

  .gs-nav a {
    padding: 0.9rem 1rem;
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: 10px;
  }

  .gs-nav-mobile-exposed .gs-menu-toggle {
    display: none !important;
  }

  .gs-nav-mobile-exposed .gs-header__inner {
    gap: 0.4rem;
    overflow: hidden;
  }

  .gs-nav-mobile-exposed .gs-logo {
    flex-shrink: 0;
  }

  .gs-nav-mobile-exposed .gs-nav {
    display: flex !important;
    position: static;
    flex: 1;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.05rem;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: none;
    inset: auto;
    bottom: auto;
    z-index: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gs-nav-mobile-exposed .gs-nav::-webkit-scrollbar {
    display: none;
  }

  .gs-nav-mobile-exposed .gs-nav a {
    flex-shrink: 0;
    padding: 0.28rem 0.42rem;
    font-size: 0.68rem;
    font-weight: 500;
    min-height: unset;
    border-radius: 6px;
    white-space: nowrap;
  }

  .gs-nav-mobile-exposed .gs-nav a.is-active {
    color: var(--gs-gold);
    background: var(--gs-gold-dim);
  }

  .gs-nav-mobile-exposed .gs-nav-full {
    display: none;
  }

  .gs-nav-mobile-exposed .gs-nav-short {
    display: inline;
  }
}

@media (max-width: 480px) {
  .gs-interface {
    width: min(100% - 1rem, var(--gs-max));
  }
}
