/**
 * @file
 * Styles for translatable file input UI.
 *
 * Replaces native "Choose File" / "No file chosen" with custom translatable elements.
 */

.translatable-file-input-wrapper {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.translatable-file-button {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: #374151;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.translatable-file-button:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.translatable-file-button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.translatable-file-name {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Ensure the native file input is visually hidden (Drupal core provides
   .visually-hidden; this is a fallback if it's not loaded). */
.translatable-file-input-wrapper input.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
