/* ===== Beamer Header Button Styling ===== */

/* Light Mode (Default) */
.beamer-header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
  color: #6c757d;
  background-color: transparent;
  padding: 0.5rem;
  border-radius: 0.375rem;
}

.beamer-header-btn:hover {
  color: #212529 !important;
  background-color: rgba(219, 233, 254, 0.4);
}

.beamer-header-btn:active,
.beamer-header-btn.active {
  color: #0d6efd !important;
  background-color: rgba(13, 110, 253, 0.1);
}

.beamer-header-btn:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
  box-shadow: none !important;
}

/* Dark Mode Button */
[data-bs-theme="dark"] .beamer-header-btn {
  color: #adb5bd;
  background-color: transparent;
}

[data-bs-theme="dark"] .beamer-header-btn:hover {
  color: #ffffff !important;
  background-color: #474c51;
}

[data-bs-theme="dark"] .beamer-header-btn:active,
[data-bs-theme="dark"] .beamer-header-btn.active {
  color: #6ea8fe !important;
  background-color: #1e3a5f;
}

[data-bs-theme="dark"] .beamer-header-btn:focus {
  outline: 2px solid #6ea8fe;
  outline-offset: 2px;
  box-shadow: none !important;
}

/* ===== Beamer Notification Badge ===== */

.beamer-header-btn .beamer_icon.active,
#beamer-menu-item .beamer_icon.active {
  position: absolute !important;
  top: -2px !important;
  right: -2px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 4px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
  text-align: center !important;
  border-radius: 9px !important;
  background-color: #dc3545 !important;
  color: #ffffff !important;
  box-sizing: border-box !important;
}

[data-bs-theme="dark"] .beamer-header-btn .beamer_icon.active,
[data-bs-theme="dark"] #beamer-menu-item .beamer_icon.active {
  background-color: #ea868f !important;
  color: #1f2937 !important;
}

/* ===== Beamer Panel/Popover Styling ===== */

/* Light Mode Panel */
.beamer-modal-wrapper,
.beamer_popover {
  background-color: #ffffff !important;
  border: 1px solid #dee2e6 !important;
  color: #212529 !important;
  border-radius: 0.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.beamer_popover_header {
  background-color: #f8f9fa !important;
  border-bottom: 1px solid #dee2e6 !important;
  color: #212529 !important;
}

.beamer_popover_header h2,
.beamer_popover_header h3 {
  color: #212529 !important;
}

.beamer_popover_body {
  color: #212529 !important;
  background-color: #ffffff !important;
}

.beamer_popover_body a {
  color: #0d6efd !important;
  text-decoration: none;
}

.beamer_popover_body a:hover {
  color: #0b5ed7 !important;
  text-decoration: underline;
}

.beamer_popover .beamer_close {
  color: #6c757d !important;
}

.beamer_popover .beamer_close:hover {
  color: #212529 !important;
}

/* Dark Mode Panel */
[data-bs-theme="dark"] .beamer-modal-wrapper,
[data-bs-theme="dark"] .beamer_popover {
  background-color: #1f2937 !important;
  border: 1px solid #495057 !important;
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .beamer_popover_header {
  background-color: #252a2f !important;
  border-bottom: 1px solid #495057 !important;
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .beamer_popover_header h2,
[data-bs-theme="dark"] .beamer_popover_header h3 {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .beamer_popover_body {
  color: #adb5bd !important;
  background-color: #1f2937 !important;
}

[data-bs-theme="dark"] .beamer_popover_body a {
  color: #6ea8fe !important;
  text-decoration: none;
}

[data-bs-theme="dark"] .beamer_popover_body a:hover {
  color: #99c6ff !important;
  text-decoration: underline;
}

[data-bs-theme="dark"] .beamer_popover .beamer_close {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .beamer_popover .beamer_close:hover {
  color: #ffffff !important;
}

/* ===== Headings in Beamer Panel ===== */

.beamer_popover h1,
.beamer_popover h2,
.beamer_popover h3,
.beamer_popover h4,
.beamer_popover h5,
.beamer_popover h6 {
  color: #212529 !important;
  font-weight: 600;
}

[data-bs-theme="dark"] .beamer_popover h1,
[data-bs-theme="dark"] .beamer_popover h2,
[data-bs-theme="dark"] .beamer_popover h3,
[data-bs-theme="dark"] .beamer_popover h4,
[data-bs-theme="dark"] .beamer_popover h5,
[data-bs-theme="dark"] .beamer_popover h6 {
  color: #ffffff !important;
}

/* ===== Buttons in Beamer Panel ===== */

.beamer_popover .beamer_button,
.beamer_popover button {
  background-color: #0d6efd !important;
  color: #ffffff !important;
  border: 1px solid #0d6efd !important;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.beamer_popover .beamer_button:hover,
.beamer_popover button:hover {
  background-color: #0b5ed7 !important;
  border-color: #0b5ed7 !important;
}

[data-bs-theme="dark"] .beamer_popover .beamer_button,
[data-bs-theme="dark"] .beamer_popover button {
  background-color: #6ea8fe !important;
  color: #1f2937 !important;
  border: 1px solid #6ea8fe !important;
}

[data-bs-theme="dark"] .beamer_popover .beamer_button:hover,
[data-bs-theme="dark"] .beamer_popover button:hover {
  background-color: #99c6ff !important;
  border-color: #99c6ff !important;
}

/* ===== Scrollbar Styling ===== */

.beamer_popover_body::-webkit-scrollbar {
  width: 8px;
}

.beamer_popover_body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.beamer_popover_body::-webkit-scrollbar-thumb {
  background: #c9c9c9;
  border-radius: 4px;
}

.beamer_popover_body::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

[data-bs-theme="dark"] .beamer_popover_body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .beamer_popover_body::-webkit-scrollbar-thumb {
  background: #474c51;
  border-radius: 4px;
}

[data-bs-theme="dark"] .beamer_popover_body::-webkit-scrollbar-thumb:hover {
  background: #6c757d;
}
