/* Ordivion V0.9.51.15.2 – Farbbrücke für das historische Xity-Design.
 * Keine Layoutgeometrie. Die vorhandene Xity-Struktur liest damit das separat
 * gewählte Farbschema statt eine fest verdrahtete Rot/Weiß-Palette zu erzwingen.
 */

html[data-orv-design="xity"],
html[data-orv-design="xity"] body {
  background: var(--orv-theme-bg) !important;
  color: var(--orv-theme-text) !important;
}

html[data-orv-design="xity"] body,
html[data-orv-design="xity"] .container,
html[data-orv-design="xity"] .gallery-container,
html[data-orv-design="xity"] .gallery-page-layout,
html[data-orv-design="xity"] .edit-media-container,
html[data-orv-design="xity"] .media-upload-container,
html[data-orv-design="xity"] .messages-page,
html[data-orv-design="xity"] .profile-settings-page,
html[data-orv-design="xity"] .profile-hub-page,
html[data-orv-design="xity"] .user-settings-page,
html[data-orv-design="xity"] .mfa-settings-page,
html[data-orv-design="xity"] .highscore-container,
html[data-orv-design="xity"] .tagmask-container {
  color: var(--orv-theme-text) !important;
}

html[data-orv-design="xity"] .top-bar,
html[data-orv-design="xity"] .navi,
html[data-orv-design="xity"] .navigation-bar,
html[data-orv-design="xity"] header.top-bar {
  background: var(--orv-theme-bg-deep) !important;
  color: var(--orv-theme-text) !important;
  border-color: var(--orv-theme-line) !important;
  box-shadow: var(--orv-theme-shadow) !important;
}

html[data-orv-design="xity"] :where(
  .filter-section,
  .workspace-shell,
  .workspace-body,
  .project-sidebar,
  .gallery-item,
  .media-upload-card,
  .upload-inner-panel,
  .user-settings-card,
  .profile-settings-card,
  .profile-business-card,
  .review-create-panel,
  .review-comment-card,
  .media-note-card,
  .message-card,
  .messages-thread,
  .viewer-panel,
  .edit-media-section,
  .tagmask-meta-card,
  details,
  dialog,
  .modal-content
) {
  background: var(--orv-theme-surface) !important;
  color: var(--orv-theme-text) !important;
  border-color: var(--orv-theme-line) !important;
}

html[data-orv-design="xity"] :where(
  .gallery-sticky-controls,
  .workspace-tabs,
  .workspace-context-strip,
  .project-entry,
  .gallery-info,
  .tile-info,
  .tile-compact-info,
  .upload-status-item,
  .upload-status-file-progress,
  .upload-duplicate-item,
  .upload-transfer-status,
  .profile-business-head,
  .media-note-card-header,
  .review-comment-card > header
) {
  background: var(--orv-theme-surface-strong) !important;
  color: var(--orv-theme-text) !important;
  border-color: var(--orv-theme-line) !important;
}

html[data-orv-design="xity"] :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .search-input,
  .filter-input
) {
  background: var(--orv-theme-bg) !important;
  color: var(--orv-theme-text) !important;
  border-color: var(--orv-theme-line-strong) !important;
}

html[data-orv-design="xity"] :where(input, textarea)::placeholder {
  color: var(--orv-theme-text-subtle) !important;
}

html[data-orv-design="xity"] :where(
  .nav-button,
  button,
  .workspace-tab-btn,
  .project-tab-btn,
  .upload-status-clear-btn,
  .upload-status-action-btn
) {
  border-color: var(--orv-theme-line-strong) !important;
}

html[data-orv-design="xity"] :where(
  .nav-button,
  .workspace-tab-btn,
  .project-tab-btn,
  button:not(.danger):not(.danger-button):not(.upload-status-clear-btn)
) {
  background-color: var(--orv-theme-surface-muted);
  color: var(--orv-theme-text);
}

html[data-orv-design="xity"] :where(
  .nav-button:hover,
  .workspace-tab-btn:hover,
  .project-tab-btn:hover,
  button:not(.danger):not(.danger-button):hover
) {
  background-color: var(--orv-theme-surface-hover);
  color: var(--orv-theme-text);
}

html[data-orv-design="xity"] :where(
  .workspace-tab-btn.is-active,
  .project-tab-btn.is-active,
  .nav-button.active,
  .nav-button.is-active
) {
  background: var(--orv-theme-accent) !important;
  border-color: var(--orv-theme-accent-hover) !important;
  color: var(--orv-theme-on-accent) !important;
}

html[data-orv-design="xity"] :where(
  a,
  .project-entry-title,
  .media-note-permalink
) {
  color: var(--orv-theme-accent-hover);
}

html[data-orv-design="xity"] :where(
  .muted,
  small,
  .project-entry-meta,
  .gallery-info-label,
  .user-settings-card-heading p,
  .upload-status-meta dt,
  .upload-transfer-meta dt
) {
  color: var(--orv-theme-text-muted) !important;
}

html[data-orv-design="xity"] :where(
  table,
  th,
  td,
  .table,
  .data-table
) {
  border-color: var(--orv-theme-line) !important;
}

html[data-orv-design="xity"] :where(th, thead td) {
  background: var(--orv-theme-surface-muted) !important;
  color: var(--orv-theme-text) !important;
}

html[data-orv-design="xity"] :where(td, tbody tr) {
  background: var(--orv-theme-surface);
  color: var(--orv-theme-text);
}

html[data-orv-design="xity"] tbody tr:hover td {
  background: var(--orv-theme-surface-hover) !important;
}

html[data-orv-design="xity"] .gallery-item.is-selected,
html[data-orv-design="xity"] .gallery-item.selected {
  border-color: var(--orv-theme-focus) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--orv-theme-focus) 52%, transparent) !important;
}

html[data-orv-design="xity"] .upload-progress,
html[data-orv-design="xity"] progress {
  background: var(--orv-theme-surface-muted) !important;
}

html[data-orv-design="xity"] .upload-status-error {
  background: color-mix(in srgb, var(--orv-theme-danger) 10%, var(--orv-theme-surface)) !important;
  color: var(--orv-theme-text) !important;
  border-color: color-mix(in srgb, var(--orv-theme-danger) 45%, var(--orv-theme-line)) !important;
}

html[data-orv-design="xity"] hr {
  border-color: var(--orv-theme-line) !important;
}
