/* ==========================================================================
   HOME NEWS - ADMIN NEWS MANAGEMENT CSS
   File: assets/css/news-management.css
   ========================================================================== */

/* Page Title & Action Bar */
.page-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title-content h1 {
  font-family: var(--font-body);
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.page-title-content p {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
}

/* Filter Card Panel */
.filter-card-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.filter-grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr auto;
  gap: 14px;
  align-items: flex-end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.filter-item .form-control {
  height: 38px;
  padding: 6px 12px;
  font-size: 0.86rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
}

.filter-item .form-control:focus {
  background: #ffffff;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.12);
}

.filter-actions {
  display: flex;
  gap: 8px;
}

/* Bulk Action Toolbar */
.bulk-action-toolbar {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.2s ease-out;
}

.bulk-action-toolbar.show {
  display: flex;
}

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

.bulk-info-text {
  font-size: 0.88rem;
  font-weight: 600;
}

.bulk-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-bulk {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-bulk-publish {
  background: #16a34a;
  color: #ffffff;
}
.btn-bulk-publish:hover { background: #15803d; }

.btn-bulk-draft {
  background: #475569;
  color: #ffffff;
}
.btn-bulk-draft:hover { background: #334155; }

.btn-bulk-delete {
  background: #dc2626;
  color: #ffffff;
}
.btn-bulk-delete:hover { background: #b91c1c; }

/* News Management Table Enhancements */
.article-thumbnail-cell {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
  flex-shrink: 0;
}

.article-thumbnail-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-headline-cell {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  font-size: 0.9rem;
}

.article-headline-cell a {
  color: #0f172a;
  transition: color 0.15s ease;
}

.article-headline-cell a:hover {
  color: var(--primary-red);
}

.article-author-cell {
  font-size: 0.84rem;
  color: #334155;
  font-weight: 500;
}

.article-date-cell {
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
}

.article-views-cell {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.86rem;
}

/* Action Dropdown Menu */
.action-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.action-trigger-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.action-trigger-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.action-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 150px;
  padding: 6px 0;
  margin-top: 4px;
  z-index: 50;
  display: none;
}

.action-dropdown-menu.show {
  display: block;
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: #334155;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.action-menu-item:hover {
  background: #f8fafc;
  color: var(--primary-red);
}

.action-menu-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.action-menu-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

/* Pagination Bar */
.table-pagination-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-stats {
  font-size: 0.84rem;
  color: #64748b;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-page {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-page:hover:not(:disabled) {
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.btn-page.active {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #ffffff;
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Empty State */
.empty-table-state {
  text-align: center;
  padding: 48px 24px;
  color: #64748b;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* Responsive Overrides */
@media screen and (max-width: 1100px) {
  .filter-grid-layout {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .filter-grid-layout {
    grid-template-columns: 1fr;
  }
  .bulk-action-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .table-pagination-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
