/* General Styles */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #e2e8f0;
  --secondary-dark: #cbd5e0;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Dark Mode Styles */
body[data-theme="dark"] {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #334155;
  --secondary-dark: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --bg-light: #0f172a;
  --bg-white: #1e293b;
  --border-color: #334155;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

a {
  text-decoration: none;
  color: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navbar Styles */
.navbar {
  background-color: var(--bg-white);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.navbar-links-wrapper {
  display: flex;
  align-items: center;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease-in-out;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Dropdown Styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background-color: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-toggle:hover {
  background-color: var(--secondary);
  color: var(--text-primary);
}

.dropdown-arrow {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 8px;
  color: #94a3b8;
  vertical-align: middle;
  transition: transform 0.3s ease-in-out;
}

.dropdown-arrow.rotate {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  width: 10rem;
  background-color: var(--bg-white);
  border-radius: 0.375rem;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  padding: 0.25rem 0;
  border: 1px solid var(--border-color);
  display: none;
}

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

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background-color 0.2s ease-in-out;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--secondary);
}

.dropdown-item-flex {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-spacer {
  height: 64px;
}

/* Main Content Area */
.main-content {
  padding: 1.25rem;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background-color: var(--bg-light);
}

/* Form Styles (General) */
.form-section {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.form-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.form-field {
  margin-bottom: 1rem; /* Adjusted margin-bottom */
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  /* border: 1px solid #d1d5db; */
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--bg-white);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

/* Custom Select Wrapper */
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-wrapper .form-select {
  padding-right: 2.5rem; /* Make space for the icon */
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  pointer-events: none; /* Allow clicks to pass through to the select */
  color: #94a3b8;
}

/* Checkbox and Radio styling */
.form-check-input,
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

input[type="radio"] {
  border-radius: 50%;
}

.form-check-input:checked,
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:checked::before,
input[type="checkbox"]:checked::before {
  content: "\2713";
  display: block;
  color: var(--bg-white);
  font-size: 0.75rem;
  line-height: 1rem;
  text-align: center;
}

.form-check-input:checked::before,
input[type="radio"]:checked::before {
  content: "";
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--bg-white);
  border-radius: 50%;
  margin: 0.25rem;
}

.form-check-input:focus,
input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

/* Error message styling */
#error_explanation {
  background-color: #fee2e2; /* Red-100 */
  border: 1px solid #ef4444; /* Red-400 */
  color: #991b1b; /* Red-700 */
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
}

#error_explanation h2 {
  color: #991b1b;
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

#error_explanation ul {
  list-style-type: disc;
  margin-left: 1.25rem;
  padding-left: 0;
}

#error_explanation li {
  margin-bottom: 0.5rem;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end; /* Align buttons to the right */
}

/* Button Styles (General) */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bg-white);
  background-color: var(--primary);
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

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

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

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

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

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

.btn-danger {
  background-color: #ef4444;
  color: var(--bg-white);
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-link {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  background-color: transparent !important;
  /* color: rgb(1, 88, 135) !important; */
  color: var(--primary) !important;
  cursor: pointer;
}

.btn-link:focus {
  outline: none;
  box-shadow: none;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.action-link:hover {
  text-decoration: underline;
}

.action-link-danger {
  color: #ef4444;
}

.action-link-danger:hover {
  color: #dc2626;
}

.actions-bar {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  z-index: 999; /* Below navbar-links (1000) but above other content */
  display: none;
}

.overlay.show {
  display: block;
}

/* Inline Form Fields and Actions */
.form-fields-inline {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.form-actions-inline {
  display: flex;
  align-items: flex-end;
  padding-top: 1.875rem;
}

/* Report Sections */
.report-section {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.report-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.report-summary {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
  font-weight: 600;
  font-size: 1.125rem;
}

/* Responsive Navbar (Mobile Menu) */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}

.size-6 {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text-primary);
}

.navbar-links-wrapper {
  display: flex;
  flex-grow: 1;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
  }

  .navbar-links {
    display: flex;
    flex-direction: column;
    width: 250px;
    background-color: var(--bg-white);
    position: fixed;
    top: 0;
    right: -250px;
    height: 100%;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border-left: 1px solid var(--border-color);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
  }

  .navbar-links.open {
    display: flex;
    right: 0;
  }

  .mobile-menu-button {
    display: block;
  }
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  list-style: none;
  padding: 0;
  gap: 0.5rem;
}

.pagination .page-link {
  display: block;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  color: var(--primary);
  transition: all 0.2s ease-in-out;
  font-weight: 500;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.pagination .page-link:hover {
  background-color: var(--primary);
  color: var(--bg-white);
  border-color: var(--primary);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary);
  color: var(--bg-white);
  border-color: var(--primary);
  pointer-events: none;
}

.pagination .page-item.disabled .page-link {
  color: var(--text-secondary);
  cursor: not-allowed;
  background-color: var(--bg-light);
}

.pagination .page-link svg {
  width: 1.25rem; /* 20px */
  height: 1.25rem; /* 20px */
  vertical-align: middle;
  stroke-width: 2; /* Adjust as needed */
}

.pagination .page-link:hover svg {
  stroke: var(--bg-white);
}

.pagination-controls.per-page {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-controls.per-page > .actions-bar {
  margin-bottom: 0px;
}

.pagination-controls.per-page > .wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Toast Notifications - Enhanced Design */
#toast-container {
  position: fixed;
  bottom: 1.5rem; /* Slightly more space from top */
  right: 1.5rem; /* Slightly more space from right */
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Increased gap between toasts */
}

.toast-notification {
  background-color: var(--bg-white);
  color: var(--text-primary);
  padding: 1rem 1.25rem; /* Increased padding */
  border-radius: 0.5rem; /* Slightly more rounded corners */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* More prominent shadow */
  min-width: 280px; /* Slightly wider */
  max-width: 400px; /* Slightly wider */
  opacity: 1;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out; /* Add transform for slide effect */
  transform: translateX(0);
  /* white-space: pre-wrap; */
}

.toast-notification p {
  padding: 0;
  margin: 0;
}

/* Dark Mode Toast Styles */
body[data-theme="dark"] .toast-success,
body[data-theme="dark"] .toast-notice {
  border-color: #10b981; /* Emerald-500 */
  background-color: #052e16; /* Green-950 */
  color: #a7f3d0; /* Green-200 */
}

body[data-theme="dark"] .toast-error,
body[data-theme="dark"] .toast-alert {
  border-color: #f87171; /* Red-400 */
  background-color: #450a0a; /* Red-950 */
  color: #fecaca; /* Red-200 */
}

.toast-notification.fade-out {
  opacity: 0;
  transform: translateX(100%); /* Slide out to the right */
}

.toast-success {
  border: 1px solid #34d399; /* Green-400 */
  background-color: #d1fae5; /* Green-100 */
  color: #065f46; /* Green-700 */
}

.toast-error {
  border: 1px solid #ef4444; /* Red-400 */
  background-color: #fee2e2; /* Red-100 */
  color: #991b1b; /* Red-700 */
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-white);
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  transition: transform 0.3s ease-in-out, width 0.3s ease-in-out; /* Add width transition */
  z-index: 1000;
}

/* Collapsed state for desktop */
.dashboard-layout.collapsed .sidebar {
  transform: translateX(-260px); /* Hide sidebar */
  width: 0; /* Collapse width */
}

.sidebar-header {
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.sidebar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.sidebar-link.active {
  background-color: var(--primary);
  color: white;
}

.sidebar-divider {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.dashboard-main-content {
  margin-left: 260px;
  width: calc(100% - 260px);
  padding: 2rem;
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out; /* Add width transition */
}

/* Adjust main content margin when sidebar is collapsed on desktop */
.dashboard-layout.collapsed .dashboard-main-content {
  margin-left: 0;
  width: 100%;
}

.dashboard-header {
  margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.stat-card-icon {
  color: var(--primary);
}

.stat-card-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 0.25rem 0;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Dashboard Sidebar Responsive Styles (Reverted) */
.sidebar-toggle-button {
  display: block; /* Always show the button */
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  background-color: transparent;
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  z-index: 999; /* Below sidebar (1000) but above other content */
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

.social-login {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.social-login button span {
  margin-left: auto;
}

.to-login,
.forgot-password {
  text-align: right;
  font-size: 0.95em;
  margin-top: 1rem;
}

.forgot-notyet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95em;
  margin-top: 1rem;
}

/* Settings layout */
section.settings {
  display: flex;
  gap: 1rem;
}

section.settings nav {
  width: 200px;
}

section.settings nav a {
  display: block;
}

/* Posts */
.post .title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 1rem;
}

.post .content {
  border-top: 1px solid var(--border-color);
  padding-block: 1rem;
}

.post .post-info,
.comment .comment-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  color: var(--text-secondary);
  padding-bottom: 0.5rem;
}

.post .attachments {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.post .attachment-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.post .attachment {
  text-align: center;
}

.comment .comment-info svg,
.post .post-info svg {
  margin-top: 6px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%); /* Hide sidebar by default on mobile */
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.open {
    transform: translateX(0); /* Show sidebar on mobile */
  }

  .dashboard-main-content {
    margin-left: 0;
    width: 100%;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .dropdown-menu {
    left: -4rem;
  }
}

/* Custom */
.flex {
  display: flex;
  align-items: center;
}

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

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.box {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

/* Likes */
.like-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  line-height: 24px;
}

.like-wrapper button {
  border: none;
  padding: 0px;
  background-color: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.like-wrapper .like {
  color: lightcoral;
}
.like-wrapper .likes-count {
  min-width: 1rem;
  text-align: center;
}

.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}

.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

/* Custom File Input Styles */
.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* Space between button and file name */
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 0.375rem; /* Padding around the elements */
  background-color: var(--bg-white);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.file-input-wrapper:focus-within {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.hidden-file-input {
  /* Hide the default file input */
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.custom-file-input-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bg-white);
  background-color: var(--primary);
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  flex-shrink: 0; /* Prevent button from shrinking */
}

.custom-file-input-button:hover {
  background-color: var(--primary-dark);
}

.file-name {
  flex-grow: 1; /* Allow file name to take available space */
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis for long file names */
}

/* Dark Mode Toast Styles */
body[data-theme="dark"] .toast-success {
  border-color: #10b981; /* Emerald-500 */
  background-color: #052e16; /* Green-950 */
  color: #a7f3d0; /* Green-200 */
}

body[data-theme="dark"] .toast-error {
  border-color: #f87171; /* Red-400 */
  background-color: #450a0a; /* Red-950 */
  color: #fecaca; /* Red-200 */
}

/* Action Text 첨부파일 스타일 개선 */
.trix-content .attachment--file {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 0.6em 1em;
  border-radius: 0.375rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: background-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.trix-content .attachment--file:hover {
  background-color: var(--secondary);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

/* 파일 아이콘 추가 */
.trix-content .attachment--file::before {
  content: "";
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='icon icon-tabler icon-tabler-file-zip' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='%234a5568' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4' /%3E%3Cpath d='M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4' /%3E%3Cpath d='M16 18h-7a2 2 0 1 1 0 -4h7' /%3E%3Cpath d='M11 18v-1a2 2 0 1 1 4 0v1' /%3E%3Cpath d='M10 14v4' /%3E%3Cpath d='M13 14v4' /%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.trix-content .attachment--file .attachment__name {
  font-weight: 500;
}

.trix-content .attachment--file .attachment__size {
  color: var(--text-secondary);
  font-size: 0.9em;
}
