/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Fonts */
body {
  font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.font-quicksand {
  font-family: 'Quicksand', sans-serif;
}

/* Trix Editor Customizations */
trix-toolbar {
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0.5rem 0.5rem 0 0;
}

trix-toolbar .trix-button-row {
  gap: 0.25rem;
}

trix-toolbar .trix-button {
  border: none;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
}

trix-toolbar .trix-button:hover {
  background: #e5e7eb;
}

trix-toolbar .trix-button.trix-active {
  background: #DBEAFE;
}

/* Hide unnecessary Trix toolbar buttons for simple note-taking */
trix-toolbar .trix-button-group--file-tools,
trix-toolbar .trix-button--icon-heading-1,
trix-toolbar .trix-button--icon-quote,
trix-toolbar .trix-button--icon-code,
trix-toolbar .trix-button--icon-increase-nesting-level,
trix-toolbar .trix-button--icon-decrease-nesting-level {
  display: none;
}

trix-editor {
  border-radius: 0 0 0.5rem 0.5rem;
  min-height: 80px;
}

trix-editor:focus {
  outline: none;
}

/* Ensure lists display properly in Trix and content areas */
trix-editor ul,
trix-editor ol,
.trix-content ul,
.trix-content ol,
.prose ul,
.prose ol {
  list-style-position: inside;
  padding-left: 0.5rem;
}

trix-editor ul,
.trix-content ul,
.prose ul {
  list-style-type: disc;
}

trix-editor ol,
.trix-content ol,
.prose ol {
  list-style-type: decimal;
}

trix-editor li,
.trix-content li,
.prose li {
  margin-bottom: 0.25rem;
}

/* FullCalendar — fix Tailwind reset stripping styles */
.fc .fc-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.fc .fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* View buttons row: full width, centered, sits above title + nav */
.fc .fc-toolbar-chunk:nth-child(2) {
  width: 100%;
  order: -1;
  justify-content: center;
}

.fc .fc-toolbar-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.fc .fc-button {
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.125rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.fc .fc-button:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.fc .fc-button-active,
.fc .fc-button:active {
  background-color: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

.fc .fc-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fc .fc-button-group {
  display: inline-flex;
}

.fc .fc-button-group .fc-button {
  border-radius: 0;
}

.fc .fc-button-group .fc-button:first-child {
  border-radius: 0.375rem 0 0 0.375rem;
}

.fc .fc-button-group .fc-button:last-child {
  border-radius: 0 0.375rem 0.375rem 0;
}

.fc .fc-button-group .fc-button + .fc-button {
  margin-left: -1px;
}

/* Mobile: same two-row layout, just smaller */
@media (max-width: 767px) {
  .fc .fc-toolbar-title {
    font-size: 1.125rem;
  }

  .fc .fc-button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* Calendar date cells: hover hint for quick-create */
.fc .fc-daygrid-day:hover {
  background-color: rgb(243 244 246); /* gray-100 */
  cursor: pointer;
}

.fc .fc-daygrid-day:hover .fc-daygrid-day-number::before {
  content: "+";
  margin-right: 0.25rem;
  color: rgb(107 114 128); /* gray-500 */
  font-weight: 600;
}
