/**
 * YOOAdmin - List screens styles (posts, pages, CPTs)
 *
 * @package YOOAdmin
 */

/* Local tokens (resolve to plugin-injected CSS variables) */
:root {
  /* These are read from PHP (yooadmin_build_css_variables). */
  --_yp-primary: var(--yooadmin-primary, var(--yp-primary, #eda934));
  --_yp-secondary: var(--yooadmin-secondary, var(--yp-secondary, #4B4B4B));
  --_yp-text-600: var(--yooadmin-text-600, #606060);
  --_yp-text-500: var(--yooadmin-text-500, #555555);
  --_yp-surface: var(--yooadmin-surface, #ffffff);
  --_yp-border: var(--yooadmin-border, #e0e0e0);
  --_yp-row-hover: var(--yooadmin-row-hover, #f7f7f7);
  --_yp-head-bg: var(--yooadmin-head-bg, #e5e5e5);
}

/* ========== General List Screen Styles ========== */

/* ========== Original Table Layout (from backup) ========== */
/* Table wrapper */
.yoo-list-screen .wp-list-table {
  border: 1px solid var(--_yp-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--_yp-surface);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

/* Header cells */
.yoo-list-screen .wp-list-table thead th {
  background: var(--_yp-head-bg);
  color: #333;
  font-weight: 600;
  border-bottom: 0;
  border-right: 1px solid #ddd;
}
.yoo-list-screen .wp-list-table thead th:last-child {
  border-right: 0;
}

/* Body rows */
.yoo-list-screen .wp-list-table tbody tr {
  background: #fff;
  transition: background-color .15s ease;
}
.yoo-list-screen .wp-list-table tbody tr:hover {
  background: var(--_yp-row-hover);
}
.yoo-list-screen .wp-list-table tbody td {
  border-top: 1px solid #eee;
  border-right: 1px solid #f0f0f0;
}
.yoo-list-screen .wp-list-table tbody td:last-child {
  border-right: 0;
}

/* Title column link */
.yoo-list-screen .wp-list-table .column-title a.row-title {
  color: var(--_yp-text-600);
  font-weight: 600;
  text-decoration: none;
}
.yoo-list-screen .wp-list-table .column-title a.row-title:hover,
.yoo-list-screen .wp-list-table .column-title a.row-title:focus {
  color: var(--_yp-primary);
  outline: none;
}

/* Check-column visual */
.yoo-list-screen .wp-list-table th.check-column,
.yoo-list-screen .wp-list-table td.check-column {
  background-color: #f5f5f5;
  border-right: 1px solid #e0e0e0;
}
.yoo-list-screen .wp-list-table tbody tr:hover td.check-column {
  background-color: #eee;
}

/* Filters - Professional Dropdown */
.yoo-list-screen .yoo-filter-wrapper {
  margin: 0 0 20px 0;
  padding: 0;
  display: inline-block;
}

/* Override for toolbar filter wrapper */
.yoo-plugins-toolbar .yoo-filter-wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

/* General filter dropdown styles (for non-toolbar filters) */
.yoo-list-screen .yoo-filter-dropdown:not(.yoo-plugins-toolbar .yoo-filter-dropdown) {
  min-width: 250px;
  padding: 10px 40px 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--_yp-text-600);
  background: var(--_yp-surface);
  border: 1px solid var(--_yp-border);
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23606060' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

.yoo-list-screen .yoo-filter-dropdown:not(.yoo-plugins-toolbar .yoo-filter-dropdown):hover {
  border-color: var(--_yp-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.yoo-list-screen .yoo-filter-dropdown:not(.yoo-plugins-toolbar .yoo-filter-dropdown):focus {
  outline: none;
  border-color: var(--_yp-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--_yp-primary) 20%, transparent);
}

.yoo-list-screen .yoo-filter-dropdown option {
  padding: 10px;
  font-size: 14px;
}

/* Actions & buttons in toolbar */
.yoo-list-screen .tablenav .button,
.yoo-list-screen .page-title-action {
  border-radius: 8px;
  box-shadow: none;
  text-shadow: none;
}

/* Secondary buttons (outline/ghost) align with brand */
.yoo-list-screen .tablenav .button:not(.button-primary) {
  border-color: var(--_yp-primary);
  color: var(--_yp-primary);
  background: #fff;
}
.yoo-list-screen .tablenav .button:not(.button-primary):hover,
.yoo-list-screen .tablenav .button:not(.button-primary):focus {
  background: #fbf7f2;
  border-color: var(--_yp-primary);
  color: var(--_yp-primary);
  outline: none;
}

/* Primary buttons */
.yoo-list-screen .tablenav .button-primary,
.yoo-list-screen .page-title-action {
  background: var(--_yp-primary);
  border-color: var(--_yp-primary);
  color: #fff;
}
.yoo-list-screen .tablenav .button-primary:hover,
.yoo-list-screen .tablenav .button-primary:focus,
.yoo-list-screen .page-title-action:hover,
.yoo-list-screen .page-title-action:focus {
  background: color-mix(in srgb, var(--_yp-primary) 88%, #000);
  border-color: color-mix(in srgb, var(--_yp-primary) 88%, #000);
  outline: none;
}

/* Force Add New link text to stay white in all states */
.yoo-list-screen .wrap .page-title-action,
.yoo-list-screen .wrap .page-title-action:link,
.yoo-list-screen .wrap .page-title-action:visited,
.yoo-list-screen .wrap .page-title-action:hover,
.yoo-list-screen .wrap .page-title-action:focus,
.yoo-list-screen .wrap .page-title-action:active {
  color: #fff;
}
.yoo-list-screen .wrap .page-title-action * {
  color: #fff;
}

/* Search button in toolbar */
.yoo-list-screen .search-box .button {
  background: var(--_yp-primary);
  border-color: var(--_yp-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  text-shadow: none;
  box-shadow: none;
}
.yoo-list-screen .search-box .button:hover,
.yoo-list-screen .search-box .button:focus {
  background: color-mix(in srgb, var(--_yp-primary) 88%, #000);
  border-color: color-mix(in srgb, var(--_yp-primary) 88%, #000);
  outline: none;
}

/* Inputs/selects */
.yoo-list-screen select,
.yoo-list-screen input[type="search"],
.yoo-list-screen input[type="text"] {
  border-radius: 8px;
  box-shadow: none;
  outline: none;
}
.yoo-list-screen select:focus,
.yoo-list-screen input[type="search"]:focus,
.yoo-list-screen input[type="text"]:focus {
  border-color: color-mix(in srgb, var(--_yp-primary) 40%, #ccc);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--_yp-primary) 35%, transparent);
  outline: none;
}

/* Optional: hide WP footer on list screens only */
.yoo-list-screen #wpfooter {
  display: none;
}

/* Page title */
.yoo-list-screen .wrap > h1 {
  color: var(--_yp-text-600);
  font-weight: 600;
  margin-bottom: 20px;
}
