/* src/css/modals.css */

.glass-dialog {
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  color: #fff;
  width: 80vw;
  height: 80vh;
  max-width: 1000px;
  max-height: calc(800px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Oculta por padrao se dialog nativo */
.glass-dialog:not([open]) {
  display: none;
}

/* Pseudo-elemento do backdrop (fundo opaco) nativo do dialog */
.glass-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: grab; /* Indica que pode ser arrastado no futuro */
}

.dialog-header h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

.close-btn {
  background: transparent;
  border: none;
  color: #ff5c5c;
  font-size: 1.2rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.close-btn:hover {
  background: rgba(255, 92, 92, 0.2);
}

#dialog-content {
  flex: 1;
  padding: 20px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Estilos de injecao dinamica */
#dialog-content iframe,
#dialog-content video {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Botoes Administrativos */
.admin-action-btn {
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.2s;
}
.admin-action-btn:hover {
  opacity: 0.8;
}

/* Modais de Administração - Biblioteca */
.save-section {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 25px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-input {
  flex: 1;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  font-size: 1rem;
  user-select: auto !important; /* CORRIGE O BUG DO INPUT BLOQUEADO */
  min-width: 200px;
  transition: all 0.3s ease;
}

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

.admin-input:focus {
  border-color: #7aa2f7;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(122, 162, 247, 0.3);
}

.admin-btn {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
  user-select: none;
}

.admin-btn-primary {
  background: #7aa2f7;
}

.admin-btn-primary:hover {
  background: #3b4261;
  box-shadow: 0 0 10px rgba(122, 162, 247, 0.5);
}

.admin-btn-secondary {
  background: #6c757d;
}

.admin-btn-secondary:hover {
  background: #5a6268;
}
