/**
 * @file
 * Styles for inline color descriptions in form fields.
 */

/* Inline color legend (shown below field) */
.wcg-color-legend-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-left: 4px solid #0074bd;
  border-radius: 4px;
  margin: 8px 0;
  font-size: 13px;
}

.wcg-color-legend-inline strong {
  color: #0074bd;
  margin-right: 8px;
}

.wcg-color-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.wcg-color-box {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.wcg-color-label {
  font-size: 12px;
  color: #212529;
  font-weight: 500;
}

.wcg-color-note {
  font-size: 11px;
  color: #6c757d;
  font-style: italic;
  margin-left: 8px;
}

.wcg-color-label code {
  font-size: 11px;
  color: #6c757d;
  background: #f1f3f5;
  padding: 2px 4px;
  border-radius: 2px;
  font-family: 'Courier New', monospace;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wcg-color-reference-card {
    right: -100%;
    width: calc(100% - 40px);
    max-width: 300px;
  }
  
  .wcg-color-reference-card--visible {
    right: 20px;
  }
  
  .wcg-color-reference-toggle {
    top: auto;
    bottom: 20px;
    right: 20px;
  }
}

/* Animation for initial appearance */
@keyframes wcgSlideIn {
  from {
    right: -320px;
    opacity: 0;
  }
  to {
    right: 20px;
    opacity: 1;
  }
}

.wcg-color-reference-card--visible {
  animation: wcgSlideIn 0.3s ease-out;
}
