/* Book Print Obsidian Plugin Styles */

.book-setup-modal-container {
  width: 95vw !important;
  max-width: 1400px !important;
  height: 90vh !important;
  max-height: 900px !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  background-color: var(--background-primary);
  border-radius: 8px;
  overflow: hidden;
}

.book-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--background-secondary);
  border-bottom: 1px solid var(--background-modifier-border);
  gap: 12px;
  flex-wrap: wrap;
}

.book-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.book-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  background-color: var(--interactive-accent);
  color: var(--text-on-accent);
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-size: 13px;
  transition: opacity 0.15s ease;
}

.book-toolbar-btn:hover {
  opacity: 0.9;
}

.book-toolbar-btn.secondary {
  background-color: var(--background-modifier-border);
  color: var(--text-normal);
}

.book-split-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Panel: Manuscript Editor */
.book-manuscript-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--background-modifier-border);
  background-color: var(--background-primary);
  padding: 16px;
}

.book-manuscript-textarea {
  width: 100%;
  height: 100%;
  resize: none;
  font-family: var(--font-monospace);
  font-size: 14px;
  line-height: 1.6;
  background-color: var(--background-primary-alt);
  color: var(--text-normal);
  border: 1px solid var(--background-modifier-border);
  border-radius: 4px;
  padding: 16px;
  box-sizing: border-box;
  outline: none;
}

.book-manuscript-textarea:focus {
  border-color: var(--interactive-accent);
}

/* Right Panel: Interactive 6x9 Preview */
.book-preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #2b2b2b;
  overflow-y: auto;
  align-items: center;
  padding: 24px;
  gap: 24px;
}

.book-page-viewport {
  width: 432px; /* 6 inches at 72dpi scaling */
  min-height: 648px; /* 9 inches at 72dpi scaling */
  background-color: #ffffff;
  color: #000000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  padding: 0.75in 0.65in 0.75in 0.85in; /* 6x9 book margins */
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease;
}

.book-page-number {
  position: absolute;
  bottom: 0.35in;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9pt;
  font-family: "Libre Caslon Text", serif;
  color: #666666;
}

/* Bottom Tabbed Controls Drawer */
.book-controls-drawer {
  background-color: var(--background-secondary);
  border-top: 1px solid var(--background-modifier-border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-controls-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--background-modifier-border);
  padding-bottom: 8px;
}

.book-tab-btn {
  padding: 6px 12px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.book-tab-btn.active {
  background-color: var(--background-modifier-border);
  color: var(--text-normal);
}

.book-tab-content {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.book-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.book-input-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.book-input-group input,
.book-input-group select {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--background-modifier-border);
  background-color: var(--background-primary);
  color: var(--text-normal);
}

.book-price-badge {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-accent);
  padding: 4px 12px;
  background-color: var(--background-primary);
  border-radius: 4px;
  border: 1px solid var(--background-modifier-border);
}
