/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* Variables */
:root {
  --font-main: 'Montserrat', sans-serif;
  --font-heading: 'Montserrat', sans-serif;

  /* Color palette */
  --color-bg-light: #f5f7f9;
  --color-white: #ffffff;
  --color-primary: #94B4A4;
  --color-primary-dark: #558a71;
  --color-secondary: #D08C60;
  --color-text: #3a3937;
  --color-text-muted: #6c757d;
  --color-border: #e9ecef;
  --color-danger: #dc3545;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-info: #17a2b8;
  
  /* Layout */
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --header-height: 70px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg-light);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  margin-bottom: 1rem;
  font-weight: 600;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button, .btn {
  cursor: pointer;
  font-family: var(--font-main);
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

/* Admin layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-white);
  border-right: 1px solid var(--color-border);
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.sidebar-logo {
  height: 60px;
  width: auto;
  margin-bottom: 0.5rem;
}

.sidebar-header h2 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--color-primary);
  transition: var(--transition);
}

.sidebar.collapsed .sidebar-header h2 {
  display: none;
}

.sidebar-user {
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.user-info {
  overflow: hidden;
  transition: var(--transition);
}

.user-info p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .user-info {
  width: 0;
  opacity: 0;
}

.sidebar-nav {
  padding: 1.25rem 0;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-nav ul {
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--color-text);
  transition: var(--transition);
  position: relative;
  font-weight: 500;
}

.sidebar-nav a i {
  margin-right: 1rem;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  transition: var(--transition);
  width: 20px;
  text-align: center;
}

.sidebar-nav a:hover, 
.sidebar-nav a.active {
  background-color: rgba(148, 180, 164, 0.1);
  color: var(--color-primary);
}

.sidebar-nav a:hover i, 
.sidebar-nav a.active i {
  color: var(--color-primary);
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--color-primary);
}

.sidebar.collapsed .sidebar-nav a {
  padding: 0.75rem;
  justify-content: center;
}

.sidebar.collapsed .sidebar-nav a i {
  margin-right: 0;
  font-size: 1.25rem;
}

.sidebar.collapsed .sidebar-nav a span {
  display: none;
}

.sidebar-footer {
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--color-border);
}

.logout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--color-danger);
  background-color: transparent;
  border: 1px solid var(--color-danger);
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition);
}

.logout-button:hover {
  background-color: var(--color-danger);
  color: white;
}

.logout-button i {
  margin-right: 0.5rem;
}

.sidebar.collapsed .logout-button span {
  display: none;
}

.sidebar.collapsed .logout-button i {
  margin-right: 0;
}

/* Main content */
.main-content {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  padding: 1.5rem;
  padding-top: calc(var(--header-height) + 1.5rem);
}

body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* Content header */
.content-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  background-color: var(--color-white);
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  box-shadow: var(--shadow);
  z-index: 99;
  transition: var(--transition);
}

body.sidebar-collapsed .content-header {
  left: var(--sidebar-collapsed-width);
}

.content-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--color-text);
  margin-right: 1rem;
  cursor: pointer;
}

/* Content section */
.content-section {
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  overflow: hidden;
}

.section-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn:focus {
  outline: none;
}

.btn i {
  margin-right: 0.5rem;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.6rem 1.5rem;
  font-size: 1.1rem;
}

.btn-primary {
  color: white;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-secondary {
  color: var(--color-text);
  background-color: #e9ecef;
  border-color: #e9ecef;
}

.btn-secondary:hover {
  background-color: #d1d7dc;
  border-color: #d1d7dc;
}

.btn-danger {
  color: white;
  background-color: var(--color-danger);
  border-color: var(--color-danger);
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-outline-primary {
  color: var(--color-primary);
  background-color: transparent;
  border-color: var(--color-primary);
}

.btn-outline-primary:hover {
  color: white;
  background-color: var(--color-primary);
}

.btn-outline-danger {
  color: var(--color-danger);
  background-color: transparent;
  border-color: var(--color-danger);
}

.btn-outline-danger:hover {
  color: white;
  background-color: var(--color-danger);
}

.btn-group {
  display: flex;
  gap: 0.5rem;
}

/* Forms */
.form-container {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

.form-row > .form-group {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

.col-md-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}

.col-md-8 {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
  background-color: white;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(148, 180, 164, 0.25);
}

textarea.form-control {
  resize: vertical;
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

.form-check {
  padding-left: 1.5rem;
  position: relative;
}

.form-check-input {
  position: absolute;
  margin-top: 0.25rem;
  margin-left: -1.5rem;
}

.form-check-label {
  margin-bottom: 0;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Image preview */
.image-preview-container {
  position: relative;
  width: 100%;
  height: 200px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background-color: #f8f9fa;
}

#featured-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
}

.image-placeholder i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

/* Tables */
.table-container {
  padding: 1.5rem;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.02);
}

.table-thumbnail {
  width: 80px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-success {
  color: white;
  background-color: var(--color-success);
}

.badge-warning {
  color: #212529;
  background-color: var(--color-warning);
}

.badge-info {
  color: white;
  background-color: var(--color-info);
}

/* Notifications */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.notification {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease forwards;
  overflow: hidden;
}

.notification.hiding {
  animation: slideOut 0.3s ease forwards;
}

.notification-icon {
  margin-right: 12px;
  font-size: 1.2rem;
}

.notification.success .notification-icon {
  color: var(--color-success);
}

.notification.error .notification-icon {
  color: var(--color-danger);
}

.notification.warning .notification-icon {
  color: var(--color-warning);
}

.notification.info .notification-icon {
  color: var(--color-info);
}

.notification-message {
  flex-grow: 1;
  font-size: 0.95rem;
}

.notification-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-left: 10px;
  font-size: 0.9rem;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Categories */
.categories-list-container {
  margin-top: 2rem;
}

.categories-list {
  margin-top: 1rem;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Confirm dialog */
.confirm-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-dialog {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.confirm-dialog-message {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.confirm-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.loading-spinner i {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.loading-message {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .content-header {
    left: 0 !important;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-row > .form-group {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .content-header h1 {
    font-size: 1.25rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Make sure these styles are added to your admin.css */

/* Fix for any page with a different content container class */
body.sidebar-collapsed .main-content,
body.sidebar-collapsed .admin-content, 
body.sidebar-collapsed .blog-content,
body.sidebar-collapsed .education-content,
body.sidebar-collapsed .treatments-content,
body.sidebar-collapsed .testimonial-content,
body.sidebar-collapsed .content-container {
  margin-left: var(--sidebar-collapsed-width) !important;
}

body.sidebar-collapsed .main-content,
body:not(.sidebar-collapsed) .admin-content,
body:not(.sidebar-collapsed) .blog-content,
body:not(.sidebar-collapsed) .education-content,
body:not(.sidebar-collapsed) .treatments-content,
body:not(.sidebar-collapsed) .testimonial-content,
body:not(.sidebar-collapsed) .content-container {
  margin-left: var(--sidebar-width) !important;
  transition: var(--transition) !important;
}

.workshop-icon {
  background-color: #9c27b0; /* Purple color for workshops */
}

/* Status badges for workshops */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-left: 5px;
  cursor: help;
}

.status-active {
  color: #28a745;
}

.status-inactive {
  color: #6c757d;
}

/* Optional: add hover effect to show full status text */
.status-badge:hover::after {
  content: attr(title);
  position: absolute;
  background: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
  margin-top: -30px;
  z-index: 100;
}