/* Font Definitions */
@font-face {
  font-family: 'CalibriCustom';
  src: url('calibri.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CalibriCustom';
  src: url('calibri_bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'CalibriCustom', 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-size: 16px;
}

/* Layout Structure */
.content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Top Bar Styles */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

/* .topbar .left-buttons,
.topbar .right-buttons {
  display: flex;
  gap: 10px;
  flex: 1;
}

.topbar .right-buttons {
  justify-content: flex-end;
} */


.topbar .left-buttons button,
.topbar .right-buttons > * {  /* Targets all direct children in right-buttons */
  padding: 8px 12px;  /* Slightly increased padding for better proportions */
  height: 34px;       /* Fixed height for consistency */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;      /* Ensures text is vertically centered */
}


.topbar .title {
  flex: 2;
  text-align: center;
  font-weight: bold;
  color: #125ba0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 20px;
  font-size: 30px;
}

/* Button Styles */
.topbar button,
.topbar a {
  padding: 6px 12px;
  background-color: #4b6382;
  color: #cdd5d8;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.topbar button:hover,
.topbar a:hover {
  background-color: #a4b5c4;
}

/* Sidebar Styles */
.sidebar {
  width: 400px;
  background-color: #cdd5d8;
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  border-right: 1px solid #ccc;
  display: none;
  flex-shrink: 0;
}

.sidebar.visible {
  display: block;
}

.sidebar h2 {
  color: #4b6382;
  font-size: 1.5em;
  margin-bottom: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar ul {
  list-style: none;
  padding-left: 15px;
}

.sidebar li {
  margin: 5px 0;
}

/* Sidebar Navigation Elements */
.toggle {
  cursor: pointer;
  user-select: none;
  font-size: 16px;
}

.toggle::before {
  content: '+ ';
  font-weight: bold;
}

.toggle.expanded::before {
  content: '- ';
}

.nested {
  display: none;
}

.nested.visible {
  display: block;
}

.page,
.page-id {
  cursor: pointer;
  color: #4b6382;
  padding: 2px 5px;
  display: inline-block;
  font-size: 18px;
  
}

.page:hover {
  background-color: #a4b5c4;
  border-radius: 4px;
}

.page.active {
  background-color: #071739;
  color: white;
  border-radius: 4px;
}

/* Viewer Styles */
.viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: black;
  overflow: hidden;
  width: 100%;
  justify-content: center;
  align-items: center;
}

#player {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

/* Scrollbar Styles */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .topbar .title {
    font-size: 18px;
  }
}

/* Specifically for the feedback link */
#feedbackLink {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  height: 34px;
  box-sizing: border-box;
}

/* Ensure all buttons have same vertical alignment */
.topbar {
  align-items: center;
}

/* Optional: Add this if buttons still appear misaligned */
.topbar .left-buttons,
.topbar .right-buttons {
  align-items: center;
}

.right-buttons {
    display: flex;
    align-items: center; /* Vertical alignment */
    gap: 10px; /* Consistent spacing between all items */
}

.right-buttons > * { /* Targets all direct children */
    margin: 0; /* Remove any default margins */
    vertical-align: middle; /* Force consistent alignment */
    line-height: 1.2; /* Uniform text baseline */
    display: inline-flex; /* Flex layout for perfect centering */
    align-items: center; /* Center contents vertically */
    justify-content: center; /* Center contents horizontally */
    height: 34px; /* Fixed height for all items */
    padding: 6px 12px; /* Consistent padding */
    box-sizing: border-box; /* Include padding in height */
}

