/**
 * Night Mode Switcher
 * Vertical toggle switch for dark/light mode
 */

/* Sidebar Controls Container */
.bcf-sidebar-controls {
  position: fixed;
  top: 390px;
  left: 35px;
  display: flex;
  align-items: center;
  gap: 28px;
  z-index: 80;
  transform: rotate(-90deg);
  transform-origin: left top;
}

/* Social Media Sidebar (right side - mirror of sidebar controls) */
.bcf-social-sidebar {
  position: fixed;
  top: 110px;
  right: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 80;
}

.bcf-social-sidebar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: #000;
  border-radius: 50%;
  color: #fff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.bcf-social-sidebar__link:hover {
  background-color: #3CBFA5;
  color: #fff;
}

/* Dark mode styles for social sidebar */
.dark .bcf-social-sidebar__link {
  background-color: #fff;
  color: #000;
}

.dark .bcf-social-sidebar__link:hover {
  background-color: #3CBFA5;
  color: #fff;
}

/* Hide below 1650px (2xl breakpoint) */ 
@media (max-width: 1649.98px) {
  .bcf-sidebar-controls {
    display: none;
  }
  .bcf-social-sidebar {
    display: none;
  }
}

/* Accessibility Button */
.bcf-accessibility-btn {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #292a2c;
  transition: color 0.3s ease, opacity 0.3s ease;
  transform: rotate(90deg);
}

.bcf-accessibility-btn:hover {
  opacity: 0.7;
}

/* =============================================
   Accessibility Modal
   ============================================= */

.bcf-a11y-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bcf-a11y-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.bcf-a11y-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.bcf-a11y-modal__content {
  position: relative;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.bcf-a11y-modal[aria-hidden="false"] .bcf-a11y-modal__content {
  transform: scale(1);
}

.dark .bcf-a11y-modal__content {
  background-color: #1a1a1a;
}

.bcf-a11y-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.dark .bcf-a11y-modal__header {
  border-bottom-color: #333;
}

.bcf-a11y-modal__title {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dark .bcf-a11y-modal__title {
  color: #fff;
}

.bcf-a11y-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #666;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bcf-a11y-modal__close:hover {
  background-color: #f5f5f5;
  color: #000;
}

.dark .bcf-a11y-modal__close {
  color: #999;
}

.dark .bcf-a11y-modal__close:hover {
  background-color: #333;
  color: #fff;
}

.bcf-a11y-modal__body {
  padding: 16px 24px 24px;
}

/* Accessibility Option Row */
.bcf-a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.dark .bcf-a11y-option {
  border-bottom-color: #333;
}

.bcf-a11y-option:last-child {
  border-bottom: none;
}

.bcf-a11y-option--reset {
  justify-content: center;
  padding-top: 20px;
  margin-top: 8px;
  border-bottom: none;
}

.bcf-a11y-option__label {
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.dark .bcf-a11y-option__label {
  color: #ddd;
}

.bcf-a11y-option__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Font Size Buttons */
.bcf-a11y-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bcf-a11y-btn:hover {
  background-color: #e5e5e5;
  border-color: #ccc;
}

.bcf-a11y-btn:focus-visible {
  outline: 2px solid #3CBFA5;
  outline-offset: 2px;
}

.dark .bcf-a11y-btn {
  color: #ddd;
  background-color: #333;
  border-color: #444;
}

.dark .bcf-a11y-btn:hover {
  background-color: #444;
  border-color: #555;
}

/* Toggle Switch */
.bcf-a11y-toggle {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.bcf-a11y-toggle__track {
  position: relative;
  width: 52px;
  height: 28px;
  background-color: #ddd;
  border-radius: 14px;
  transition: background-color 0.2s ease;
}

.dark .bcf-a11y-toggle__track {
  background-color: #444;
}

.bcf-a11y-toggle[aria-pressed="true"] .bcf-a11y-toggle__track {
  background-color: #3CBFA5;
}

.bcf-a11y-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.bcf-a11y-toggle[aria-pressed="true"] .bcf-a11y-toggle__thumb {
  transform: translateX(24px);
}

.bcf-a11y-toggle:focus-visible .bcf-a11y-toggle__track {
  outline: 2px solid #3CBFA5;
  outline-offset: 2px;
}

/* Reset Button */
.bcf-a11y-reset {
  width: 100%;
  padding: 12px 20px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background-color: #3CBFA5;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.bcf-a11y-reset:hover {
  background-color: #35a892;
}

.bcf-a11y-reset:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* =============================================
   Accessibility Classes Applied to HTML
   ============================================= */

/* High Contrast Mode — applied to #page, not body, to avoid
   creating a containing block that breaks position:fixed modals */
html.a11y-high-contrast #page {
  filter: contrast(1.25);
}

/* Underline Links */
html.a11y-underline-links a {
  text-decoration: underline !important;
}

/* Readable Font */
html.a11y-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.03em !important;
}

/* Stop Animations */
html.a11y-stop-animations *,
html.a11y-stop-animations *::before,
html.a11y-stop-animations *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}


.bcf-night-mode-switcher {
  order: 1;
  display: inline-flex;
  cursor: pointer;
  background-color: #f5f5f5;
  border-radius: 32px;
  transition: background-color 0.3s ease;
  position: relative;
}

/* Dark mode switcher background */
.dark .bcf-night-mode-switcher {
  background-color: #292a2c;
}

/* Hide on mobile - already handled by parent container */

/* States container */
.bcf-night-mode-switcher__states {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  user-select: none;
  z-index: 2;
}

/* State spans (Light/Dark labels) */
.bcf-night-mode-switcher__states span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  color: #949494;
  font-family: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  font-size: 20px;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  text-transform: uppercase;
  transition: color 0.3s ease;
  min-width: 90px;
  box-sizing: border-box;
}

/* Zewnętrzny padding */
.bcf-night-mode-switcher__states span.light {
  padding-left: 22px;
}

.bcf-night-mode-switcher__states span.dark {
  padding-right: 22px;
}

/* Light mode - light span active (jasny aktywny) */
html:not(.dark) .bcf-night-mode-switcher__states span.light {
  color: #000;
}

html:not(.dark) .bcf-night-mode-switcher__states span.dark {
  color: #292a2c;
}

/* Dark mode - dark span active (ciemny aktywny) */
.dark .bcf-night-mode-switcher__states span.dark {
  color: #fff;
}

.dark .bcf-night-mode-switcher__states span.light {
  color: #949494;
}

/* Icon */
.bcf-night-mode-switcher__states span .bcf-icon {
  width: 14px;
  height: auto;
  transform: rotate(90deg);
}

/* Sliding toggle background */
.bcf-night-mode-switcher__toggle {
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background-color: #fff;
  border-radius: 32px;
  box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  z-index: 1;
}

/* Dark mode toggle - slide to right */
.dark .bcf-night-mode-switcher__toggle {
  background-color: #000;
  box-shadow: none;
  transform: translateX(100%);
}
