/**
 * Rekaptr Medal Clip Studio - Clean Sidebar Styles with Bottom Settings Bar
 */

.sidebar-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 14px 8px;
}

.brand-icon-square {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon-square img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

/* Active Attached Game Hook Card */
.attached-game-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  cursor: pointer;
  isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.attached-game-card::after {
  content: '';
  position: absolute;
  inset: -4px;
  background-image: var(--attached-card-bg, url('../assets/demo/valorant_hero.jpg'));
  background-size: cover;
  background-position: center;
  filter: blur(1.5px) brightness(0.55);
  z-index: -1;
  transition: filter var(--transition-fast);
}

.attached-game-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.35);
}

.attached-game-card:hover::after {
  filter: blur(1.2px) brightness(0.7);
}

.attached-game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attached-badge-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.attached-game-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-icon-box {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.game-icon-box img,
.game-icon-box svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-info-text {
  display: flex;
  flex-direction: column;
}

.game-info-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.game-info-sub {
  font-size: 11px;
  color: #cbd5e1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* Sidebar Navigation Items */
.sidebar-section-title {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 8px 6px 8px;
}

/* Section title row with a trailing action button (e.g. "+" to add a source) */
.sidebar-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 6px 8px;
}

.sidebar-section-title-row .sidebar-section-title {
  padding: 0;
}

.btn-add-section-item {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-add-section-item:hover {
  background: var(--bg-surface-raised);
  color: #ffffff;
}

.btn-add-section-item svg {
  width: 11px;
  height: 11px;
}

.sidebar-items-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

/* Dedicated spacing between game source cards */
.sidebar-items-list.game-sources-list {
  gap: 10px;
  margin-bottom: 18px;
}

.sidebar-nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.sidebar-nav-button:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.sidebar-nav-button.active {
  background-color: var(--bg-surface-raised);
  color: #ffffff;
  font-weight: 600;
  border-left: 2px solid var(--accent-iris);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Real Game Logo Badges */
.game-logo-badge {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.game-logo-badge img,
.game-logo-badge svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Game Sources with Blurred Artwork Backgrounds (Exact Same Dimensions) */
.sidebar-nav-button.squad-select-item {
  font-size: 13.8px;
}

.sidebar-nav-button.game-select-item {
  position: relative;
  overflow: hidden;
  padding: 6px 10px;
  font-size: 13.8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #ffffff;
  isolation: isolate;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sidebar-nav-button.game-select-item::after {
  content: '';
  position: absolute;
  inset: -4px;
  background-size: cover;
  background-position: center;
  filter: blur(1.5px) brightness(0.55);
  z-index: -1;
  transition: filter var(--transition-fast);
}

.sidebar-nav-button.game-select-item.game-art-rust::after {
  background-image: url('../assets/rust_hero.jpg');
}

.sidebar-nav-button.game-select-item.game-art-marvel::after {
  background-image: url('../assets/demo/marvel_rivals_hero.jpg');
}

.sidebar-nav-button.game-select-item.game-art-valorant::after {
  background-image: url('../assets/demo/valorant_hero.jpg');
}

.sidebar-nav-button.game-select-item.game-art-display::after {
  background-image: url('../assets/art_display_bg.jpg');
}

.sidebar-nav-button.game-select-item.game-art-cs2::after {
  background-image: url('../assets/cs2_hero.jpg');
}

.sidebar-nav-button.game-select-item.game-art-apex::after {
  background-image: url('../assets/apex_hero.jpg');
}

.sidebar-nav-button.game-select-item.game-art-cp2077::after {
  background-image: url('../assets/cp2077_hero.jpg');
}

.sidebar-nav-button.game-select-item.game-art-gtav::after {
  background-image: url('../assets/gtav_hero.jpg');
}

.sidebar-nav-button.game-select-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.sidebar-nav-button.game-select-item:hover::after {
  filter: blur(1.2px) brightness(0.72);
}

.sidebar-nav-button.game-select-item.active {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.sidebar-nav-button.game-select-item.active::after {
  filter: blur(1.2px) brightness(0.7);
}

/* Tier 3: All Games Expander Toggle & Drawer */
.btn-toggle-all-games {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 2px;
}

.btn-toggle-all-games:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
}

.btn-toggle-all-games svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.btn-toggle-all-games.expanded svg {
  transform: rotate(180deg);
}

.extended-games-drawer {
  display: none;
  flex-direction: column;
  gap: 10px;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 2px;
  margin-top: 2px;
}

.extended-games-drawer.open {
  display: flex;
}

.extended-games-drawer::-webkit-scrollbar {
  width: 4px;
}

.extended-games-drawer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Clean Status Pills */
.nav-counter-pill.pill-live {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #34d399;
  font-weight: 700;
}

.nav-counter-pill.pill-fps {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fde047;
  font-weight: 600;
}

.sidebar-nav-button svg {
  width: 14px;
  height: 14px;
  margin-right: 8px;
}

.nav-counter-pill {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-raised);
  color: var(--text-muted);
}

/* Storage Box */
.sidebar-storage-box {
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.storage-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.storage-bar-track {
  width: 100%;
  height: 3px;
  background-color: #1e2130;
  border-radius: 2px;
  overflow: hidden;
}

.storage-bar-fill {
  width: 0.4%;
  height: 100%;
  background: var(--accent-iris);
}

/* Bottom User Profile & Quick Actions Bar (Discord / Medal Style) */
.sidebar-user-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.user-profile-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.user-avatar-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
}

.user-status-online {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-mic);
  border: 1.5px solid var(--bg-surface);
}

.user-gamertag-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}

.sidebar-quick-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-sidebar-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-sidebar-icon:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}

.btn-sidebar-icon svg {
  width: 14px;
  height: 14px;
}
