/**
 * @file
 * Content X styles - Minimal, clean design.
 */

/* Layout with sidebar */
.content-x-layout {
  display: flex;
  gap: var(--gin-spacing-xl, 2rem);
  padding: 0;
}

/* Sidebar */
.content-x-sidebar {
  width: 220px;
  flex-shrink: 0;
  padding-top: 0;
}

.content-x-sidebar-section {
  margin-bottom: var(--gin-spacing-xl, 2rem);
}

/* Sidebar header */
.content-x-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 12px;
}

.content-x-sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gin-color-text-light, #6b7280);
  margin: 0;
}

/* Hidden form */
.content-x-hidden-form {
  display: none;
}

/* Search group (space select + author select + search input) */
.content-x-search-group {
  display: flex;
  flex: 1;
  height: 56px;
  border: 2px solid var(--gin-border-color, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.content-x-search-group:focus-within {
  border-color: var(--gin-color-primary, #003cc5);
  box-shadow: 0 0 0 3px rgba(0, 60, 197, 0.1);
}

.content-x-group-select {
  height: 100%;
  min-width: 140px;
  max-width: 180px;
  padding: 0 32px 0 20px;
  border: none;
  border-right: 1px solid var(--gin-border-color, #e5e7eb);
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 15px;
  font-weight: 500;
  color: var(--gin-color-text, #374151);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: background-color 0.15s ease;
}

.content-x-group-select:hover {
  background-color: var(--gin-color-primary-light, rgba(0, 60, 197, 0.05));
}

.content-x-group-select:focus {
  outline: none;
  background-color: var(--gin-color-primary-light, rgba(0, 60, 197, 0.05));
}

/* Toolbar search */
.content-x-toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.content-x-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gin-color-text-light, #9ca3af);
  pointer-events: none;
  width: 22px;
  height: 22px;
}

/* Search input */
.content-x-search-input {
  width: 100%;
  height: 100%;
  padding: 0 20px 0 52px;
  border: none;
  border-radius: 0;
  font-size: 16px;
  background: transparent;
  color: var(--gin-color-text, #111827);
}

.content-x-search-input:focus {
  outline: none;
}

.content-x-search-input::placeholder {
  color: var(--gin-color-text-light, #9ca3af);
}

/* Filter list - matches DAM folder styling */
.content-x-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--gin-border-color-layer, #e5e5e5);
  border-radius: var(--gin-border-radius, 8px);
  background: var(--gin-bg-layer, #fff);
  overflow: hidden;
}

.content-x-filter-list-item {
  position: relative;
  border-bottom: 1px solid var(--gin-border-color-layer, #e5e5e5);
}

.content-x-filter-list-item:last-child {
  border-bottom: none;
}

.content-x-filter-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-xs, 0.5rem);
  padding: var(--gin-spacing-s, 0.75rem) var(--gin-spacing-m, 1rem);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: var(--gin-font-size-s, 0.875rem);
  color: var(--gin-color-text, #222330);
  text-decoration: none;
  transition: background 0.2s ease;
}

.content-x-filter-link:hover {
  background: var(--gin-bg-layer2, #f8f9fa);
  text-decoration: none;
  color: var(--gin-color-text, #222330);
}

.content-x-filter-list-item.is-active .content-x-filter-link {
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.1));
  color: var(--gin-color-primary, #003cc5);
  font-weight: var(--gin-font-weight-semibold, 600);
}

.content-x-filter-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-x-filter-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--gin-color-text-light, #9ca3af);
  font-variant-numeric: tabular-nums;
  min-width: 24px;
  text-align: right;
}

.content-x-filter-list-item.is-active .content-x-filter-count {
  color: var(--gin-color-primary, #003cc5);
}

/* Reset button */
.content-x-reset-btn {
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--gin-color-text-light, #9ca3af);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.content-x-reset-btn:hover {
  color: var(--gin-color-primary, #003cc5);
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.05));
}

/* Main content area */
.content-x-main {
  flex: 1;
  min-width: 0;
}

/* Search bar - full width above layout */
.content-x-search-bar {
  padding: var(--gin-spacing-l, 1.5rem) 0;
  margin-bottom: var(--gin-spacing-m, 1rem);
}

/* Controls wrapper - two column layout */
.content-x-controls-wrapper {
  display: flex;
  gap: var(--gin-spacing-xl, 2rem);
  margin-bottom: var(--gin-spacing-m, 1rem);
}

.content-x-controls-spacer {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Toolbar controls row */
.content-x-toolbar-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* Results count */
.content-x-results-count {
  font-size: 13px;
  color: var(--gin-color-text-light, #6b7280);
}

.content-x-results-count strong {
  color: var(--gin-color-text, #374151);
  font-weight: 600;
}

/* Toolbar controls */
.content-x-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Button group base */
.content-x-status-switcher,
.content-x-lang-switcher,
.content-x-view-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Status buttons */
.content-x-status-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--gin-color-text-light, #6b7280);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.content-x-status-btn:hover {
  color: var(--gin-color-primary, #003cc5);
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.08));
}

.content-x-status-btn.is-active {
  background: var(--gin-color-primary, #003cc5);
  color: #fff;
}

/* Language buttons */
.content-x-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--gin-color-text-light, #6b7280);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.content-x-lang-btn:hover {
  color: var(--gin-color-primary, #003cc5);
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.08));
}

.content-x-lang-btn.is-active {
  background: var(--gin-color-primary, #003cc5);
  color: #fff;
}

/* View buttons */
.content-x-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--gin-color-text-light, #9ca3af);
  cursor: pointer;
  transition: all 0.15s ease;
}

.content-x-view-btn:hover {
  color: var(--gin-color-primary, #003cc5);
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.08));
}

.content-x-view-btn.is-active {
  color: var(--gin-color-primary, #003cc5);
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.08));
}

/* Limit select (items per page) */
.content-x-limit-select {
  height: 32px;
  padding: 0 24px 0 10px;
  border: 1px solid var(--gin-border-color, #e5e7eb);
  border-radius: 6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center;
  font-size: 13px;
  color: var(--gin-color-text, #374151);
  cursor: pointer;
  appearance: none;
  transition: border-color 0.15s ease;
}

.content-x-limit-select:hover {
  border-color: var(--gin-color-text-light, #9ca3af);
}

.content-x-limit-select:focus {
  outline: none;
  border-color: var(--gin-color-text, #374151);
}

/* Content area */
#content-x-content-area {
  position: relative;
}

#content-x-list-wrapper,
#content-x-grid-wrapper,
#content-x-dense-wrapper {
  transition: opacity 0.2s ease;
}

#content-x-list-wrapper.is-hidden,
#content-x-grid-wrapper.is-hidden,
#content-x-dense-wrapper.is-hidden,
.is-hidden {
  display: none;
}

/* Space-based content type filtering */
.content-x-filter-list-item.is-space-hidden {
  display: none;
}

/* ==========================================
   CARD GRID STYLES
   ========================================== */

.content-x-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gin-spacing-m, 1rem);
}

/* Card */
.content-x-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--gin-bg-layer, #fff);
  border: 1px solid var(--gin-border-color-layer, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.15s ease;
}

.content-x-card:hover {
  border-color: var(--gin-color-text-light, #9ca3af);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.content-x-card--unpublished {
  opacity: 0.5;
}

.content-x-card--unpublished .content-x-card-thumbnail {
  filter: grayscale(30%);
}

/* Card thumbnail */
.content-x-card-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--gin-bg-layer2, #f1f3f5) 0%, var(--gin-bg-layer, #e9ecef) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.content-x-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-x-card-placeholder {
  color: var(--gin-color-text-light, #adb5bd);
}

.content-x-card-status {
  position: absolute;
  top: var(--gin-spacing-s, 0.75rem);
  right: var(--gin-spacing-s, 0.75rem);
}

.content-x-card-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: var(--gin-font-weight-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.content-x-card-badge--published {
  background: rgba(46, 125, 50, 0.9);
  color: #fff;
}

.content-x-card-badge--unpublished {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

/* Card body */
.content-x-card-body {
  flex: 1;
  padding: var(--gin-spacing-m, 1rem);
}

.content-x-card-type {
  font-size: 11px;
  font-weight: var(--gin-font-weight-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gin-color-primary, #003cc5);
  margin-bottom: var(--gin-spacing-xs, 0.5rem);
}

.content-x-card-title {
  margin: 0 0 var(--gin-spacing-s, 0.75rem);
  font-size: var(--gin-font-size-m, 1rem);
  font-weight: var(--gin-font-weight-semibold, 600);
  line-height: 1.4;
}

.content-x-card-title a {
  color: var(--gin-color-text, #222330);
  text-decoration: none;
  transition: color 0.15s ease;
}

.content-x-card-title a:hover {
  color: var(--gin-color-primary, #003cc5);
}

.content-x-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gin-spacing-xs, 0.5rem);
  font-size: var(--gin-font-size-xs, 0.75rem);
  color: var(--gin-color-text-light, #6b7280);
}

.content-x-card-separator {
  opacity: 0.5;
}

/* Card actions */
.content-x-card-actions {
  display: flex;
  gap: 1px;
  border-top: 1px solid var(--gin-border-color-layer, #e5e5e5);
  background: var(--gin-border-color-layer, #e5e5e5);
}

.content-x-card-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gin-spacing-s, 0.75rem);
  background: var(--gin-bg-layer, #fff);
  color: var(--gin-color-text-light, #6b7280);
  text-decoration: none;
  transition: all 0.15s ease;
}

.content-x-card-action:hover {
  background: var(--gin-bg-layer2, #f8f9fa);
  color: var(--gin-color-primary, #003cc5);
}

.content-x-card-action--danger:hover {
  background: rgba(211, 47, 47, 0.1);
  color: var(--gin-color-danger, #d32f2f);
}

.content-x-card-action--muted {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Empty state */
.content-x-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gin-spacing-xxl, 4rem) var(--gin-spacing-xl, 2rem);
  text-align: center;
}

.content-x-empty-icon {
  color: var(--gin-color-text-light, #adb5bd);
  margin-bottom: var(--gin-spacing-m, 1rem);
  opacity: 0.5;
}

.content-x-empty-title {
  margin: 0 0 var(--gin-spacing-xs, 0.5rem);
  font-size: var(--gin-font-size-l, 1.25rem);
  font-weight: var(--gin-font-weight-semibold, 600);
  color: var(--gin-color-text, #222330);
}

.content-x-empty-text {
  margin: 0;
  font-size: var(--gin-font-size-s, 0.875rem);
  color: var(--gin-color-text-light, #6b7280);
}

/* ==========================================
   LIST VIEW STYLES
   ========================================== */

#content-x-list-wrapper {
  width: 100%;
}

.content-x-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--gin-bg-layer, #fff);
  border: 1px solid var(--gin-border-color-layer, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}

.content-x-row {
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-m, 1rem);
  padding: 12px 16px;
  background: var(--gin-bg-layer, #fff);
  border-bottom: 1px solid var(--gin-border-color-layer, #f3f4f6);
  transition: background 0.15s ease;
}

.content-x-row:last-child {
  border-bottom: none;
}

.content-x-row:hover {
  background: var(--gin-bg-layer2, #f9fafb);
}

.content-x-row--unpublished {
  opacity: 0.5;
}

.content-x-row-image {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: var(--gin-border-radius, 8px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--gin-bg-layer2, #f1f3f5) 0%, #e9ecef 100%);
}

.content-x-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-x-row-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gin-color-text-light, #adb5bd);
}

.content-x-row-content {
  flex: 1;
  min-width: 0;
}

.content-x-row-header {
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-s, 0.75rem);
  margin-bottom: 4px;
}

.content-x-row-title {
  margin: 0;
  font-size: var(--gin-font-size-m, 1rem);
  font-weight: var(--gin-font-weight-semibold, 600);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-x-row-title a {
  color: var(--gin-color-text, #222330);
  text-decoration: none;
}

.content-x-row-title a:hover {
  color: var(--gin-color-primary, #003cc5);
}

.content-x-row-draft {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: var(--gin-font-weight-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
}

.content-x-row-meta {
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-xs, 0.5rem);
  font-size: var(--gin-font-size-s, 0.875rem);
  color: var(--gin-color-text-light, #6b7280);
}

.content-x-row-sep {
  opacity: 0.4;
}

.content-x-row-type {
  color: var(--gin-color-primary, #003cc5);
  font-weight: var(--gin-font-weight-medium, 500);
}

.content-x-row-actions {
  flex-shrink: 0;
  display: flex;
  gap: var(--gin-spacing-xs, 0.5rem);
}

.content-x-row-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--gin-border-radius, 8px);
  color: var(--gin-color-text-light, #6b7280);
  background: var(--gin-bg-layer, #fff);
  border: 1px solid var(--gin-border-color, #d4d4d8);
  text-decoration: none;
  transition: all 0.15s ease;
}

.content-x-row-btn:hover {
  color: var(--gin-color-primary, #003cc5);
  border-color: var(--gin-color-primary, #003cc5);
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.05));
}

.content-x-row-btn--muted {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Translation badges */
.content-x-row-translations,
.content-x-card-translations {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--gin-spacing-xs, 0.5rem);
}

.content-x-lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: var(--gin-font-weight-bold, 700);
  text-decoration: none;
  background: var(--gin-color-primary, #003cc5);
  color: #fff;
  transition: all 0.15s ease;
}

.content-x-lang-badge:hover {
  background: var(--gin-color-primary-hover, #002a8a);
  color: #fff;
  transform: translateY(-1px);
}

.content-x-lang-badge--draft {
  background: var(--gin-bg-layer2, #e9ecef);
  color: var(--gin-color-text-light, #6b7280);
  border: 1px dashed var(--gin-border-color, #d4d4d8);
}

.content-x-lang-badge--draft:hover {
  background: var(--gin-bg-layer3, #dee2e6);
  color: var(--gin-color-text, #222330);
}

.content-x-lang-badge--missing {
  background: transparent;
  color: var(--gin-color-text-light, #adb5bd);
  border: 1px dashed var(--gin-border-color-layer, #d4d4d8);
  opacity: 0.5;
}

.content-x-lang-badge--missing:hover {
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.1));
  color: var(--gin-color-primary, #003cc5);
  border-color: var(--gin-color-primary, #003cc5);
  opacity: 1;
}

/* Empty state */
.content-x-empty {
  text-align: center;
  color: var(--gin-color-text-light, #6b7280);
  padding: var(--gin-spacing-xl, 3rem);
}

/* Loading indicator */
.htmx-indicator {
  margin-top: var(--gin-spacing-s, 0.75rem);
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-indicator.htmx-request {
  opacity: 1;
}

.htmx-indicator .loading {
  display: inline-block;
  padding: 6px 12px;
  background: var(--gin-color-text, #111827);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

/* HTMX transitions */
.htmx-swapping {
  opacity: 0;
  transition: opacity 150ms ease-out;
}

.htmx-settling {
  opacity: 1;
  transition: opacity 150ms ease-in;
}

/* Responsive */
@media (max-width: 1024px) {
  .content-x-layout {
    flex-direction: column;
  }

  .content-x-sidebar {
    width: 100%;
  }

  .content-x-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .content-x-operations {
    flex-direction: column;
  }

  .content-x-operations .button {
    width: 100%;
  }

  .content-x-grid {
    grid-template-columns: 1fr;
  }

  .content-x-toolbar {
    flex-direction: column;
    gap: var(--gin-spacing-s, 0.75rem);
    align-items: stretch;
  }

  .content-x-toolbar-info {
    justify-content: center;
  }

  .content-x-view-switcher {
    justify-content: center;
  }
}

/* ==========================================
   DENSE TABLE VIEW STYLES
   ========================================== */

.content-x-dense-table {
  width: 100%;
  margin-top: 0;
  border-collapse: collapse;
  background: var(--gin-bg-layer, #fff);
  border: 1px solid var(--gin-border-color-layer, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}

.content-x-dense-th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--gin-color-text-light, #9ca3af);
  background: transparent;
  border-bottom: 1px solid var(--gin-border-color-layer, #e5e7eb);
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.content-x-dense-th--title {
  width: 40%;
}

.content-x-dense-th--type {
  width: 15%;
}

.content-x-dense-th--status {
  width: 60px;
  text-align: center;
}

.content-x-dense-th--lang {
  width: 120px;
}

.content-x-dense-th--author {
  width: 12%;
}

.content-x-dense-th--date {
  width: 12%;
}

.content-x-dense-th--actions {
  width: 80px;
}

.content-x-dense-th--spaces {
  width: 15%;
}

.content-x-dense-td--spaces {
  font-size: 12px;
  color: var(--gin-color-text-light, #71717a);
}

.content-x-dense-space-link {
  color: var(--gin-color-text-light, #71717a);
  text-decoration: none;
}

.content-x-dense-space-link:hover {
  color: var(--gin-color-primary, #003cc5);
  text-decoration: underline;
}

.content-x-dense-row {
  border-bottom: 1px solid var(--gin-border-color-layer, #f3f4f6);
}

.content-x-dense-row:last-child {
  border-bottom: none;
}

.content-x-dense-row:hover {
  background: var(--gin-bg-layer2, #f9fafb);
}

.content-x-dense-row--unpublished {
  opacity: 0.5;
}

.content-x-dense-td {
  padding: 8px 12px;
  vertical-align: middle;
  color: var(--gin-color-text, #374151);
}

.content-x-dense-td--title {
  font-weight: var(--gin-font-weight-medium, 500);
}

.content-x-dense-td--status {
  text-align: center;
}

.content-x-dense-td--type {
  color: var(--gin-color-text-light, #6b7280);
}

.content-x-dense-td--author,
.content-x-dense-td--date {
  color: var(--gin-color-text-light, #6b7280);
}

.content-x-dense-td--author {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-x-dense-td--lang {
  white-space: nowrap;
}

.content-x-dense-link {
  color: var(--gin-color-text, #222330);
  text-decoration: none;
}

.content-x-dense-link:hover {
  color: var(--gin-color-primary, #003cc5);
}

/* Status indicator */
.content-x-dense-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.content-x-dense-status--published {
  background: #2e7d32;
}

.content-x-dense-status--draft {
  background: #9e9e9e;
}

/* Language badges in dense view */
.content-x-dense-lang {
  display: inline-block;
  padding: 2px 5px;
  margin-right: 3px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  text-decoration: none;
  background: var(--gin-color-primary, #003cc5);
  color: #fff;
}

.content-x-dense-lang:hover {
  background: var(--gin-color-primary-hover, #002a8a);
  color: #fff;
}

.content-x-dense-lang--draft {
  background: #e5e7eb;
  color: #6b7280;
  border: none;
}

.content-x-dense-lang--draft:hover {
  background: #d1d5db;
  color: #374151;
}

.content-x-dense-lang--missing {
  background: transparent;
  color: #d1d5db;
  border: 1px dashed #d1d5db;
}

.content-x-dense-lang--missing:hover {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #9ca3af;
}

.content-x-dense-td--actions {
  display: flex;
  gap: 2px;
}

/* Action button in dense view */
.content-x-dense-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: var(--gin-color-text-light, #6b7280);
  text-decoration: none;
  transition: all 0.15s ease;
}

.content-x-dense-action:hover {
  color: var(--gin-color-primary, #003cc5);
  background: var(--gin-color-primary-light, rgba(0, 60, 197, 0.1));
}

/* Dense table responsive */
@media (max-width: 1024px) {
  .content-x-dense-th--author,
  .content-x-dense-td--author {
    display: none;
  }
}

@media (max-width: 768px) {
  .content-x-dense-table {
    font-size: 11px;
  }

  .content-x-dense-th--date,
  .content-x-dense-td--date {
    display: none;
  }
}

/* ==========================================
   PAGER STYLES
   ========================================== */

.content-x-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gin-spacing-m, 1rem) 0;
  margin-top: var(--gin-spacing-s, 0.75rem);
}

.content-x-pager-info {
  font-size: 13px;
  color: var(--gin-color-text-light, #6b7280);
}

.content-x-pager-count {
  margin-left: 4px;
  color: var(--gin-color-text-light, #9ca3af);
}

.content-x-pager-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.content-x-pager-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--gin-color-text-light, #6b7280);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.content-x-pager-btn:hover:not(.is-disabled):not(.is-active) {
  background: var(--gin-bg-layer2, #f3f4f6);
  color: var(--gin-color-text, #374151);
}

.content-x-pager-btn.is-active {
  background: var(--gin-color-primary, #003cc5);
  color: #fff;
  cursor: default;
}

.content-x-pager-btn.is-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.content-x-pager-prev,
.content-x-pager-next {
  color: var(--gin-color-text, #374151);
}

.content-x-pager-ellipsis {
  padding: 0 4px;
  color: var(--gin-color-text-light, #9ca3af);
  font-size: 13px;
}

/* Pager responsive */
@media (max-width: 640px) {
  .content-x-pager {
    flex-direction: column;
    gap: var(--gin-spacing-s, 0.75rem);
  }

  .content-x-pager-info {
    order: 2;
  }

  .content-x-pager-nav {
    order: 1;
  }
}

/* ==========================================
   QUICK ADD BUTTON & MODAL STYLES
   ========================================== */

.content-x-quick-add-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gin-spacing-xs, 0.5rem);
  padding: 8px 16px;
  border: 1px solid var(--gin-color-primary, #003cc5);
  border-radius: var(--gin-border-radius, 8px);
  background: var(--gin-color-primary, #003cc5);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.content-x-quick-add-btn:hover {
  background: var(--gin-color-primary-hover, #002a8a);
  border-color: var(--gin-color-primary-hover, #002a8a);
}

/* Modal */
.content-x-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.content-x-modal.is-open {
  display: flex;
}

.content-x-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.content-x-modal__content {
  position: relative;
  background: var(--gin-bg-layer, #fff);
  border-radius: var(--gin-border-radius-l, 12px);
  box-shadow: var(--gin-shadow-xl, 0 20px 40px rgba(0, 0, 0, 0.3));
  width: 400px;
  max-width: 90vw;
  animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.content-x-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gin-spacing-m, 1rem) var(--gin-spacing-l, 1.5rem);
  border-bottom: 1px solid var(--gin-border-color-layer, #e5e5e5);
}

.content-x-modal__title {
  margin: 0;
  font-size: var(--gin-font-size-l, 1.125rem);
  font-weight: var(--gin-font-weight-semibold, 600);
  color: var(--gin-color-text, #222330);
}

.content-x-modal__close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: var(--gin-bg-layer2, #f8f9fa);
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gin-color-text-light, #6b7280);
  transition: all 0.2s ease;
}

.content-x-modal__close:hover {
  background: var(--gin-color-danger, #d32f2f);
  color: #fff;
}

.content-x-modal__body {
  padding: var(--gin-spacing-l, 1.5rem);
}

.content-x-modal__field {
  margin-bottom: var(--gin-spacing-m, 1rem);
}

.content-x-modal__field:last-child {
  margin-bottom: 0;
}

.content-x-modal__label {
  display: block;
  font-size: var(--gin-font-size-s, 0.875rem);
  font-weight: var(--gin-font-weight-semibold, 600);
  color: var(--gin-color-text, #222330);
  margin-bottom: var(--gin-spacing-xs, 0.5rem);
}

.content-x-modal__label .required {
  color: var(--gin-color-danger, #d32f2f);
}

.content-x-modal__input,
.content-x-modal__select {
  width: 100%;
  padding: var(--gin-spacing-s, 0.75rem);
  border: 1px solid var(--gin-border-color, #d4d4d8);
  border-radius: var(--gin-border-radius, 8px);
  font-size: var(--gin-font-size-m, 1rem);
  background: var(--gin-bg-layer, #fff);
  color: var(--gin-color-text, #222330);
}

.content-x-modal__input:focus,
.content-x-modal__select:focus {
  outline: none;
  border-color: var(--gin-color-primary, #003cc5);
  box-shadow: 0 0 0 2px var(--gin-color-primary-light, rgba(0, 60, 197, 0.1));
}

.content-x-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--gin-spacing-s, 0.75rem);
  padding: var(--gin-spacing-m, 1rem) var(--gin-spacing-l, 1.5rem);
  border-top: 1px solid var(--gin-border-color-layer, #e5e5e5);
}

.content-x-modal__cancel,
.content-x-modal__save {
  padding: var(--gin-spacing-s, 0.75rem) var(--gin-spacing-l, 1.5rem);
  border-radius: var(--gin-border-radius, 8px);
  font-size: var(--gin-font-size-s, 0.875rem);
  font-weight: var(--gin-font-weight-semibold, 600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.content-x-modal__cancel {
  background: none;
  border: 1px solid var(--gin-border-color, #d4d4d8);
  color: var(--gin-color-text, #222330);
}

.content-x-modal__cancel:hover {
  background: var(--gin-bg-layer2, #f8f9fa);
}

.content-x-modal__save {
  background: var(--gin-color-primary, #003cc5);
  border: none;
  color: #fff;
}

.content-x-modal__save:hover {
  background: var(--gin-color-primary-hover, #002a8a);
}

.content-x-modal__save:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
