/*
 * 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.
 */


@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
}

.skeleton-shimmer-violet {
  background: linear-gradient(90deg, var(--color-violet-100) 25%, var(--color-violet-200) 50%, var(--color-violet-100) 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
}

.skeleton-shimmer-olive {
  background: linear-gradient(90deg, var(--color-olive-200) 25%, var(--color-olive-300) 50%, var(--color-olive-200) 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
}

/* Modal animations - shrink/grow effect
   Apply .modal-overlay to any modal backdrop div managed by a Stimulus controller.
   The controller must toggle .modal-open (with requestAnimationFrame on open,
   and a 200ms setTimeout on close to let the transition finish). */
.modal-overlay {
  transition: opacity 0.2s ease-out;
  opacity: 0;
}

.modal-overlay.modal-open {
  opacity: 1;
}

.modal-overlay > div {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease-out;
  transform: scale(0.95);
  opacity: 0;
}

.modal-overlay.modal-open > div {
  transform: scale(1);
  opacity: 1;
}

/* Calendar day with an existing 1:1 — light green background tint */
.calendar-day-busy:not(.bg-forest-deep) {
  background-color: #d1fae5; /* emerald-100 */
  color: #065f46;            /* emerald-900 */
}

.calendar-day-busy:not(.bg-forest-deep):hover {
  background-color: #a7f3d0; /* emerald-200 */
}

/* When that same day is also selected, keep the forest-deep bg and add a small white dot */
.calendar-day-busy.bg-forest-deep::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

/* PIP window Trix editor — .pip-editor is on trix-editor directly */
.pip-editor {
  background-color: white;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 1rem;
  height: 100%;
  overflow-y: auto;
}

/* trix-toolbar is a sibling of trix-editor, so scope via the wrapper */
.pip-editor-wrapper trix-toolbar,
.notes-editor-wrapper trix-toolbar {
  display: none !important;
}

.pip-editor::placeholder {
  color: #94a3b8;
}

.pip-editor ul,
.pip-editor ol,
.notes-editor-wrapper trix-editor ul,
.notes-editor-wrapper trix-editor ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.pip-editor ul li,
.notes-editor-wrapper trix-editor ul li { list-style-type: disc !important; }
.pip-editor ol li,
.notes-editor-wrapper trix-editor ol li { list-style-type: decimal !important; }
.pip-editor li::marker,
.notes-editor-wrapper trix-editor li::marker { color: #64748b; }

.pip-editor-wrapper trix-editor h1,
.notes-editor-wrapper trix-editor h1 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #0f172a !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
}

.pip-editor-wrapper trix-editor h2,
.notes-editor-wrapper trix-editor h2 {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #0f172a !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.4rem !important;
}

.pip-editor-wrapper trix-editor h3,
.notes-editor-wrapper trix-editor h3 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #1e293b !important;
  margin-top: 1rem !important;
  margin-bottom: 0.35rem !important;
}

/* Floating format toolbar */
.ft-bar {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: opacity 0.1s ease;
}

.ft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.1s, background-color 0.1s;
}

.ft-btn:hover {
  color: #f1f5f9;
  background-color: rgba(255, 255, 255, 0.1);
}

.ft-btn.is-active {
  color: #f1f5f9;
  background-color: rgba(255, 255, 255, 0.15);
}

.ft-sep {
  display: block;
  width: 1px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

/* Ask Mora chat bubble prose — compact markdown rendering */
.mora-prose {
  font-size: 0.75rem;        /* text-xs */
  line-height: 1.625;        /* relaxed */
  color: var(--color-slate-700);
}
.mora-prose p {
  margin-bottom: 0.5em;
}
.mora-prose p:last-child {
  margin-bottom: 0;
}
.mora-prose strong {
  font-weight: 600;
  color: var(--color-slate-800);
}
.mora-prose em {
  font-style: italic;
}
.mora-prose ul,
.mora-prose ol {
  margin: 0.375em 0;
  padding-left: 1.25em;
}
.mora-prose ul {
  list-style-type: disc;
}
.mora-prose ol {
  list-style-type: decimal;
}
.mora-prose li {
  margin-bottom: 0.125em;
}
.mora-prose li::marker {
  color: var(--color-slate-400);
}
.mora-prose code {
  font-size: 0.6875rem;
  background: var(--color-slate-100);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.mora-prose a {
  color: var(--color-violet-600);
  text-decoration: underline;
}
.mora-prose a:hover {
  color: var(--color-violet-700);
}
.mora-prose h3, .mora-prose h4, .mora-prose h5 {
  font-weight: 600;
  color: var(--color-slate-800);
  margin: 0.5em 0 0.25em;
}
