/* PWA-specific styles */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.rt-wrap {
  width: 100%;
}

.rt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid #1a1a1a;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #2d2d2d;
}

.rt-btn {
  border: 1px solid #444;
  background: #1e1e1e;
  color: #e0e0e0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.rt-btn:hover {
  background: #252525;
}

.rt-sep {
  width: 1px;
  background: #444;
  margin: 0 4px;
}

.rt-editor {
  width: 100%;
  min-height: 84px;
  padding: 12px;
  border: 1px solid #1a1a1a;
  border-radius: 0 0 8px 8px;
  background: #1e1e1e;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.rt-editor:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.rt-editor:empty:before {
  content: attr(data-placeholder);
  color: #888;
}

.rt-editor ul,
.rt-editor ol {
  margin-left: 18px;
}

/* Top menu bar (desktop menutemplate parity) — sits above tab strip */
#appMenuBar.app-menu-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: #2d2d2d;
  border-bottom: 1px solid #1a1a1a;
  z-index: 6;
  user-select: none;
  font-size: 13px;
}

.app-menu-bar .app-menu-root {
  position: relative;
  display: flex;
  align-items: stretch;
}

.app-menu-bar .app-menu-trigger,
.app-menu-bar .app-menu-top {
  background: transparent;
  border: none;
  color: #e0e0e0;
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  line-height: 24px;
  white-space: nowrap;
}

.app-menu-bar .app-menu-trigger:hover,
.app-menu-bar .app-menu-top:hover {
  background: #3c3c3c;
}

.app-menu-bar .app-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #2d2d2d;
  border: 1px solid #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  padding: 4px 0;
  z-index: 20;
}

.app-menu-bar .app-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #e8e8e8;
  padding: 6px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.app-menu-bar .app-menu-item:hover:not(:disabled) {
  background: #4a4a4a;
}

.app-menu-bar .app-menu-item:disabled {
  color: #666;
  cursor: default;
}

.app-menu-bar .app-menu-accel {
  color: #888;
  font-size: 11px;
  margin-left: auto;
}

.app-menu-bar .app-menu-sep {
  height: 1px;
  margin: 4px 0;
  background: #444;
}

/* Push tab strip + viewer below menu (desktop tab row is 35px) */
#tabContainer {
  top: 24px !important;
}

#leftSeek,
#rightSeek {
  top: 24px !important;
}

#viewContainer {
  top: 59px !important;
}

/* Ensure proper mobile viewport */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .section-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .stats-bar {
    flex-direction: column;
    gap: 8px;
  }
}
