/* ========================================
   Encontro de Conselhos - Stylesheet
   Modern and clean design with light palette
   ======================================== */

/* Base Styles - Material Design */
html,
body {
  height: 100%;
  font-family: "Roboto", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Admin: Histórico de Sessões - Material Design */
.admin-interface {
  background: var(--admin-bg);
}

.admin-interface .card {
  background: var(--admin-card-bg);
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-interface .card-body {
  padding: 24px;
  background: var(--admin-card-bg);
}

/* Corrigir contraste de texto no admin */
.admin-interface .form-control {
  background: var(--white) !important;
  color: var(--dark-color) !important;
  border: 1px solid #ced4da !important;
}

.admin-interface .form-control:disabled {
  background: #e9ecef !important;
  color: #6c757d !important;
  border: 1px solid #ced4da !important;
}

.admin-interface .form-check-label {
  color: var(--dark-color) !important;
}

.admin-interface .speech-queue-container,
.admin-interface .history-container,
.admin-interface .winners-list {
  background: var(--white) !important;
  color: var(--dark-color) !important;
}

.admin-interface .participants-counter,
.admin-interface .winners-title,
.admin-interface .history-title {
  color: var(--dark-color) !important;
}

/* Corrigir WYSIWYG editor */
.admin-interface .note-editor {
  background: var(--white) !important;
  border: 1px solid #ced4da !important;
}

.admin-interface .note-editor .note-editing-area .note-editable {
  background: var(--white) !important;
  color: var(--dark-color) !important;
}

.admin-interface .note-toolbar {
  background: #f8f9fa !important;
  border-bottom: 1px solid #ced4da !important;
}

.admin-interface .note-btn {
  color: var(--dark-color) !important;
}

.history-section {
  background: transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.history-section .history-container {
  background: var(--admin-card-bg);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  max-height: none;
}

.history-section .history-title {
  color: var(--dark-color);
  font-weight: 500;
  margin-bottom: 16px;
}

.history-section .fw-bold {
  color: var(--dark-color);
}

.history-section .small,
.history-section .text-muted {
  color: #757575 !important;
}

.history-section hr {
  border-top: 1px solid #e0e0e0;
  margin: 12px 0;
}

/* Ajustar seção de controle de sessão para ocupar espaço adequado */
.speech-management-controls {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.session-controls {
  flex-shrink: 0;
}

.speech-queue-container {
  flex-shrink: 0;
  margin-bottom: 16px;
}

.history-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body {
  min-height: 100vh;
  background: #fafafa;
  color: #212529;
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Fundo para páginas específicas */
body.tablet-page {
  background: url("/assets/fundo.png") center center / cover no-repeat;
  background-attachment: fixed;
}

body.raffle-page {
  background: url("/assets/fundo.png") center center / cover no-repeat;
  background-attachment: fixed;
}

/* Custom Color Palette */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --white: #ffffff;
  --border-radius: 0.5rem;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);

  /* Nova paleta azul pastel - Material Design */
  --header-blue: #b2bfe0;
  --section-header-blue: #46769b;
  --section-body-blue: #d2d5e1;
  --raffle-primary: #46769b;
  --raffle-secondary: #b2bfe0;
  --raffle-light: #d2d5e1;
  --button-enabled: #5e6782;
  --button-disabled: #b2bfe0;
  --admin-bg: #f5f5f5;
  --admin-card-bg: #ffffff;
  --admin-header-bg: #e0e0e0;
}

/* Layout Components - Material Design */
.tablet-interface,
.admin-interface,
.raffle-interface {
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

.container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: none !important;
}

/* Tablet interface - altura fixa sem scroll */
.tablet-interface {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.tablet-interface .tablet-content {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* Header Styles - Material Design */
.tablet-header {
  background: rgba(178, 191, 224, 0.9) !important;
  color: var(--dark-color) !important;
  border-bottom: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  position: relative;
  height: 80px;
  flex-shrink: 0;
}

.tablet-header .tablet-title {
  display: none;
}

.admin-header {
  background: var(--header-blue);
  color: var(--dark-color);
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.raffle-header {
  background: var(--raffle-primary);
  color: var(--white);
  border-bottom: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Logo no topo */
.page-logo {
  position: absolute;
  top: 8px;
  left: 16px;
  width: 80px;
  height: auto;
  z-index: 10;
}

.raffle-page .page-logo {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  height: 150px;
  margin: 15px auto;
  display: block;
}

.tablet-interface .page-logo {
  width: 170px;
  height: auto;
  margin: 0;
  display: block;
}

.qr-page-logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Card Styles - Material Design */
.card {
  background: var(--white);
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: var(--dark-color);
  transition: none;
}

/* Remover hover effects */
.card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: none;
}

.card-header {
  background: var(--light-color);
  border-bottom: none;
  font-weight: 500;
  color: var(--dark-color);
  border-radius: 8px 8px 0 0;
  padding: 16px 24px;
}

.card-header.bg-primary {
  background: var(--primary-color) !important;
  color: var(--white) !important;
}

.card-header.bg-success {
  background: var(--section-header-blue) !important;
  color: var(--white) !important;
}

.card-header.bg-info {
  background: var(--section-header-blue) !important;
  color: var(--white) !important;
}

.card-header.bg-primary {
  background: var(--section-header-blue) !important;
  color: var(--white) !important;
}

.card-header.bg-warning {
  background: var(--section-header-blue) !important;
  color: var(--white) !important;
}

.card-header.bg-warning {
  background: var(--warning-color) !important;
  color: var(--dark-color) !important;
}

/* Form Elements */
.form-control,
.form-select {
  background: var(--white);
  border-color: #ced4da;
  color: var(--dark-color);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: #6c757d;
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  background: var(--white);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Styles - Material Design */
.btn {
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-width: 1px;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* Remover hover effects */
.btn:hover {
  transform: none;
  box-shadow: none;
}

/* Estados específicos do botão de solicitar fala */
.speech-request-button:disabled {
  background-color: var(--button-disabled) !important;
  border-color: var(--button-disabled) !important;
  color: white !important;
  opacity: 1 !important;
}

.speech-request-button:not(:disabled) {
  background-color: var(--button-enabled) !important;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  text-transform: none;
  transition: none;
}

.btn:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--button-enabled) !important;
  border-color: var(--button-enabled) !important;
}

.btn-primary:disabled {
  background-color: #d2d5e1;
  color: #6c757d;
}

.btn-success {
  background-color: var(--success-color);
  color: var(--white);
}

.btn-success:hover {
  background-color: var(--success-color);
  color: var(--white);
}

.btn-warning {
  background-color: var(--warning-color);
  color: var(--white);
}

.btn-warning:hover {
  background-color: var(--warning-color);
  color: var(--white);
}

.btn-danger {
  background-color: var(--danger-color);
  color: var(--white);
}

.btn-danger:hover {
  background-color: var(--danger-color);
  color: var(--white);
}

/* Speech Request Button Specific Styles */
.speech-request-button {
  background-color: #5e6782;
  color: white;
  text-transform: none;
}

.speech-request-button:disabled {
  background-color: #b2bfe0;
  color: #6c757d;
}

/* QR Code Section - Material Design */
.qr-section {
  background: var(--section-body-blue);
  border: none;
  border-radius: 8px;
  transition: none;
}

/* Remover hover effects */
.qr-section:hover {
  border-color: transparent;
  transform: none;
}

.qr-link img {
  transition: all 0.3s ease;
}

.qr-link:hover img {
  transform: scale(1.05);
}

/* Banner and Image Styles */
.banner-img,
.sponsor-banner {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.carousel-banner {
  border-radius: var(--border-radius);
  object-fit: cover;
  height: 100%;
}

.carousel-item {
  height: 100%;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--border-radius);
  backdrop-filter: blur(5px);
}

/* Information Display */
.info-text {
  overflow: auto;
  height: 100%;
  padding: 1rem;
  background: var(--section-body-blue);
  border-radius: var(--border-radius);
}

/* Seções específicas do tablet - Material Design */
.tablet-interface .card-body {
  background: rgba(210, 213, 225, 0.9);
  padding: 24px;
}

.tablet-interface .speech-controls {
  background: rgba(210, 213, 225, 0.9) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.tablet-interface .information-content {
  background: rgba(210, 213, 225, 0.9) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
}

.tablet-interface .speech-status-message {
  color: var(--dark-color) !important;
  text-align: center;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 80%;
}

.tablet-interface .text-muted {
  color: #495057 !important;
}

/* QR Code seção ajustada */
.tablet-interface .qr-section {
  background: rgba(210, 213, 225, 0.9);
}

.tablet-interface .qr-link img {
  width: 200px;
  height: 200px;
}

.tablet-interface .qr-container h5 {
  font-size: 16px;
}

.tablet-interface .qr-container p {
  font-size: 12px;
}

/* Centralizar carousel no informativo */
.tablet-interface .carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.tablet-interface .carousel-inner {
  height: 100%;
  width: 100%;
}

.tablet-interface .carousel-item {
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tablet-interface .carousel-item img {
  max-width: 100%;
  max-height: 170px !important;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.tablet-interface .carousel-item.active {
  display: flex !important;
}

/* Esconder div de texto se não estiver ativa */
.tablet-interface .text-display {
  width: 100%;
  height: 100%;
}

.tablet-interface .text-display.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 20px;
}

.tablet-interface .text-content {
  color: var(--dark-color);
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
}

.note-dropdown-menu {
	z-index: 2050 !important;
}

.note-color .dropdown-menu {
	z-index: 2050 !important;
}

.note-fontsize .dropdown-menu {
	z-index: 2050 !important;
}

/* Speech Controls */
.speech-status-message {
  font-size: 1.1rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.speech-controls .btn-lg {
  font-size: 1.2rem;
  padding: 0.75rem 1.5rem;
}

/* Queue and Winners Lists */
.speech-queue-container,
.winners-list {
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  background: var(--light-color);
}

.speech-queue-container::-webkit-scrollbar,
.winners-list::-webkit-scrollbar {
  width: 8px;
}

.speech-queue-container::-webkit-scrollbar-track,
.winners-list::-webkit-scrollbar-track {
  background: var(--light-color);
}

.speech-queue-container::-webkit-scrollbar-thumb,
.winners-list::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

/* Raffle Specific Styles - Flat Design baseado no site */
.raffle-interface {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin: 0;
  width: 100%;
  text-align: center;
}

.raffle-interface .container {
  max-width: 800px;
  width: 100%;
  padding: 0;
}

/* Design flat sem cards */
.raffle-interface .raffle-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 60px 40px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(70, 118, 155, 0.15);
}

.raffle-interface .raffle-header {
  margin-bottom: 40px;
  padding: 20px;
}

.raffle-interface .current-raffle-title {
  font-size: 32px;
  font-weight: 300;
  color: var(--white);
}

.raffle-interface .raffle-body {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.raffle-interface .draw-winner-button {
  background: linear-gradient(
    135deg,
    var(--raffle-primary) 0%,
    var(--raffle-secondary) 100%
  );
  border: none;
  color: var(--white);
  border-radius: 50px;
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 6px 20px rgba(70, 118, 155, 0.25);
  transition: all 0.3s ease;
}

.raffle-interface .draw-winner-button:hover {
  background: linear-gradient(
    135deg,
    var(--raffle-primary) 0%,
    var(--raffle-secondary) 100%
  );
  border: none;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(70, 118, 155, 0.3);
}

.raffle-interface .selected-winner-display {
  background: rgba(178, 191, 224, 0.2);
  border: 2px solid var(--raffle-secondary);
  border-radius: 16px;
  color: var(--raffle-primary);
  min-height: 120px;
  font-size: 20px;
  font-weight: 500;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px 0;
  backdrop-filter: blur(5px);
}

.raffle-interface .btn-outline-secondary {
  border: 2px solid var(--raffle-secondary);
  color: var(--raffle-primary);
  background: transparent;
  border-radius: 25px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.raffle-interface .btn-outline-secondary:hover {
  background: var(--raffle-secondary);
  border-color: var(--raffle-secondary);
  color: var(--dark-color);
}

.raffle-interface .participants-counter {
  color: var(--raffle-primary);
  font-weight: 500;
  font-size: 16px;
}

.raffle-interface .sponsor-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(70, 118, 155, 0.2);
}

.raffle-interface .sponsor-banner {
  max-height: 400px;
}

.selected-winner-display {
  background: var(--light-color) !important;
  border: 2px solid var(--primary-color) !important;
  color: var(--dark-color) !important;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    border-color: var(--primary-color);
  }
  50% {
    border-color: var(--success-color);
  }
  100% {
    border-color: var(--primary-color);
  }
}

.winner-name {
  font-size: clamp(2rem, 8vh, 4rem);
  font-weight: 700;
  color: var(--success-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modal Styles */
.modal-content {
  background: var(--white);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  color: var(--dark-color);
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.text-info {
  color: var(--info-color) !important;
}

.text-warning {
  color: #e0a800 !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

/* Animation Classes - Reduzidas */
.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .tablet-title,
  .admin-title {
    font-size: 1.2rem;
  }

  .qr-section {
    margin-bottom: 1rem;
  }

  .speech-controls .btn-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .winner-name {
    font-size: 2rem;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .card {
    background: #2c3e50;
    color: var(--light-color);
    border-color: #34495e;
  }

  .form-control,
  .form-select {
    background: #34495e;
    color: var(--light-color);
    border-color: #4a5f7a;
  }
}

/* Print styles */
@media print {
  .tablet-header,
  .admin-header,
  .raffle-header {
    background: var(--white) !important;
    color: var(--dark-color) !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Raffle Animation Styles */
.raffle-animation {
	min-height: 250px;
}

.slot-machine-container {
	max-width: 400px;
	margin: 0 auto;
}

.slot-display {
	height: 80px;
	overflow: hidden;
	position: relative;
	border: 3px solid #ffc107;
	font-family: 'Courier New', monospace;
	font-weight: bold;
	font-size: 1.2rem;
	background: #000;
	border-radius: 8px;
}

.scrolling-names {
	position: absolute;
	width: 100%;
	animation: none;
	line-height: 80px;
	text-align: center;
	color: #ffc107;
}

.scrolling-names.spinning {
	animation: slot-spin 3s ease-out;
}

@keyframes slot-spin {
	0% { transform: translateY(0); }
	10% { transform: translateY(-400px); }
	20% { transform: translateY(-800px); }
	30% { transform: translateY(-1200px); }
	40% { transform: translateY(-1600px); }
	50% { transform: translateY(-2000px); }
	60% { transform: translateY(-2400px); }
	70% { transform: translateY(-2800px); }
	80% { transform: translateY(-3200px); }
	90% { transform: translateY(-3600px); }
	100% { transform: translateY(-4000px); }
}

.loading-bar-container {
	height: 8px;
	background: #333;
	border-radius: 4px;
	overflow: hidden;
	margin: 16px 0;
}

.loading-bar {
	height: 100%;
	background: linear-gradient(90deg, #ffc107, #fd7e14, #dc3545, #6f42c1, #0d6efd);
	background-size: 200% 100%;
	border-radius: 4px;
	width: 0%;
	animation: none;
}

.loading-bar.loading {
	animation: loading-progress 3s linear, loading-colors 0.5s infinite;
}

@keyframes loading-progress {
	from { width: 0%; }
	to { width: 100%; }
}

@keyframes loading-colors {
	0% { background-position: 0% 50%; }
	100% { background-position: 200% 50%; }
}

.winner-celebration {
	position: relative;
	overflow: hidden;
}


.winner-name-container {
	background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
	border: 3px solid #ffc107;
	box-shadow: 0 8px 32px rgba(0,0,0,0.1);
	transform: scale(1);
	transition: transform 0.3s ease;
	border-radius: 16px;
	padding: 24px;
	margin: 20px 0;
}

.winner-name-container:hover {
	transform: scale(1.05);
}

.winner-name {
	color: #0d6efd;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
	font-size: 3.5rem;
	font-weight: 700;
	margin: 0;
}

@keyframes pulse-glow {
	0%, 100% { 
		text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
	}
	50% { 
		text-shadow: 2px 2px 4px rgba(0,0,0,0.1), 0 0 20px rgba(13, 110, 253, 0.5);
	}
}

.bg-gradient {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.animation-container {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none !important;
	color: white;
	border-radius: 16px;
	padding: 32px;
	margin: 32px 0;
}

.draw-winner-button-animated {
	background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
	border: none;
	color: white;
	padding: 15px 40px;
	font-size: 1.5rem;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 2px;
	border-radius: 50px;
	box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.draw-winner-button-animated:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 40px rgba(40, 167, 69, 0.4);
	background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.draw-winner-button-animated:active {
	transform: translateY(0);
}

.draw-winner-button-animated:disabled {
	background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
	transform: none;
	cursor: not-allowed;
}

.desk-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}