/**
 * @file
 * Styles for the WordWeaverPro Save module.
 */

.wordweaverpro-unsaved-changes {
  display: none;
  position: relative;
  transition: all 0.3s ease;
}

.wordweaverpro-unsaved-changes.visible {
  display: block;
  animation: slideDown 0.3s ease-out;
}

.unsaved-message {
  display: flex;
  align-items: center;
}

.unsaved-message::before {
  content: "\F33B";
  margin-right: 0.5em;
  opacity: 0.75;
  display: inline-block;
  visibility: visible;
  font-family: bootstrap-icons;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -0.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

}

/* Animation for showing the message */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulsing animation to draw attention */
.wordweaverpro-unsaved-changes.visible .unsaved-message {
  animation: pulse 2s infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
  .wordweaverpro-unsaved-changes {
    font-size: 12px;
    padding: 8px 12px;
    margin: 8px 0;
  }
  
  .unsaved-message::before {
    font-size: 14px;
    margin-right: 6px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .wordweaverpro-unsaved-changes {
    background-color: #ffff00;
    border-color: #000000;
    color: #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .wordweaverpro-unsaved-changes {
    transition: none;
  }
  
  .wordweaverpro-unsaved-changes.visible {
    animation: none;
  }
  
  .wordweaverpro-unsaved-changes.visible .unsaved-message {
    animation: none;
  }
}
