/* public/styles/blog-table.css */
/* Blog Articles Table - White Mode Design */

:root {
  --blog-table-bg-primary: #ffffff;
  --blog-table-bg-secondary: #f7f7f7;
  --blog-table-bg-tertiary: #f0f0f0;
  --blog-table-text-primary: #111111;
  --blog-table-text-secondary: #666666;
  --blog-table-text-tertiary: #999999;
  --blog-table-accent: #FFC700;
  --blog-table-accent-dark: #E6B500;
  --blog-table-border: #e0e0e0;
  --blog-table-border-light: #f0f0f0;
  --blog-table-hover: #f9f9f9;
  --blog-table-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --blog-table-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
}

.blog-table-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 15px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  background: transparent;
  position: relative;
  z-index: 1;
  overflow: visible; /* No restrictions - body handles scroll */
}

/* ========================================
   HEADER
   ======================================== */

.blog-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: var(--blog-table-bg-primary);
  border-radius: 12px;
  border: 1px solid var(--blog-table-border);
  box-shadow: var(--blog-table-shadow);
}

.blog-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.blog-table-title {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  color: var(--blog-table-text-primary);
}

.blog-stats-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--blog-table-accent);
  color: #000;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid #000;
}

.blog-last-update {
  font-size: 11px;
  color: var(--blog-table-text-secondary);
  font-weight: 500;
}

.blog-header-right {
  display: flex;
  gap: 10px;
}

/* ========================================
   FILTERS
   ======================================== */

.blog-table-filters {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: var(--blog-table-bg-primary);
  border-radius: 12px;
  border: 1px solid var(--blog-table-border);
  box-shadow: var(--blog-table-shadow);
}

.blog-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  flex: 1;
}

.blog-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--blog-table-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-filter-select,
.blog-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--blog-table-border);
  background: var(--blog-table-bg-secondary);
  color: var(--blog-table-text-primary);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.blog-filter-select:focus,
.blog-search-input:focus {
  outline: none;
  border-color: var(--blog-table-accent);
  background: var(--blog-table-bg-primary);
  box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.1);
}

.blog-filter-select:hover,
.blog-search-input:hover {
  border-color: #ccc;
  background: var(--blog-table-bg-primary);
}

.blog-search-wrapper {
  position: relative;
  flex: 2;
}

.blog-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blog-table-text-tertiary);
  pointer-events: none;
}

.blog-search-input {
  padding-left: 40px;
}

/* ========================================
   TABLE
   ======================================== */

.blog-table-container {
  background: var(--blog-table-bg-primary);
  border-radius: 12px;
  border: 1px solid var(--blog-table-border);
  overflow: visible;
  box-shadow: var(--blog-table-shadow);
  margin-bottom: 20px;
}

.table-wrapper {
  overflow: visible;
  background: transparent;
  border: none;
  margin-bottom: 0;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: 1200px; /* Fixed width to prevent columns from disappearing when zoomed */
  table-layout: fixed; /* Fixed layout for consistent column widths */
}

/* Column widths - synchronized header and body */
.blog-table th:nth-child(1),
.blog-table td:nth-child(1) { width: 60px; } /* FOTO */

.blog-table th:nth-child(2),
.blog-table td:nth-child(2) { width: 200px; } /* PAVAD */

.blog-table th:nth-child(3),
.blog-table td:nth-child(3) { width: 100px; } /* TEMA */

.blog-table th:nth-child(4),
.blog-table td:nth-child(4) { width: 250px; } /* APRAŠYMAS */

.blog-table th:nth-child(5),
.blog-table td:nth-child(5) { width: 120px; } /* TAG */

.blog-table th:nth-child(6),
.blog-table td:nth-child(6) { width: 100px; } /* AUT */

.blog-table th:nth-child(7),
.blog-table td:nth-child(7) { width: 100px; } /* LAIK */

.blog-table th:nth-child(8),
.blog-table td:nth-child(8) { width: 70px; } /* PERŽ */

.blog-table th:nth-child(9),
.blog-table td:nth-child(9) { width: 70px; } /* MĖG */

.blog-table th:nth-child(10),
.blog-table td:nth-child(10) { width: 70px; } /* KOM */

.blog-table th:nth-child(11),
.blog-table td:nth-child(11) { width: 60px; } /* BOT# */

/* TABLE HEAD */
.blog-table thead {
  background: var(--blog-table-bg-tertiary);
  border-bottom: 2px solid var(--blog-table-border);
}

.blog-table thead th {
  padding: 4px 4px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blog-table-text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid var(--blog-table-border);
}

.blog-table thead th.text-left {
  text-align: left;
}

/* Sortable columns */
.blog-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 24px;
  transition: color 0.2s ease;
}

.blog-table thead th.sortable:hover {
  color: var(--blog-table-text-primary);
  background: var(--blog-table-hover);
}

.blog-table thead th.sortable::after {
  content: '⇅';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blog-table-text-tertiary);
  font-size: 12px;
}

.blog-table thead th.sortable.sort-asc::after {
  content: '▲';
  color: var(--blog-table-accent-dark);
}

.blog-table thead th.sortable.sort-desc::after {
  content: '▼';
  color: var(--blog-table-accent-dark);
}

/* TABLE BODY */
.blog-table tbody {
  background: var(--blog-table-bg-primary);
}

.blog-table tbody tr {
  border-bottom: 1px solid var(--blog-table-border-light);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-table tbody tr:hover {
  background: var(--blog-table-hover);
  box-shadow: inset 0 0 0 1px var(--blog-table-border);
}

.blog-table tbody tr:last-child {
  border-bottom: none;
}

.blog-table tbody td {
  padding: 4px 4px;
  vertical-align: middle;
  color: var(--blog-table-text-primary);
  border-bottom: 1px solid var(--blog-table-border-light);
}

.blog-table tbody td.text-left {
  text-align: left;
}

.blog-table tbody td.text-center {
  text-align: center;
}

/* ========================================
   THUMBNAIL COLUMN
   ======================================== */

.blog-thumbnail-cell {
  width: 60px;
  padding: 2px !important;
  text-align: center;
}

.blog-thumbnail-wrapper {
  width: 56px;
  height: 42px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s 0s;
  position: relative;
  border: 1px solid var(--blog-table-border);
}

.blog-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-thumbnail-wrapper:hover {
  transform: scale(1.8);
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border-color: var(--blog-table-accent);
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s 0s;
}

/* ========================================
   TITLE COLUMN
   ======================================== */

.blog-title-cell {
  max-width: 200px;
  font-weight: 600;
  color: var(--blog-table-text-primary);
  font-size: 11px;
}

.blog-title-link {
  color: var(--blog-table-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-title-link:hover {
  color: var(--blog-table-accent-dark);
  text-decoration: underline;
}

/* ========================================
   CATEGORY BADGE
   ======================================== */

.blog-category-cell {
  text-align: center;
}

.blog-category-badge {
  display: inline-block;
  background: var(--blog-table-bg-tertiary);
  color: var(--blog-table-text-primary);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--blog-table-border);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.blog-category-badge:hover {
  background: var(--blog-table-accent);
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(255, 199, 0, 0.3);
}

/* ========================================
   DESCRIPTION COLUMN
   ======================================== */

.blog-description-cell {
  max-width: 250px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--blog-table-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* ========================================
   HASHTAGS COLUMN
   ======================================== */

.blog-tags-cell {
  max-width: 120px;
  text-align: left;
  font-size: 10px;
}

.blog-hashtag {
  display: inline;
  background: transparent;
  color: var(--blog-table-text-secondary);
  padding: 0;
  margin-right: 6px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  text-shadow: 0 0 1px rgba(0,0,0,0.1);
}

.blog-hashtag:hover {
  color: #000;
  background: var(--blog-table-accent);
  padding: 2px 6px;
  border-radius: 3px;
  text-shadow: none;
  text-decoration: none;
}

.blog-no-tags {
  color: var(--blog-table-text-tertiary);
  font-size: 12px;
}

/* ========================================
   AUTHOR COLUMN
   ======================================== */

.blog-author-cell {
  text-align: center;
  font-weight: 500;
}

.blog-author-link {
  color: var(--blog-table-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.blog-author-link:hover {
  color: var(--blog-table-accent-dark);
  text-decoration: underline;
}

.blog-author-admin {
  font-size: 1.2rem;
  cursor: default;
  display: inline-block;
}

/* ========================================
   TIME COLUMN
   ======================================== */

.blog-time-cell {
  text-align: center;
  font-size: 12px;
  color: var(--blog-table-text-secondary);
  white-space: nowrap;
}

/* ========================================
   STATS COLUMNS (Views, Likes, Comments)
   ======================================== */

.blog-stats-cell {
  text-align: center;
  font-weight: 600;
  color: var(--blog-table-text-primary);
  white-space: nowrap;
}

.blog-comments-link {
  color: var(--blog-table-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.blog-comments-link:hover {
  color: var(--blog-table-accent-dark);
  text-decoration: underline;
}

/* ========================================
   FOOTER
   ======================================== */

.blog-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--blog-table-bg-primary);
  border-top: 1px solid var(--blog-table-border);
  margin-top: 0;
}

.blog-footer-stats {
  font-size: 12px;
  color: var(--blog-table-text-secondary);
  font-weight: 500;
}

.blog-footer-stats strong {
  color: var(--blog-table-text-primary);
  font-weight: 700;
}

.blog-load-more-btn {
  background: var(--blog-table-accent);
  color: #000;
  border: 2px solid #000;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.blog-load-more-btn:hover {
  background: var(--blog-table-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 199, 0, 0.4);
}

.blog-load-more-btn:active {
  transform: translateY(0);
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */

.blog-loading-row,
.blog-empty-row,
.blog-error-row {
  text-align: center;
  padding: 40px 20px;
  color: var(--blog-table-text-secondary);
  font-size: 14px;
}

.blog-loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--blog-table-border);
  border-top-color: var(--blog-table-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.blog-empty-row {
  color: var(--blog-table-text-tertiary);
  font-style: italic;
}

.blog-error-row {
  color: #EF4444;
  background: #FEE2E2;
  border-radius: 8px;
  margin: 20px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet and small desktop - don't hide columns, we have horizontal scroll */
@media (max-width: 1024px) {
  .blog-table-wrapper {
    font-size: 11px;
  }

  .blog-table {
    font-size: 11px;
  }

  /* Don't hide TAG and APRAŠYMAS - user can scroll horizontally */
}

@media (max-width: 768px) {
  .blog-table-wrapper {
    font-size: 11px;
    padding: 5px;
  }

  .blog-table-header {
    flex-direction: column;
    gap: 10px;
  }

  .blog-table-filters {
    flex-direction: column;
  }

  .blog-filter-group {
    min-width: 100%;
  }

  .table-wrapper {
    overflow-x: scroll;
  }

  .blog-table {
    min-width: 1200px;
  }
}

@media (min-width: 1920px) {
  .blog-table-title {
    font-size: 28px;
  }

  .blog-table {
    font-size: 14px;
  }
}

/* ========================================
   VIEW TOGGLE BUTTONS
   ======================================== */

/* View toggle buttons removed - table view only */
