/* ABOUTME: Styles for the Wikidata-enhanced smart widget interface */
/* ABOUTME: Provides responsive design for suggestion panels and notifications */

/* Suggestions Panel */
.suggestions-panel {
  position: fixed;
  bottom: 90px;
  right: 32px;
  width: 420px;
  max-height: 600px;
  background: #fff;
  border: 1px solid #a2a9b1;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
  z-index: 200;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

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

.suggestions-header {
  background: #f8f9fa;
  border-bottom: 1px solid #a2a9b1;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suggestions-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #202122;
}

.close-suggestions {
  background: none;
  border: none;
  font-size: 24px;
  color: #72777d;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.close-suggestions:hover {
  background: #eaecf0;
  color: #202122;
}

.suggestions-content {
  max-height: 520px;
  overflow-y: auto;
  padding: 0;
}

/* Loading State */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #72777d;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #eaecf0;
  border-top: 3px solid #3366cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner p {
  margin: 0;
  font-size: 0.875rem;
}

/* Suggestions Content */
.suggestions-intro {
  padding: 16px 20px;
  border-bottom: 1px solid #eaecf0;
  background: #f8f9fa;
}

.suggestions-intro p {
  margin: 0;
  font-size: 0.875rem;
  color: #54595d;
  line-height: 1.4;
}

.suggestions-list {
  padding: 8px 0;
}

.suggestion-item {
  display: flex;
  align-items: flex-start;
  padding: 16px 20px;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  gap: 12px;
}

.suggestion-item:hover {
  background: #f8f9fa;
}

.suggestion-item.high {
  border-left-color: #d73027;
}

.suggestion-item.medium {
  border-left-color: #ff8c00;
}

.suggestion-item.low {
  border-left-color: #00af89;
}

.suggestion-icon {
  font-size: 20px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.suggestion-details {
  flex: 1;
  min-width: 0;
}

.suggestion-title {
  margin: 0 0 4px 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #202122;
  line-height: 1.3;
}

.suggestion-description {
  margin: 0 0 8px 0;
  font-size: 0.8125rem;
  color: #54595d;
  line-height: 1.4;
}

.suggestion-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.priority-badge {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-badge.high {
  background: #fee7e6;
  color: #d73027;
}

.priority-badge.medium {
  background: #fef6e7;
  color: #ff8c00;
}

.priority-badge.low {
  background: #e6f7ff;
  color: #00af89;
}

.suggestion-action {
  background: #3366cc;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.suggestion-action:hover {
  background: #2a4b8d;
}

.suggestions-footer {
  padding: 12px 20px;
  border-top: 1px solid #eaecf0;
  background: #f8f9fa;
}

.suggestions-note {
  margin: 0;
  font-size: 0.75rem;
  color: #72777d;
  text-align: center;
  font-style: italic;
}

/* Notification */
.wikidata-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border: 1px solid #a2a9b1;
  border-radius: 4px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  font-size: 0.875rem;
  max-width: 300px;
  display: none;
  animation: slideDown 0.3s ease-out;
}

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

.wikidata-notification.success {
  border-color: #00af89;
  background: #e6f7ff;
  color: #00af89;
}

.wikidata-notification.info {
  border-color: #3366cc;
  background: #eaf3ff;
  color: #3366cc;
}

/* Responsive Design */
@media (max-width: 768px) {
  .suggestions-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
    animation: slideUpMobile 0.3s ease-out;
  }

  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .suggestion-item {
    padding: 12px 16px;
    gap: 10px;
  }

  .suggestion-title {
    font-size: 0.875rem;
  }

  .suggestion-description {
    font-size: 0.8125rem;
  }

  .wikidata-notification {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* Enhanced Smart Widget Trigger */
.smart-widget__trigger {
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.smart-widget__trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.smart-widget__trigger:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .suggestions-panel,
  .wikidata-notification,
  .smart-widget__trigger,
  .suggestion-item {
    animation: none;
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .suggestions-panel {
    border: 2px solid #000;
  }
  
  .suggestion-action {
    border: 1px solid #000;
  }
  
  .priority-badge.high {
    background: #fff;
    border: 1px solid #d73027;
  }
  
  .priority-badge.medium {
    background: #fff;
    border: 1px solid #ff8c00;
  }
  
  .priority-badge.low {
    background: #fff;
    border: 1px solid #00af89;
  }
}