/* public/styles/personal-blog.css */
/* Personal Blog Table Styling */
/* 4 Categories: Gražu, Įdomu, Linksma, Svarbu */
/* Drag-drop with position ranking 1-100 */
/* Created: 2025-01-20 */

/* Wrapper - Compact ŽINIOS Style */
.personal-blog-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 15px;
  font-size: 11px;
}

/* Header - Compact */
.personal-blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px 15px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.personal-blog-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.personal-blog-header h2 i {
  color: #FFCC00;
  font-size: 16px;
}

.personal-blog-create-btn {
  padding: 6px 12px;
  background: #FFCC00;
  color: #000;
  border: 2px solid #000;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.personal-blog-create-btn:hover {
  background: #E6B500;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(255, 204, 0, 0.3);
}

/* Empty State */
.personal-blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.personal-blog-empty i {
  font-size: 4rem;
  color: #ddd;
  margin-bottom: 20px;
}

.personal-blog-empty p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.personal-blog-empty button {
  padding: 12px 24px;
  background: #FFCC00;
  color: #111;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.personal-blog-empty button:hover {
  background: #FFD700;
  transform: translateY(-2px);
}

/* Table Container - Compact */
.personal-blog-table-container {
  width: 100%;
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
}

/* Table - Ultra Compact ŽINIOS Style */
.personal-blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: 900px;
  table-layout: fixed;
}

.personal-blog-table thead {
  background: #f0f0f0;
  border-bottom: 2px solid #e0e0e0;
}

.personal-blog-table thead th {
  padding: 3px 2px;
  text-align: center;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  white-space: nowrap;
  border-bottom: 2px solid #e0e0e0;
}

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

.personal-blog-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
  cursor: move;
}

.personal-blog-table tbody tr:hover {
  background: #f9f9f9;
}

.personal-blog-table tbody td {
  padding: 2px 2px;
  vertical-align: middle;
  color: #111;
  border-bottom: 1px solid #f0f0f0;
}

/* Drag Handle Cell - Compact */
.drag-handle-cell {
  text-align: center;
  padding: 2px !important;
}

.drag-handle {
  cursor: grab;
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.2s ease;
  margin-right: 4px;
}

.drag-handle:hover {
  color: #475569;
}

.drag-handle:active {
  cursor: grabbing;
}

.position-number {
  font-weight: 700;
  font-size: 11px;
  color: #64748b;
}

/* Actions - Ultra Compact */
.personal-blog-actions {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.blog-action-btn {
  padding: 2px 6px;
  border: none;
  background: #f0f0f0;
  color: #666;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.blog-action-btn i {
  font-size: 11px;
}

.blog-action-btn:hover {
  background: #e0e0e0;
  color: #111;
  transform: translateY(-1px);
}


/* Text alignment utilities */
.text-center {
  text-align: center;
}

/* SortableJS States */
.sortable-ghost {
  opacity: 0.4;
  background: #f1f5f9;
}

.sortable-drag {
  opacity: 1;
  background: white;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transform: rotate(2deg);
}

.updating-position {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .personal-blog-table {
    font-size: 0.9rem;
  }

  .personal-blog-header h2 {
    font-size: 1.5rem;
  }

  .personal-blog-excerpt {
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .personal-blog-wrapper {
    padding: 10px;
  }

  .personal-blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .personal-blog-create-btn {
    width: 100%;
    justify-content: center;
  }

  .personal-blog-table-container {
    border-radius: 8px;
  }

  .personal-blog-table {
    font-size: 0.85rem;
  }

  .personal-blog-table thead th {
    padding: 12px 8px;
    font-size: 0.75rem;
  }

  .personal-blog-table tbody td {
    padding: 12px 8px;
  }

  .personal-blog-thumbnail {
    width: 60px;
    height: 45px;
  }

  .personal-blog-excerpt {
    display: none; /* Hide on mobile */
  }

  .position-number {
    font-size: 0.95rem;
    padding: 3px 6px;
  }

  .personal-blog-actions {
    flex-direction: column;
    gap: 4px;
  }

  .personal-blog-action-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

/* Error State */
.profile-error {
  text-align: center;
  padding: 60px 20px;
  color: #991b1b;
}

.profile-error i {
  font-size: 3rem;
  margin-bottom: 15px;
}

.profile-error p {
  font-size: 1.1rem;
}

/* Loading State */
.profile-loading {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
  font-size: 1.1rem;
}

/* Type Selector Buttons (for create/edit modals) */
.type-selector-buttons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.type-selector-btn {
  flex: 1;
  padding: 14px 20px;
  background: #f8f9fa;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.type-selector-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.type-selector-btn.active {
  background: #FFCC00;
  border-color: #FFCC00;
  color: #111;
}

.type-selector-btn i {
  font-size: 1.2rem;
}

/* Print Styles */
@media print {
  .personal-blog-header button,
  .personal-blog-actions,
  .drag-handle {
    display: none;
  }

  .personal-blog-table tbody tr {
    cursor: default;
  }
}
