/* =========================================
   Reset e Variáveis Base
   ========================================= */
:root {
  --bg-color: #f9fafb;
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --error-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --star-color-selected: #fbbf24;
  --star-color-hover: #ba9605;

  
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 
   Configuração das Marcas (Brands)
   Basta trocar a cor primária e a URL do logo correspondente.
*/
body[data-brand="ingresse"] {
  --primary-color: #00A5DB; /* Azul Ingresse */
  --logo-url: url('img/logo-ingresse.svg');
}

body[data-brand="ingresso_live"] {
  --primary-color: #6366f1; /* Cor da Ingresso Live (exemplo) */
  --logo-url: url('img/logo-ingresso-live.svg');
}

body[data-brand="blacktag"] {
  --primary-color: #eab308; /* Amarelo Blacktag (exemplo) */
  /* --bg-color: #111827; Fundo escuro opcional */
  /* --text-color: #f9fafb; */
  /* --text-muted: #9ca3af; */
  /* --border-color: #374151; */
  --logo-url: url('img/logo-blacktag.svg');
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

/* =========================================
   Layout Principal
   ========================================= */
.container {
  background-color: transparent;
  width: 100%;
  max-width: 400px; /* Mobile-first otimizado */
  text-align: center;
}

#brand-logo {
  height: 60px;
  width: 100%;
  background-image: var(--logo-url);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 2rem;
}

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Utilitário para acessibilidade (Screen Readers) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =========================================
   Componente: Estrelas (Rating)
   ========================================= */
.rating-group {
  border: none;
  margin-bottom: 1.5rem;
}

.stars {
  display: flex;
  flex-direction: row; /* Ordem natural: 1 2 3 4 5 */
  justify-content: center;
  gap: 0.5rem;
}

.stars input[type="radio"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.stars label {
  font-size: 2.5rem;
  color: var(--border-color); /* Estrela vazia */
  cursor: pointer;
  transition: color 0.1s ease, transform 0.1s ease;
}

/* Classe que será injetada via JavaScript */
.stars label.filled {
  /* color: var(--primary-color); */
  color: var(--star-color-selected);
  opacity: 1;
}

.stars label:active {
  transform: scale(0.9);
}

.stars input[type="radio"]:focus-visible + label {
  outline: 2px dashed var(--primary-color);
  outline-offset: 4px;
  border-radius: 4px;
}

/* =========================================
   Formulário: Comentário e Botão
   ========================================= */
.comment-group {
  text-align: left;
  margin-bottom: 1.5rem;
}

.comment-group label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: transparent;
  color: var(--text-color);
  font-family: var(--font-family);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

#char-count {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

button {
  width: 100%;
  padding: 0.875rem;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

button:hover {
  opacity: 0.9;
}

button:disabled {
  background-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.7;
}

/* =========================================
   Mensagens de Feedback
   ========================================= */
.hidden {
  display: none !important;
}

.feedback-box {
  padding: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  margin-top: 1rem;
}

.feedback-box.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.feedback-box.warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
  border: 1px solid var(--warning-color);
}

.feedback-box.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border: 1px solid var(--error-color);
}