/* Session Warning Components CSS */

/* Base overlay styles - Simplified and Forced Fullscreen */
.session-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647 !important; /* Max z-index */
  backdrop-filter: blur(4px);
  /* opacity: 0; */
  animation: fadeIn 0.2s ease-out forwards;
}

.session-warning-overlay.blocking {
  background: rgba(0, 0, 0, 0.85);
}

/* Main dialog container - Simplified */
.session-warning-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative; /* Ensure it stays in flow of flex center */
  animation: slideUp 0.3s ease-out forwards;
}

/* Dialog header */
.session-warning-header {
  background: #dc2626; /* Red for emergency */
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.session-warning-header i {
  font-size: 20px;
}

.session-warning-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* Dialog content */
.session-warning-content {
  padding: 20px;
  text-align: left;
}

.emergency-message p {
  margin: 0 0 12px 0;
  color: #374151;
  font-size: 15px;
  line-height: 1.5;
}

.emergency-message strong {
  color: #dc2626;
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.emergency-message ul {
  margin: 12px 0;
  padding-left: 20px;
}

.emergency-message li {
  margin-bottom: 6px;
  color: #4b5563;
  font-size: 14px;
}

/* Actions */
.session-warning-actions {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.session-warning-actions button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-warning-primary {
  background: #4f46e5;
  color: white;
}

.btn-warning-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca !important;
}

/* Animations */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile Tweak - Ensure it fits small screens */
@media (max-width: 480px) {
  .session-warning-dialog {
    width: 95%;
    max-height: 90vh;
  }
}

/* Dark mode support */
body.dark-mode .session-warning-dialog {
  background: var(--dark-bg, #1f2937);
  color: var(--dark-text, #f9fafb);
}

body.dark-mode .session-warning-content p {
  color: var(--dark-text, #f9fafb);
}

body.dark-mode .countdown-display {
  background: var(--dark-light-bg, #374151);
  border-color: var(--blue, #4f46e5);
}

body.dark-mode .session-warning-actions {
  background: var(--dark-light-bg, #374151);
}

body.dark-mode .emergency-message li {
  color: var(--dark-text, #f9fafb);
}

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

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
