/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Import the TRL design system */
/*

 */

@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700;900&display=swap");

:root {
  --trl-primary: #00a4e4;
  --trl-secondary: #9900ff;
  --trl-accent: #ffdd00;
  --trl-pink: #ff0078;
  --trl-black: #111111;
  --trl-white: #ffffff;
  --trl-gradient: linear-gradient(135deg, var(--trl-primary), var(--trl-secondary));
}

/* Apply base styles to the entire app when the trl-app class is used */
/* .trl-app {
  font-family: "Rubik", sans-serif;
} */

/* Reusable pattern background */
.trl-pattern-bg {
  position: relative;
}

.trl-pattern-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

/* Scanlines effect */
.trl-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.05) 1px,
    rgba(0, 0, 0, 0.05) 2px
  );
  pointer-events: none;
  z-index: 10;
  opacity: 0.3;
}

/* Card container with TRL styling */
.trl-card {
  /* @apply relative rounded-xl shadow-lg overflow-hidden; */
  background: var(--trl-gradient);
  color: var(--trl-white);
}

/* TRL Header styling */
.trl-header {
  /* @apply relative z-10 p-6 text-center; */
  background-color: rgba(0, 0, 0, 0.3);
}

.trl-title {
  /* @apply text-2xl sm:text-3xl font-black uppercase m-0 mb-1; */
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.trl-subtitle {
  /* @apply text-sm sm:text-base; */
  color: rgba(255, 255, 255, 0.8);
}

/* TRL Form styling */
.trl-form {
  /* @apply relative z-10 p-6; */
}

/* TRL Input styling */
.trl-input {
  /* @apply w-full px-4 py-3 mb-4 rounded-md; */
  background-color: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--trl-white);
  transition: all 0.3s;
}

.trl-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.trl-input:focus {
  /* @apply outline-none; */
  border-color: var(--trl-white);
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 10px rgba(0, 164, 228, 0.5);
}

/* Label styling */
.trl-label {
  /* @apply block text-sm font-bold mb-2; */
  color: rgba(255, 255, 255, 0.9);
}

/* TRL Button styling */
.trl-button {
  /* @apply w-full py-3 px-4 rounded-md font-bold uppercase transition-all; */
  position: relative;
  overflow: hidden;
  background-color: var(--trl-accent);
  color: var(--trl-black);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

.trl-button:hover {
  /* @apply transform -translate-y-1; */
  background-color: var(--trl-white);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
}

.trl-button:active {
  /* @apply transform translate-y-0; */
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

/* Links styling */
.trl-link {
  /* @apply font-medium; */
  color: var(--trl-accent);
  transition: all 0.2s;
}

.trl-link:hover {
  color: var(--trl-white);
  text-shadow: 0 0 8px var(--trl-accent);
}

/* Flash message styling */

/* Footer section for forms */
.trl-footer {
  /* @apply mt-4 text-center; */
  color: rgba(255, 255, 255, 0.7);
}

.hidden {
  display: none;
}

.player-list__host-badge {
  margin-left: auto;
  font-size: 0.7em;
  font-weight: bold;
  background-color: var(--primary-accent-color);
  color: var(--background-color);
  padding: 0.2em 0.5em;
  border-radius: 4px;
}

/* Styling for the invite icon */
.player-list__invite-icon {
  margin-left: 0.5em;
  cursor: pointer;
  font-size: 0.9em; /* Adjust size as needed */
}

.player-list__empty {
  color: var(--secondary-text-color);
}

/* Player row accordion panel styles */
.player-row__panel {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    padding 0.3s ease-out;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0 1.5rem; /* Match .trl-form padding */
  margin-top: -1px;
  border-bottom-left-radius: var(--border-radius-md, 0.75rem);
  border-bottom-right-radius: var(--border-radius-md, 0.75rem);
}

.player-row__panel.expanded {
  padding-top: 1rem; /* More space */
  padding-bottom: 1.5rem; /* Match .trl-form padding */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 10rem; /* Set a max-height large enough for content */
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Style the label similar to .trl-label */
.player-row__invite-label {
  display: block;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 500; /* Medium weight */
  margin-bottom: 0.5rem; /* Space below label */
  color: rgba(255, 255, 255, 0.9);
}

/* Container for input and buttons */
.player-row__invite-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Ensure input takes available space */
.player-row__invite-link-input {
  flex-grow: 1; /* Make input take up remaining space */
  /* Inherit styles from .trl-input */
  /* @apply w-full rounded-md; */
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--trl-white, #ffffff);
  transition: all 0.3s;
  font-family: var(--font-mono, monospace);
  font-size: var(--font-size-sm, 0.875rem);
}

.player-row__invite-link-input:focus {
  /* @apply outline-none; */
  border-color: var(--trl-white, #ffffff);
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 10px rgba(0, 164, 228, 0.5);
}

/* Style the copy and share buttons */
.player-row__copy-button,
.player-row__share-button {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.5rem; /* Padding around the icon */
  margin: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--border-radius-md, 0.25rem);
  transition: all var(--transition-fast, 150ms ease-in-out);
  line-height: 1; /* Ensure icon is vertically centered */
  font-size: 1.2em; /* Adjust icon size */
}

.player-row__copy-button:hover,
.player-row__share-button:hover {
  color: var(--trl-white, #ffffff);
  background-color: rgba(255, 255, 255, 0.1);
}

.player-row__copy-button:active,
.player-row__share-button:active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Optional: Style for copied state */
.player-row__copy-button.copied {
  color: var(--trl-accent, #ffdd00);
}

/* Add any other necessary global styles here */
