/* Shared UI primitives: buttons and form controls */

.val-btn,
.modal-button,
.modal-settings-btn,
.settings-btn,
.agent-pool-clear-btn,
#teamRollBtn,
.agent-sound-actions button {
  font-family: "Tungsten", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 22px;
  font-size: 0.95rem;
  color: var(--txt);
  background: var(--bg);
  border: 2px solid var(--border);
  cursor: pointer;
  outline: none;
  transition: 120ms ease-out;
  user-select: none;
  clip-path: polygon(
    8px 0%,
    100% 0%,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    0% 100%,
    0% 8px
  );
}

/* Settings / Teams / action buttons layout */
.modal-settings-btn,
.settings-btn,
.agent-pool-clear-btn,
#teamRollBtn,
.agent-sound-actions button {
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  color: #ffffff;
  white-space: nowrap;
}

.teams-btn {
  margin-left: 10px;
}


.val-btn:hover,
.modal-button:hover,
.modal-settings-btn:hover,
.settings-btn:hover,
.agent-pool-clear-btn:hover,
#teamRollBtn:hover,
.agent-sound-actions button:hover {
  background: var(--bg-accent);
  border-color: var(--bg-accent);
  color: #fff;
  transform: translateY(-1px);
}

.val-btn:active,
.modal-button:active,
.modal-settings-btn:active,
.settings-btn:active,
.agent-pool-clear-btn:active,
#teamRollBtn:active,
.agent-sound-actions button:active {
  transform: translateY(1px);
  background: #c73a46;
  border-color: #c73a46;
}

button,
input,
select,
textarea {
  font-family: var(--font-secondary);
}

button:focus-visible {
  outline: none;
}

/* Valorant-styled checkboxes */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(7, 7, 12, 0.9);
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin: 0;
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--bg-accent);
  outline-offset: 2px;
}

input[type="checkbox"]:checked {
  border-color: var(--bg-accent);
  background: var(--bg-accent);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 2px 3px 3px 4px;
  border-right: 2px solid #0b0d16;
  border-bottom: 2px solid #0b0d16;
  transform: rotate(35deg);
}

/* Valorant-styled form fields */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
select,
textarea {
  background: rgba(7, 7, 12, 0.9);
  color: var(--txt);
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 8px 10px;
  font-size: 0.95rem;
  box-sizing: border-box;
  font-family: var(--font-text);
}

/* Normalize native select chrome */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
}

/* Custom dropdown arrow wrapper */
.select-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.select-field::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0.9;
}

input[type="color"] {
  padding: 0;
  border: 2px solid var(--border);
  width: 36px;
  height: 36px;
  cursor: pointer;
  background-color: transparent;
  clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
}

/* Shared focus styles for text-like fields */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px white;
}

/* Generic utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loading-gated {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.loading-gated.ready {
  opacity: 1;
  pointer-events: auto;
}

.team-feed-controls {
  display: flex;
  gap: 8px; /* Space between buttons */
  justify-content: center; /* Center the buttons horizontally */
}

/* New styles for team feed control buttons to match header buttons */
.team-feed-controls .modal-button {
  background: none;
  border: none;
  clip-path: none; /* Remove trapezoid shape */
  letter-spacing: 0.10em; /* Match va-nav-btn letter spacing */
  padding: 0 10px; /* Adjust padding to be more compact */
  height: 30px; /* Give them a defined height */
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto; /* Allow width to adjust to content */
  text-transform: uppercase; /* Ensure uppercase */
  font-family: "Tungsten", sans-serif; /* Ensure correct font */
  color: var(--txt); /* Ensure correct text color */
}

.team-feed-controls .modal-button:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
  transform: none; /* Remove translateY from modal-button hover */
}

.team-feed-controls .modal-button:active {
  transform: none; /* Remove translateY from modal-button active */
  background: rgba(255, 255, 255, 0.1); /* Slightly darker on active */
  border-color: rgba(255, 255, 255, 0.45);
}