/* Main Styles for Blog Management Module */
:root {
  --primary-color: #C4212A;
  --secondary-color: #6D6E71;
  --accent-color: #FED219;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #333333;
  --white: #ffffff;
  --danger: #dc3545;
  --success: #28a745;
  --warning: #ffc107;
  --info: #17a2b8;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--dark-gray);
  background-color: #f8f9fa;
}

.container-fluid {
  padding: 0;
}

/* Header Styles */
.header {
  background-color: #C4212A;
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
  height: 40px;
  width: auto;
}

.header h1 {
  font-size: 1.5rem;
  margin: 0;
  color: white;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.user-name {
  margin-right: 10px;
  font-weight: 500;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid white;
}

.breadcrumb {
  background-color: transparent;
  margin-bottom: 0;
  padding: 0.5rem 0;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: white;
}

/* Main Content Styles */
.main-content {
  padding: 2rem;
}

.nav-tabs .nav-link {
  color: var(--secondary-color);
  font-weight: 500;
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
}

/* Filter Bar Styles */
.filter-bar {
  background-color: var(--white);
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.filter-group {
  margin-right: 15px;
  margin-bottom: 10px;
  flex: 1;
  min-width: 200px;
}

.filter-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 0.9rem;
}

.filter-control {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
}

.filter-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.filter-buttons .btn {
  margin-right: 10px;
}

.filter-buttons .ml-auto {
  margin-left: auto;
}

/* Table Styles */
.table-container {
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table th {
  background-color: var(--light-gray);
  border-bottom: 2px solid var(--medium-gray);
  color: var(--secondary-color);
  font-weight: 600;
}

.table td {
  vertical-align: middle;
  font-size: 0.875rem; /* Smaller font size for better space utilization */
  padding: 0.75rem 0.5rem; /* Reduced horizontal padding */
}

.table th {
  font-size: 0.875rem; /* Smaller font size for headers */
  padding: 0.75rem 0.5rem; /* Reduced horizontal padding */
}

/* Specific column width optimizations for posts table */
.posts-table th:nth-child(1), 
.posts-table td:nth-child(1) {
  width: 3%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(2), 
.posts-table td:nth-child(2) {
  width: 20%;
  font-size: 0.85rem;
}

.posts-table th:nth-child(3), 
.posts-table td:nth-child(3) {
  width: 12%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(4), 
.posts-table td:nth-child(4) {
  width: 10%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(5), 
.posts-table td:nth-child(5) {
  width: 8%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(6), 
.posts-table td:nth-child(6) {
  width: 8%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(7), 
.posts-table td:nth-child(7) {
  width: 5%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(8), 
.posts-table td:nth-child(8) {
  width: 5%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(9), 
.posts-table td:nth-child(9) {
  width: 8%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(10), 
.posts-table td:nth-child(10) {
  width: 6%;
  font-size: 0.8rem;
}

.posts-table th:nth-child(11), 
.posts-table td:nth-child(11) {
  width: 15%; /* Actions column - wider */
  font-size: 0.75rem;
}

/* Make action buttons smaller */
.posts-table .btn-sm {
  padding: 0.25rem 0.4rem;
  font-size: 0.7rem;
  margin-right: 0.2rem;
}

.table-responsive {
  min-height: 400px;
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-top: 1px solid var(--medium-gray);
}

.pagination-info {
  color: var(--secondary-color);
}

.pagination .page-link {
  color: var(--primary-color);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Button Styles */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #a31b22;
  border-color: #a31b22;
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Form Styles */
.form-container {
  background-color: var(--white);
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-title {
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 600;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
}

.required-field::after {
  content: "*";
  color: var(--danger);
  margin-left: 4px;
}

/* WYSIWYG Editor Styles */
.editor-container {
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  overflow: hidden;
}

.editor-toolbar {
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--medium-gray);
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
}

.editor-toolbar button {
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 5px;
  margin-right: 5px;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background-color: var(--medium-gray);
}

.editor-toolbar button.active {
  background-color: var(--medium-gray);
}

.editor-content {
  padding: 15px;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
}

/* Preview Styles */
.preview-header {
  background-color: var(--accent-color);
  color: var(--dark-gray);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.preview-content {
  background-color: var(--white);
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Blog Post Styles */
.post-header {
  margin-bottom: 20px;
}

.post-title {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.post-meta {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.post-tags {
  margin-bottom: 15px;
}

.tag-badge {
  background-color: var(--light-gray);
  color: var(--secondary-color);
  padding: 5px 10px;
  border-radius: 15px;
  margin-right: 5px;
  display: inline-block;
  font-size: 0.8rem;
}

.post-content {
  margin-bottom: 30px;
}

/* Comments Styles */
.comments-section {
  margin-top: 30px;
  border-top: 1px solid var(--medium-gray);
  padding-top: 20px;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.comment-item {
  background-color: var(--light-gray);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 500;
}

.comment-date {
  color: var(--secondary-color);
  font-size: 0.8rem;
}

.comment-rating {
  color: var(--accent-color);
}

.comment-content {
  margin-bottom: 10px;
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
}

.comment-actions button {
  margin-left: 10px;
}

/* Rating Styles */
.rating {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.rating-average {
  font-weight: 600;
  margin-right: 5px;
}

/* Social Sharing Styles */
.social-sharing {
  margin-top: 20px;
  margin-bottom: 20px;
}

.social-sharing button {
  margin-right: 10px;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.social-facebook {
  background-color: #3b5998;
  color: white;
}

.social-twitter {
  background-color: #1da1f2;
  color: white;
}

.social-whatsapp {
  background-color: #25d366;
  color: white;
}

.social-link {
  background-color: var(--secondary-color);
  color: white;
}

/* Modal Styles */
.modal-header {
  background-color: var(--primary-color);
  color: var(--white);
}

.modal-footer {
  border-top: 1px solid var(--medium-gray);
  padding: 15px;
}

/* Status Badges */
.status-badge {
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-published {
  background-color: var(--success);
  color: white;
}

.status-draft {
  background-color: var(--warning);
  color: var(--dark-gray);
}

.status-archived {
  background-color: var(--secondary-color);
  color: white;
}

/* Utility Classes */
.page-section {
  margin-bottom: 30px;
}

.d-none {
  display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .filter-group {
    flex: 100%;
  }
  
  .filter-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-buttons .btn {
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .filter-buttons .ml-auto {
    margin-left: 0;
  }
}
