/* ============================================================================
   NOTIFICATIONS.CSS - Sistema de Notificações Customizadas
   ============================================================================
   Sistema completo de notificações modais com logo do Project Maestro
   Substitui alerts/confirms nativos do browser
   ============================================================================ */

/* ============================================
   OVERLAY E BACKDROP
   ============================================ */
.notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
  padding: 20px;
}

.notification-overlay.closing {
  animation: fadeOut 0.2s ease-in forwards;
}

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

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

/* ============================================
   CONTAINER DO MODAL
   ============================================ */
.notification-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-30px) scale(0.95);
  animation: slideDown 0.3s ease-out 0.1s forwards;
  position: relative;
}

.notification-overlay.closing .notification-modal {
  animation: slideUp 0.2s ease-in forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
}

/* ============================================
   CABEÇALHO COM LOGO
   ============================================ */
.notification-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid #E5E7EB;
}

.notification-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.notification-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #1F2937;
  letter-spacing: 0.5px;
}

/* ============================================
   CONTEÚDO
   ============================================ */
.notification-content {
  padding: 32px 24px;
  text-align: center;
}

/* Ícones de Status */
.notification-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  animation: iconPop 0.5s ease-out 0.2s backwards;
}

@keyframes iconPop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.notification-icon.success {
  background: #10B981;
}

.notification-icon.error {
  background: #EF4444;
}

.notification-icon.warning {
  background: #F59E0B;
}

.notification-icon.info {
  background: #3B82F6;
}

.notification-icon svg {
  width: 32px;
  height: 32px;
  fill: white;
  stroke: white;
}

/* Título */
.notification-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1F2937;
}

.notification-title.success {
  color: #10B981;
}

.notification-title.error {
  color: #EF4444;
}

.notification-title.warning {
  color: #F59E0B;
}

.notification-title.info {
  color: #3B82F6;
}

/* Mensagem */
.notification-message {
  font-size: 16px;
  line-height: 1.6;
  color: #4B5563;
  margin-bottom: 16px;
}

/* Área de Detalhes Técnicos (colapsável) */
.notification-details {
  margin-top: 20px;
  text-align: left;
}

.notification-details-toggle {
  background: #F3F4F6;
  border: 1px solid #D1D5DB;
  color: #6B7280;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.notification-details-toggle:hover {
  background: #E5E7EB;
  border-color: #9CA3AF;
}

.notification-details-toggle .arrow {
  transition: transform 0.2s;
}

.notification-details-toggle.expanded .arrow {
  transform: rotate(180deg);
}

.notification-details-content {
  margin-top: 8px;
  padding: 12px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #374151;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  display: none;
}

.notification-details-content.visible {
  display: block;
}

/* Spinner de Loading */
.notification-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #E5E7EB;
  border-top-color: #3B82F6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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

/* ============================================
   RODAPÉ COM BOTÕES
   ============================================ */
.notification-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.notification-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  justify-content: center;
}

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

.notification-btn-primary {
  background: #3B82F6;
  color: white;
}

.notification-btn-primary:hover:not(:disabled) {
  background: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.notification-btn-success {
  background: #10B981;
  color: white;
}

.notification-btn-success:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.notification-btn-danger {
  background: #EF4444;
  color: white;
}

.notification-btn-danger:hover:not(:disabled) {
  background: #DC2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.notification-btn-secondary {
  background: #F3F4F6;
  color: #4B5563;
  border: 1px solid #D1D5DB;
}

.notification-btn-secondary:hover:not(:disabled) {
  background: #E5E7EB;
  border-color: #9CA3AF;
}

.notification-btn-support {
  background: #8B5CF6;
  color: white;
}

.notification-btn-support:hover:not(:disabled) {
  background: #7C3AED;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* ============================================
   RESPONSIVIDADE MOBILE
   ============================================ */
@media (max-width: 480px) {
  .notification-modal {
    max-width: 100%;
    margin: 0;
    border-radius: 12px;
    max-height: 95vh;
  }

  .notification-header {
    padding: 20px 20px 12px;
  }

  .notification-logo {
    height: 40px;
  }

  .notification-content {
    padding: 24px 20px;
  }

  .notification-icon {
    width: 56px;
    height: 56px;
  }

  .notification-icon svg {
    width: 28px;
    height: 28px;
  }

  .notification-title {
    font-size: 18px;
  }

  .notification-message {
    font-size: 15px;
  }

  .notification-footer {
    flex-direction: column;
    padding: 12px 20px 20px;
  }

  .notification-btn {
    width: 100%;
    min-width: auto;
  }
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */
.notification-btn:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

.notification-overlay:focus {
  outline: none;
}

/* Teclado: ESC para fechar */
@media (prefers-reduced-motion: reduce) {
  .notification-overlay,
  .notification-modal,
  .notification-icon {
    animation: none;
  }
}
