.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.alert-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.alert-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  transform: scale(0.9);
  animation: slideIn 0.3s ease-out forwards;
  overflow: hidden;
}

@keyframes slideIn {
  to {
    transform: scale(1);
  }
}

.alert-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.alert-icon.warning {
  background: #ffc107;
}

.alert-icon.danger {
  background: #dc3545;
}

.alert-icon.info {
  background: #17a2b8;
}

.alert-icon.success {
  background: #28a745;
}

.alert-title {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.alert-body {
  padding: 20px 24px;
  color: #6c757d;
  line-height: 1.5;
  font-size: 15px;
}

.alert-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #e9ecef;
}

.alert-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.alert-btn-secondary {
  background: #6c757d;
  color: white;
}

.alert-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.alert-btn-primary {
  background: #007bff;
  color: white;
}

.alert-btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.alert-btn-danger {
  background: #dc3545;
  color: white;
}

.alert-btn-danger:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.alert-btn-warning {
  background: #ffc107;
  color: #212529;
}

.alert-btn-warning:hover {
  background: #e0a800;
  transform: translateY(-1px);
}

.alert-btn-success {
  background: #28a745;
  color: white;
}

.alert-btn-success:hover {
  background: #218838;
  transform: translateY(-1px);
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .alert-dialog {
    width: 95%;
    margin: 20px;
  }

  .alert-header,
  .alert-body,
  .alert-footer {
    padding: 16px 20px;
  }

  .alert-footer {
    flex-direction: column;
  }

  .alert-btn {
    width: 100%;
    padding: 12px 20px;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
  .alert-dialog {
    width: 90%;
    margin: 0;
  }

  .alert-header,
  .alert-body,
  .alert-footer {
    padding: 20px 24px;
  }

  .alert-footer {
    flex-direction: row;
  }

  .alert-btn {
    width: auto;
    padding: 10px 20px;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .alert-dialog {
    max-width: 450px;
  }

  .alert-title {
    font-size: 20px;
  }

  .alert-body {
    font-size: 16px;
  }

  .toast-container {
    top: 30px;
    right: 30px;
  }

  .toast {
    min-width: 350px;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .alert-dialog {
    max-width: 500px;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  .alert-dialog {
    max-width: 550px;
  }

  .toast-container {
    top: 40px;
    right: 40px;
  }

  .toast {
    min-width: 400px;
  }
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: unset;
    width: 100%;
  }

  .toast-title {
    font-size: 13px;
  }

  .toast-message {
    font-size: 12px;
  }
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(100%);
  animation: slideInRight 0.3s ease-out forwards;
  border-left: 4px solid;
}

.toast.success {
  border-left-color: #28a745;
}

.toast.error {
  border-left-color: #dc3545;
}

.toast.warning {
  border-left-color: #ffc107;
}

.toast.info {
  border-left-color: #17a2b8;
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.toast.success .toast-icon {
  background: #28a745;
}

.toast.error .toast-icon {
  background: #dc3545;
}

.toast.warning .toast-icon {
  background: #ffc107;
}

.toast.info .toast-icon {
  background: #17a2b8;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: #212529;
  margin: 0 0 4px 0;
  font-size: 14px;
}

.toast-message {
  color: #6c757d;
  margin: 0;
  font-size: 13px;
}

.toast-close {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.toast-close:hover {
  background: #f8f9fa;
}

@keyframes slideInRight {
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  to {
    transform: translateX(100%);
  }
}

.toast.hide {
  animation: slideOutRight 0.3s ease-out forwards;
}
