/* Ensure the body takes full height and allows scrolling */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Main content should grow and allow scrolling */
.main-content {
    flex: 1 0 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Footer stays at the bottom, not fixed */
.footer {
    flex-shrink: 0;
    width: 100%;
}

/* Footer styles */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 450px;
  background: linear-gradient(to right, var(--surface-1, #f8f9fa), var(--primary-light, #eef0ff), var(--surface-1, #f8f9fa));
  /* border-top: 1px solid var(--border-color, #e0e0e0); */
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  position: relative;
  z-index: 5;
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
}

.footer-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.format-group {
  display: flex;
  background-color: white;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Toggle switch styles */
.highlight-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: white;
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-text {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e0e0e0;
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input:checked + .toggle-slider {
  background-color: #5f6be0;
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

/* Toolbar and info footer styles */
.toolbar-footer {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: none;
    margin-bottom: 0;
    padding: 8px 0 0 0;
    display: flex;
    justify-content: center;
}

.info-footer {
    background: #f8f9ff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.03);
    padding: 10px 0;
    font-size: 15px;
    color: #5f6be0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.info-footer .footer-center a {
    color: #5f6be0;
    margin: 0 8px;
    text-decoration: none;
    font-weight: 500;
}

.info-footer .footer-center a:hover {
    text-decoration: underline;
    color: #4751c9;
}

/* Ensure both footers are visible and not overlapping */
.footer {
    width: 100%;
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer {
      flex-wrap: wrap;
      gap: 12px;
      padding: 12px;
  }
  
  .footer-center {
      position: relative;
      left: 0;
      transform: none;
      width: 100%;
      justify-content: center;
      order: -1;
      margin-bottom: 8px;
  }
  
  .footer-left, .footer-right {
      flex: 1;
  }
  
  .footer-right {
      justify-content: flex-end;
  }
  
  .highlight-toggle {
      padding: 6px 10px;
  }
  
  .toggle-text {
      font-size: 13px;
  }
}

@media (max-width: 480px) {
  .footer {
      flex-direction: column;
      gap: 16px;
  }
  
  .footer-left, .footer-right {
      width: 100%;
      justify-content: center;
  }
}