/**
 * YOOAdmin - Posts page styles
 *
 * @package YOOAdmin
 */

.yooadmin-posts-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--yp-text);
  box-sizing: border-box;
}

.yoo-posts-content-section {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

/* Hero Section */
.yoo-posts-hero {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.yoo-posts-hero__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.yoo-posts-hero__top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.yoo-posts-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #f0f0f1;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #646970;
  font-weight: 500;
}

.yoo-posts-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}

.yoo-posts-hero__actions .yoo-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--_yp-primary, #eda934);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.yoo-posts-hero__actions .yoo-button:hover {
  background: color-mix(in srgb, var(--_yp-primary, #eda934) 90%, #000);
  color: #fff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.yoo-posts-hero__actions .yoo-button:hover * {
  color: #fff !important;
}

.yoo-posts-hero__actions .yoo-button .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Add New: keep label + icon white on hover (WP admin link:hover can override) */
.yoo-posts-hero__actions .yoo-button.yoo-button--primary:hover,
.yoo-posts-hero__actions .yoo-button.yoo-button--primary:hover * {
  color: #fff !important;
}

.yoo-posts-hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1d2327;
  display: flex;
  align-items: center;
  gap: 8px;
}

.yoo-posts-hero h1 .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: var(--_yp-primary, #eda934);
}

.yoo-posts-search-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-width: 200px;
  max-width: 400px;
}

.yoo-posts-search-wrapper .dashicons {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c8f94;
  font-size: 18px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s ease;
}

.yoo-posts-search-input {
  width: 100%;
  padding: 8px 12px 8px 38px !important;
  border: 1px solid #dcdcde !important;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  height: 36px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.yoo-posts-search-input:hover {
  border-color: #c3c4c7 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.yoo-posts-search-input:focus {
  outline: none !important;
  border-color: var(--_yp-primary, #eda934) !important;
  box-shadow: 0 0 0 3px rgba(238, 180, 78, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

.yoo-posts-search-input:focus + .dashicons,
.yoo-posts-search-wrapper:focus-within .dashicons {
  color: var(--_yp-primary, #eda934);
}

/* Metrics Toggle Button */
.yoo-posts-metrics-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-top: 12px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  font-size: 12px;
  color: #646970;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yoo-posts-metrics-toggle:hover {
  background: #e8e8e8;
  border-color: #c3c4c7;
}

.yoo-posts-metrics-toggle .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.yoo-posts-metrics-toggle.is-expanded .dashicons {
  transform: rotate(180deg);
}

/* Metrics */
.yoo-posts-hero__metrics {
  display: none; /* Hidden by default */
  flex-direction: row;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f1;
  flex-wrap: wrap;
  animation: slideDown 0.3s ease;
}

.yoo-posts-hero__metrics.is-visible {
  display: flex;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.yoo-posts-metric {
  padding: 12px 16px;
  background: #f6f7f7;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 140px;
}

.yoo-posts-metric__icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(238, 180, 78, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yoo-posts-metric__icon .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: var(--_yp-primary, #eda934);
}

.yoo-posts-metric__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.yoo-posts-metric__value {
  font-size: 20px;
  font-weight: 700;
  color: #1d2327;
  line-height: 1.2;
}

.yoo-posts-metric__label {
  font-size: 11px;
  font-weight: 500;
  color: #646970;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Toolbar */
.yoo-posts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f1;
}

/* View Toggle */
.yoo-view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 2px;
}

.yoo-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--yp-text);
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.15s ease;
  padding: 0;
}

.yoo-view-btn:hover {
  background: #f6f7f7;
  color: #2c3338;
}

.yoo-view-btn.is-active {
  background: var(--_yp-primary, #eda934);
  color: #fff;
}

.yoo-view-btn .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.yoo-posts-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.yoo-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #fff;
  color: #2c3338;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
}

.yoo-filter-chip:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
  color: #2c3338;
  text-decoration: none;
}

.yoo-filter-chip.is-active {
  background: var(--_yp-primary, #eda934);
  border-color: var(--_yp-primary, #eda934);
  color: #fff;
}

.yoo-filter-count {
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.yoo-filter-chip.is-active .yoo-filter-count {
  background: rgba(255, 255, 255, 0.3);
}

/* Filter Dropdown Buttons - Styled like filter chips */
.yoo-filter-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.yoo-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #fff;
  color: #2c3338;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
}

.yoo-filter-btn:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
  color: #2c3338;
  text-decoration: none;
}

.yoo-filter-btn.is-active {
  background: var(--_yp-primary, #eda934);
  border-color: var(--_yp-primary, #eda934);
  color: #fff;
}

.yoo-filter-label {
  display: inline-flex;
  align-items: center;
}

.yoo-filter-dropdown-arrow {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.yoo-filter-dropdown-wrapper.is-open .yoo-filter-dropdown-arrow {
  transform: rotate(180deg);
}

.yoo-filter-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0.8;
}

.yoo-filter-remove:hover {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.yoo-filter-remove .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  line-height: 1;
}

.yoo-filter-sort {
  display: flex;
  flex-direction: column;
  line-height: 1;
  margin-left: 2px;
}

.yoo-filter-sort .dashicons {
  font-size: 12px;
  width: 12px;
  height: 12px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.yoo-filter-btn.is-active .yoo-filter-sort .dashicons {
  opacity: 1;
}

.yoo-filter-sort .yoo-sort-asc,
.yoo-filter-sort .yoo-sort-desc {
  display: none;
}

.yoo-filter-btn[data-sort="asc"] .yoo-sort-asc {
  display: block;
}

.yoo-filter-btn[data-sort="desc"] .yoo-sort-desc {
  display: block;
}

/* Filter Dropdown Menu */
.yoo-filter-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 4px;
}

.yoo-filter-dropdown-wrapper.is-open .yoo-filter-dropdown {
  display: block;
}

.yoo-filter-option {
  display: block;
  padding: 8px 12px;
  color: #2c3338;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f0f0f1;
}

.yoo-filter-option:last-child {
  border-bottom: none;
}

.yoo-filter-option:hover {
  background: #f6f7f7;
  color: #2c3338;
  text-decoration: none;
}

.yoo-filter-option.is-selected {
  background: #f0f6fc;
  color: var(--_yp-primary, #eda934);
  font-weight: 500;
}

/* Bulk Actions */
.yoo-bulk-actions-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  margin-bottom: 24px;
}

.yoo-bulk-actions-bar.show {
  display: flex;
}

.yoo-bulk-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yoo-checkbox {
  width: 18px;
  height: 18px;
}

.yoo-selected-count {
  font-size: 14px;
  color: var(--yp-text);
}

.yoo-bulk-select {
  padding: 6px 24px 6px 8px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

/* Posts Grid */
.yoo-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.yoo-post-card {
  position: relative;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.yoo-post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.yoo-post-checkbox {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  width: 18px;
  height: 18px;
}

.yoo-post-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yoo-post-image > .yoo-post-status {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  margin: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.yoo-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yoo-post-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  color: #a0a0a0;
  gap: 8px;
}

.yoo-post-image-placeholder .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  color: #c3c4c7;
}

.yoo-post-image-placeholder .yoo-placeholder-text {
  font-size: 12px;
  font-weight: 500;
  color: #8c8f94;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.yoo-post-content {
  padding: 14px;
}

.yoo-post-header {
  display: block;
  margin-bottom: 12px;
}

.yoo-post-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.yoo-post-title a {
  color: var(--yp-text);
  text-decoration: none;
}

.yoo-post-title a:hover {
  color: var(--_yp-primary, #eda934);
}

.yoo-post-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.yoo-post-status--publish {
  background: #00a32a;
  color: #fff;
}

.yoo-post-status--draft {
  background: var(--yp-text);
  color: #fff;
}

.yoo-post-status--trash {
  background: #d63638;
  color: #fff;
}

.yoo-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--yp-text);
}

.yoo-post-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.yoo-post-meta-item .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.yoo-post-excerpt {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--yp-text);
  line-height: 1.6;
}

.yoo-post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #f0f0f1;
}

.yoo-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #fff;
  color: #2c3338;
  text-decoration: none !important;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.yoo-action-btn:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
  color: var(--_yp-primary, #eda934);
  text-decoration: none !important;
}

.yoo-action-btn.danger {
  color: #d63638;
  border-color: #d63638;
}

.yoo-action-btn.danger:hover {
  background: #d63638;
  color: #fff;
  border-color: #d63638;
}

.yoo-action-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Empty State */
.yoo-posts-empty {
  text-align: center;
  padding: 80px 40px;
  background: #f6f7f7;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 20px 0;
  width: 100%;
  box-sizing: border-box;
}

/* Empty state in table view */
#yoo-posts-content.yoo-view-table .yoo-posts-empty {
  margin-top: 0;
  border-radius: 0;
  background: #f6f7f7;
}

/* Empty state in cards view */
#yoo-posts-content.yoo-view-cards .yoo-posts-empty {
  grid-column: 1 / -1;
}

.yoo-empty-illustration {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.yoo-empty-illustration .dashicons {
  font-size: 96px;
  width: 96px;
  height: 96px;
  color: #c3c4c7;
}

.yoo-posts-empty h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--yp-text);
}

.yoo-posts-empty p {
  margin: 0;
  font-size: 14px;
  color: var(--yp-text);
  line-height: 1.5;
}

/* Success/Error Notices */
.yoo-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
}

.yoo-notice.visible {
  opacity: 1;
  transform: translateY(0);
}

.yoo-notice-success {
  background: #d1e7dd;
  border-left: 4px solid #0f5132;
  color: #0f5132;
}

.yoo-notice-error {
  background: #f8d7da;
  border-left: 4px solid #842029;
  color: #842029;
}

.yoo-notice-info {
  background: #cff4fc;
  border-left: 4px solid #055160;
  color: #055160;
}

.yoo-notice-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.yoo-notice-icon .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.yoo-notice p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.yoo-notice-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.yoo-notice-close:hover {
  opacity: 1;
}

/* Pagination - Hidden when using infinite scroll */
.yoo-posts-pagination {
  display: none; /* Hidden by default, shown only if infinite scroll fails */
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.yoo-pagination-link,
.yoo-pagination-prev,
.yoo-pagination-next {
  padding: 8px 12px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #fff;
  color: #2c3338;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.yoo-pagination-link:hover,
.yoo-pagination-prev:hover,
.yoo-pagination-next:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
  text-decoration: none;
}

.yoo-pagination-current {
  padding: 8px 12px;
  border: 1px solid var(--_yp-primary, #eda934);
  border-radius: 4px;
  background: var(--_yp-primary, #eda934);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* Table View */
.yoo-posts-table {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
  position: relative;
  isolation: isolate; /* Create a new stacking context */
}

/* Remove negative margins since content is now in a section */
.yooadmin-posts-page #yoo-posts-content.yoo-view-table {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.yoo-posts-table table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
  padding: 0;
  table-layout: auto;
  background: transparent;
  border: none;
}

.yoo-posts-table .column-title {
  min-width: 200px;
  width: auto;
}

.yoo-posts-table .column-author,
.yoo-posts-table .column-categories,
.yoo-posts-table .column-date {
  width: auto;
  min-width: 120px;
}

.yoo-posts-table thead th {
  background: #fafafa;
  border-bottom: 2px solid #f0f0f1;
  border-left: none;
  border-right: none;
  border-top: none;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--yp-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  margin: 0;
  line-height: 1.6;
  height: auto;
  box-sizing: border-box;
}

/* Remove border-radius from individual cells - container handles it */
.yoo-posts-table thead th:first-child,
.yoo-posts-table thead th:last-child {
  border-radius: 0;
}

.yoo-posts-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.yoo-posts-table thead th.sortable:hover {
  background: #f5f5f5;
}

.yoo-posts-table thead th .yoo-sort-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--yp-text);
  text-decoration: none;
  width: 100%;
}

.yoo-posts-table thead th .yoo-sort-link:hover {
  color: #2c3338;
}

.yoo-posts-table thead th.sortable .sorting-indicator {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #c3c4c7;
  margin-left: 4px;
  opacity: 0.5;
  transition: all 0.15s ease;
}

.yoo-posts-table thead th.sortable.sort-asc .sorting-indicator {
  border-top: none;
  border-bottom: 4px solid var(--_yp-primary, #eda934);
  opacity: 1;
}

.yoo-posts-table thead th.sortable.sort-desc .sorting-indicator {
  border-top: 4px solid var(--_yp-primary, #eda934);
  border-bottom: none;
  opacity: 1;
}

.yoo-posts-table tbody td {
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  border-left: none;
  border-right: none;
  font-size: 14px;
  color: #2c3338;
  vertical-align: top;
  line-height: 1.6;
}

.yoo-posts-table tbody tr {
  transition: background-color 0.15s ease;
}

.yoo-posts-table tbody tr:hover {
  background: #fafafa;
}

.yoo-posts-table tbody tr:last-child td {
  border-bottom: none;
}

/* Remove border-radius from individual cells - container handles it */
.yoo-posts-table tbody tr:last-child td:first-child,
.yoo-posts-table tbody tr:last-child td:last-child {
  border-radius: 0;
}

/* Thumbnail Column */
.yoo-posts-table .column-thumbnail {
  width: 60px;
}

.yoo-posts-table thead .column-thumbnail {
  padding: 16px !important;
}

.yoo-posts-table tbody .column-thumbnail {
  padding: 16px !important;
}

.yoo-table-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yoo-table-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yoo-table-thumbnail--placeholder {
  background: #f0f0f1;
}

.yoo-table-thumbnail--placeholder .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #c3c4c7;
}


.yoo-posts-table .row-title {
  color: #2c3338;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
  display: block;
  margin-bottom: 6px;
}

.yoo-posts-table .row-title:hover {
  color: var(--_yp-primary, #eda934);
}

.yoo-posts-table .row-actions {
  visibility: hidden;
  font-size: 12px;
  margin-top: 4px;
}

.yoo-posts-table tbody tr:hover .row-actions {
  visibility: visible;
}

.yoo-posts-table .row-actions a {
  color: var(--yp-text);
  text-decoration: none;
  margin-right: 8px;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yoo-posts-table .row-actions a .dashicons {
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.yoo-posts-table .row-actions a:hover .dashicons {
  opacity: 1;
}

.yoo-posts-table .row-actions a:hover {
  color: var(--_yp-primary, #eda934);
}

.yoo-posts-table .row-actions span {
  color: #dcdcde;
  margin: 0 4px;
}

.yoo-posts-table .yoo-action-link {
  cursor: pointer;
}

/* Author Column */
.yoo-posts-table .column-author {
  color: var(--yp-text);
  font-size: 13px;
}

/* Categories Column */
.yoo-posts-table .column-categories a {
  color: var(--_yp-primary, #eda934);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}

.yoo-posts-table .column-categories a:hover {
  color: color-mix(in srgb, var(--_yp-primary, #eda934) 80%, #000);
  text-decoration: underline;
}

/* Date Column */
.yoo-posts-table .column-date {
  color: var(--yp-text);
  font-size: 13px;
  white-space: nowrap;
}

/* Comments Column */
.yoo-posts-table .column-comments {
  width: 80px;
  text-align: center;
}

.yoo-posts-table .post-com-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--yp-text);
  text-decoration: none;
  font-size: 13px;
}

.yoo-posts-table .post-com-count:hover {
  color: var(--_yp-primary, #eda934);
}

.yoo-posts-table .post-com-count .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.yoo-posts-table .post-com-count-approved {
  color: var(--_yp-primary, #eda934);
  font-weight: 500;
}

.yoo-posts-table .post-com-count-no-comments {
  color: #c3c4c7;
}

/* Status Column */
.yoo-posts-table .column-status {
  width: 100px;
  text-align: center;
}


.yoo-posts-table .yoo-post-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-block;
  white-space: nowrap;
}

.yoo-posts-table .yoo-post-status--publish {
  background: #d1e7dd;
  color: #0f5132;
}

.yoo-posts-table .yoo-post-status--draft {
  background: #f8d7da;
  color: #842029;
}

.yoo-posts-table .yoo-post-status--trash {
  background: #f8d7da;
  color: #842029;
}

/* Checkbox Column */
.yoo-posts-table .check-column {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}

.yoo-posts-table thead .check-column {
  padding: 16px !important;
}

.yoo-posts-table tbody .check-column {
  padding: 16px !important;
}

.yoo-posts-table .check-column input[type="checkbox"] {
  margin: 0;
}


/* View States */
#yoo-posts-content.yoo-view-table .yoo-posts-grid {
  display: none !important;
}

#yoo-posts-content.yoo-view-table .yoo-posts-table {
  display: block !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#yoo-posts-content.yoo-view-cards .yoo-posts-grid {
  display: grid !important;
}

#yoo-posts-content.yoo-view-cards .yoo-posts-table {
  display: none !important;
}

/* Ensure no gaps */
#yoo-posts-content {
  width: 100%;
  margin: 0;
  padding: 0;
}

#yoo-posts-content.yoo-view-table {
  display: block;
  width: 100%;
}

/* Image Lightbox */
.yoo-image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yoo-lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.yoo-lightbox-container {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: yoo-lightbox-fadein 0.3s ease;
}

@keyframes yoo-lightbox-fadein {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.yoo-lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.yoo-lightbox-close:hover {
  background: #fff;
  transform: scale(1.1);
}

.yoo-lightbox-close .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #2c3338;
}

.yoo-lightbox-content {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.yoo-lightbox-image {
  max-width: 100%;
  max-height: calc(90vh - 60px);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.yoo-lightbox-title {
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  font-size: 14px;
  font-weight: 600;
  color: #2c3338;
  text-align: center;
}

.yoo-image-lightbox-trigger {
  transition: opacity 0.2s ease;
}

.yoo-image-lightbox-trigger:hover {
  opacity: 0.9;
}

/* Infinite Scroll Loading */
.yoo-loading-more {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 20px;
  color: var(--yp-text);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.yoo-loading-more .spinner {
  float: none;
  margin: 0;
  visibility: visible;
}

.yoo-posts-table .yoo-loading-more {
  display: table-row;
  grid-column: auto;
}

.yoo-posts-table .yoo-loading-more td {
  text-align: center;
  padding: 32px 20px;
  color: var(--yp-text);
  font-size: 14px;
}

/* ========== Delete Confirmation Popup ========== */
/* Must stack above .yp-header-wrapper (z-index: 100000 in yp-admin-core.css) */
.yoo-delete-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.yoo-delete-popup-overlay.visible {
  opacity: 1;
}

.yoo-delete-popup {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.yoo-delete-popup-overlay.visible .yoo-delete-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.yoo-delete-popup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: #fff8e5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yoo-delete-popup-icon .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: var(--_yp-primary, #eda934);
}

.yoo-delete-popup h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--yp-text);
  text-align: center;
}

.yoo-delete-popup p {
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--yp-text);
  text-align: center;
}

.yoo-delete-popup p strong {
  color: var(--yp-text);
  font-weight: 600;
}

.yoo-delete-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.yoo-popup-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 100px;
}

.yoo-popup-cancel {
  background: #f6f7f7;
  color: var(--yp-text);
}

.yoo-popup-cancel:hover {
  background: #e5e7eb;
  color: var(--yp-text);
}

.yoo-popup-delete {
  background: #d63638;
  color: #fff;
}

.yoo-popup-delete:hover {
  background: #b32d2e;
}

.yoo-popup-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

