/* Icons */
:where([class^="ri-"])::before {
  content: "\f3c2";
}

/* Base */
body {
  font-family: "Inter", sans-serif;
  background-color: #f9fafb;
}

/* Remove WebKit input decorations */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

/* Remove number input spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Switch Styles */
.custom-switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.5rem;
}

.custom-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: 0.4s;
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 1.1rem;
  width: 1.1rem;
  left: 0.2rem;
  bottom: 0.2rem;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: #4f46e5;
}

input:checked + .switch-slider:before {
  transform: translateX(1.5rem);
}

/* Hover Effects */
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.discussion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.specialist-card:hover {
  transform: translateY(-4px);
}

.success-story-card:hover {
  transform: scale(1.02);
}

.activity-item:hover {
  background-color: #f3f4f6;
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 200px;
  z-index: 50;
  margin-top: 4px;
}

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

.dropdown-item {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

.dropdown-divider {
  border-top: 1px solid #e5e7eb;
  margin: 4px 0;
}

/* Category Dropdown */
.category-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 100%;
  z-index: 50;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
}

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

.category-option {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  transition: background-color 0.2s;
  cursor: pointer;
}

.category-option:hover {
  background-color: #f3f4f6;
}

/* Radio Button Custom */
.radio-custom {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

.radio-custom:checked {
  border-color: #4f46e5;
  background-color: #4f46e5;
}

.radio-custom:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Toggle Switch */
.toggle-switch {
  width: 44px;
  height: 24px;
  background-color: #d1d5db;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-switch.active {
  background-color: #4f46e5;
}

.toggle-switch::after {
  content: "";
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active::after {
  transform: translateX(20px);
}

/* Tag Input */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  min-height: 44px;
  cursor: text;
}

.tag-item {
  display: flex;
  align-items: center;
  background-color: #e5e7eb;
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 14px;
}

.tag-remove {
  margin-left: 4px;
  cursor: pointer;
  color: #6b7280;
}

.tag-remove:hover {
  color: #374151;
}

.tag-input input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 120px;
  font-size: 14px;
}

/* Editor */
.preview-panel {
  display: none;
}

.preview-panel.show {
  display: block;
}

.editor-toolbar {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px;
  display: flex;
  gap: 4px;
}

.editor-btn {
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #6b7280;
}

.editor-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.editor-btn.active {
  background-color: #e5e7eb;
  color: #374151;
}

.editor-content {
  min-height: 200px;
  padding: 16px;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
}

/* Hide default link button in editor */
.editor-content a {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none !important;
}

.editor-toolbar .editor-btn[data-command="createLink"] {
  display: none !important;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  transition: border-color 0.3s;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: #4f46e5;
  background-color: #f8fafc;
}

.upload-zone.dragover {
  border-color: #4f46e5;
  background-color: #eff6ff;
}

/* Image Preview */
.image-preview {
  display: none;
}

.image-preview.show {
  display: block;
}

/* Timeline */
.timeline-item::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 60px;
  bottom: -20px;
  width: 2px;
  background: #e5e7eb;
}

.timeline-item:last-child::before {
  display: none;
}

/* Gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Comments */
.comment-thread {
  border-left: 2px solid #f3f4f6;
  margin-left: 1rem;
  padding-left: 1rem;
}

/* Voting and Reactions */
.vote-btn:hover {
  transform: scale(1.1);
}

.reaction-btn:hover {
  background-color: #f3f4f6;
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
}

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

/* Charts */
.progress-chart {
  background: linear-gradient(
    135deg,
    rgba(87, 181, 231, 0.1) 0%,
    rgba(141, 211, 199, 0.1) 100%
  );
}

/* Prose Styling */
.custom-prose h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.custom-prose h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.custom-prose p,
.custom-prose p span,
.custom-prose div {
  line-height: 2 !important;
  margin-bottom: 1rem !important;
  color: #374151 !important;
  text-align: justify !important;
}

.custom-prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.custom-prose ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.custom-prose li {
  margin-bottom: 0.5rem;
}

.custom-prose blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1rem;
  font-style: italic;
  color: #6b7280;
  margin: 1.5rem 0;
}

.custom-prose a {
  color: #2563eb;
  text-decoration: underline;
}

.custom-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/* Filter Dropdown */
.filter-dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

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

.tag-filter {
  cursor: pointer;
  transition: all 0.2s;
}

.tag-filter:hover {
  background-color: #f3f4f6;
}

.tag-filter.active {
  background-color: #4f46e5;
  color: white;
}

/* Pagination */
.pagination-btn:hover {
  background-color: #f3f4f6;
}

.pagination-btn.active {
  background-color: #4f46e5;
  color: white;
}
