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

/* Focus Mode Styles */
body.focus-mode {
  overflow: hidden;
}

body.focus-mode nav {
  display: none !important;
}

body.focus-mode main {
  max-width: 100% !important;
  padding: 0 !important;
}

body.focus-mode .focus-mode-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: 1000;
  overflow-y: auto;
}

body.focus-mode .focus-mode-normal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

body.focus-mode .focus-mode-normal > div > h1 {
  display: none;
}

body.focus-mode .focus-mode-normal .bg-white {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.focus-mode .focus-mode-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}

body.focus-mode .focus-mode-form.space-y-6 > * {
  margin: 0;
}

/* Title styling in focus mode */
body.focus-mode .focus-mode-title-container {
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 1px solid #e5e7eb;
}

body.focus-mode .focus-mode-label {
  display: none;
}

body.focus-mode .focus-mode-title-input {
  border: none !important;
  border-bottom: 2px solid #e5e7eb !important;
  border-radius: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0.75rem !important;
  font-size: 2rem !important;
  font-weight: bold !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.focus-mode .focus-mode-title-input:focus {
  outline: none !important;
  border-bottom-color: #3b82f6 !important;
  box-shadow: none !important;
}

/* Body/editor styling in focus mode */
body.focus-mode .focus-mode-body-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 2rem;
}

body.focus-mode .focus-mode-body-input {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.focus-mode .focus-mode-body-input > trix-toolbar {
  flex-shrink: 0;
}

body.focus-mode .focus-mode-body-input > trix-editor {
  flex: 1;
  overflow-y: auto;
}

body.focus-mode trix-toolbar {
  border: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #fafafa !important;
  padding: 0.75rem !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

body.focus-mode trix-editor {
  flex: 1;
  min-height: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 1.5rem 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Hide metadata in focus mode */
body.focus-mode .focus-mode-metadata {
  display: none;
}

/* Sticky footer for actions in focus mode */
body.focus-mode .focus-mode-actions {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 2rem;
  margin: 0 -2rem -2rem -2rem;
  z-index: 10;
}

/* Sticky header for exit button in focus mode */
body.focus-mode .focus-mode-header-bar {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 1rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  z-index: 10;
  margin: 0 0 0 0;
  display: flex;
  justify-content: flex-end;
}
