/**
 * @file
 * Styles pour les notifications AO popup.
 */

/* Overlay */
.ao-notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Modal container */
.ao-notification-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ao-notification-modal.show {
  opacity: 1;
  visibility: visible;
}

.ao-notification-modal.show .ao-notification-overlay {
  opacity: 1;
}

.ao-notification-modal.show .ao-notification-container {
  transform: scale(1);
  opacity: 1;
}

/* Content container */
.ao-notification-container {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  z-index: 10000;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Header */
.ao-notification-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 25px 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ao-notification-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  flex: 1;
  padding-right: 15px;
  line-height: 1.4;
}

.ao-notification-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 6px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.ao-notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Body */
.ao-notification-body {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(80vh - 180px);
}

.ao-notification-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}

.ao-notification-badge.badge-new {
  background: #10b981;
  color: #ffffff;
}

.ao-notification-badge.badge-updated {
  background: #f59e0b;
  color: #ffffff;
}

.ao-notification-message {
  font-size: 16px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}

/* Footer */
.ao-notification-footer {
  padding: 20px 30px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  text-align: right;
}

.ao-notification-link-btn {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ao-notification-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
  color: #ffffff;
  text-decoration: none;
}

.ao-notification-link-btn i {
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.ao-notification-link-btn:hover i {
  transform: translateX(4px);
}

/* RTL Support */
html[dir="rtl"] .ao-notification-title {
  padding-right: 0;
  padding-left: 15px;
}

html[dir="rtl"] .ao-notification-footer {
  text-align: left;
}

html[dir="rtl"] .ao-notification-link-btn i {
  margin-left: 0;
  margin-right: 8px;
  transform: rotate(180deg);
}

html[dir="rtl"] .ao-notification-link-btn:hover i {
  transform: rotate(180deg) translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
  .ao-notification-container {
    width: 95%;
    max-width: none;
    border-radius: 8px;
  }

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

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

  .ao-notification-body {
    padding: 20px;
  }

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

  .ao-notification-footer {
    padding: 15px 20px;
  }

  .ao-notification-link-btn {
    padding: 10px 20px;
    font-size: 14px;
    display: block;
    text-align: center;
  }
}

/* Animation pour entrée en douceur */
@keyframes slideInDown {
  from {
    transform: translate3d(0, -100%, 0) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

.ao-notification-modal.show .ao-notification-container {
  animation: slideInDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll personnalisé pour le body */
.ao-notification-body::-webkit-scrollbar {
  width: 8px;
}

.ao-notification-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.ao-notification-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.ao-notification-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}
