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

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/InstrumentSerif-Regular-5935f1e0.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/InstrumentSerif-Italic-10238158.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/JetBrainsMono-Regular-310ed802.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


* {
  box-sizing: border-box;
}

code, pre, kbd, samp, tt {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

#sidebar-resizer {
  position: absolute;
  right: -3px;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 20;
  border-radius: 3px;
  transition: background 0.15s;
}

#sidebar-resizer:hover,
#sidebar-resizer.dragging {
  background: rgba(0, 0, 0, 0.08);
}

#sidebar-resizer:hover #resizer-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(2px);
}

#resizer-tooltip {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%) translateX(-2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  background: #1A1916;
  color: #FAF9F7;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

#resizer-tooltip .hint-label {
  color: #FAF9F7;
}

#resizer-tooltip .hint-key {
  color: #A8A39C;
}

#sidebar.collapsed {
  width: 0 !important;
}

#sidebar.collapsed #sidebar-resizer {
  cursor: pointer;
}

#sidebar-expand-btn {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 40px;
  background: #E4E0DA;
  border: none;
  cursor: pointer;
  z-index: 15;
  border-radius: 0 6px 6px 0;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

#sidebar-expand-btn:hover {
  background: #D6D1CB;
}

#sidebar.collapsed~* #sidebar-expand-btn,
body.sidebar-collapsed #sidebar-expand-btn {
  display: flex;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #8C8880;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link:hover {
  background: #ECEAE5;
  color: #3D3A36;
}

.nav-link.active {
  background: #E4E0DA;
  color: #1A1916;
  font-weight: 500;
}

.nav-link svg {
  flex-shrink: 0;
}

.turbo-progress-bar {
  display: none !important;
}

.nav-section {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #C0BAB3;
  padding: 0 12px;
  margin-top: 16px;
  margin-bottom: 4px;
  display: block;
}

.dd {
  position: relative;
}

.dd-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  background: none;
  text-align: left;
  width: 100%;
}

.dd-trigger:focus {
  outline: none;
}

.dd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  background: #FFFFFF;
  border: 1px solid #E2DED9;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.10), 0 2px 6px rgba(26, 25, 22, 0.06);
  min-width: 100%;
}

.dd-panel.open {
  display: block;
}

.dd-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}

.dd-opt:hover {
  background: #F3F1EE;
}

.dd-opt.selected {
  background: #ECEAE5;
  font-weight: 500;
  color: #1A1916;
}

.dd-panel.dd-up,
.dd.dd-up .dd-panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-btn:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.app-btn-dark {
  background: #1A1916;
  color: #FAF9F7;
  border-color: #1A1916;
}

.app-btn-outline {
  background: transparent;
  color: #1A1916;
  border-color: #C8C4BE;
}

.app-btn-outline:hover {
  border-color: #1A1916;
  opacity: 1;
  transform: none;
}

.app-btn-subtle {
  background: #F0EDE7;
  color: #3D3A36;
  border-color: #F0EDE7;
}

.app-btn-subtle:hover {
  background: #E8E4DD;
  border-color: #E8E4DD;
  opacity: 1;
  transform: none;
}

.app-btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
}

.app-btn:disabled,
.app-btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

#app-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 25, 22, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

#app-confirm-overlay.open {
  display: flex;
}

#app-confirm-card {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 28px 28px 22px;
  max-width: 380px;
  width: calc(100% - 40px);
  box-shadow: 0 32px 72px rgba(26, 25, 22, 0.20), 0 4px 16px rgba(26, 25, 22, 0.08);
  animation: confirmIn 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes confirmIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.app-confirm-destructive {
  background: #C94A3F !important;
  border-color: #C94A3F !important;
  color: #FFFFFF !important;
}

.app-feedback-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #E2DED9;
  background: #FFFFFF;
  color: #5C5750;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26, 25, 22, 0.06);
}

.app-feedback-fab:hover {
  background: #F8F6F3;
}

.app-flash {
  transition: opacity 0.24s ease, transform 0.24s ease, margin 0.24s ease, padding 0.24s ease, max-height 0.24s ease;
}

.app-flash-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.app-flash-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.app-flash.app-flash-hiding {
  opacity: 0;
  transform: translateY(-6px);
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  max-height: 0 !important;
  overflow: hidden;
}

#nook-transcript-toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.nook-toast {
  pointer-events: auto;
  background: #1A1916;
  color: #FAF9F7;
  border-radius: 14px;
  padding: 13px 16px;
  box-shadow: 0 8px 32px rgba(26, 25, 22, 0.22);
  cursor: pointer;
  max-width: 300px;
  animation: nookToastIn 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
  transition: opacity 0.3s, transform 0.3s;
}

.nook-toast:hover {
  opacity: 0.88;
}

@keyframes nookToastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#mobile-bottom-nav {
  display: none;
}

@media (max-width: 640px) {

  #sidebar,
  #sidebar-expand-btn {
    display: none !important;
  }

  #main-content {
    margin-left: 0 !important;
    padding: 20px 16px 88px !important;
  }

  #mobile-bottom-nav {
    display: flex;
  }
}
