#noba-tool,
.noba-button {
  --noba-primary: #011D5F;
  --noba-primary-light: #d0d9fa;
  --noba-primary-hover: #10368e;
  --noba-on-primary: #fff;
  --noba-secondary: #C624A0;
  --noba-secondary-hover: #9F2293;
  --noba-bg-tool: #fff;
  --noba-bg-footer: #efefef;
  --noba-text: #292929;
  --noba-border: #fff;
  --noba-bg-feature: #f5f5f5;
  --noba-bg-feature-hover: #ebebeb;
  --noba-bg-feature-active: var(--noba-primary-light);
  --noba-feature-border: #eee;
  --noba-feature-toggle-bg: var(--noba-primary);
  --noba-feature-toggle-border: var(--noba-primary);
  --noba-toggle-active-bg: #008147;
  --noba-size-base: 1.0rem;
  --noba-size-small: 0.875rem;
  --noba-size-h1: 1.25rem;
  --noba-size-h2: 1.0rem;
  --noba-size-button: 0.9rem;
  --noba-toggle-bg: var(--noba-secondary);
  --noba-toggle-text: var(--noba-on-primary);
}

.high-contrast-mode {
  --noba-hc-link-color: #fff;
  --noba-hc-link-color-hover: #C624A0;
  --noba-hc-input-border: #C624A0;
}

.noba-button {
  font-family: ui-sans-serif, system-ui, sans-serif;
  position: relative;
  margin-left: var(--space-10);
}
.noba-button h1, .noba-button h2, .noba-button h3, .noba-button h4, .noba-button h5, .noba-button h6 {
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.noba-button .noba-toggle {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: var(--noba-toggle-bg);
  color: var(--noba-toggle-text);
  border: 2px solid transparent;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.noba-button .noba-toggle .active-indicator {
  display: none;
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  top: -0.5rem;
  right: -0.5rem;
  background: var(--noba-toggle-active-bg);
  border-radius: 9999px;
}
.noba-button .noba-toggle .active-indicator::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 5px;
  transform: rotate(45deg);
  display: inline-block;
  height: 12px;
  width: 6px;
  border-bottom: 3px solid white;
  border-right: 3px solid white;
}
.noba-button .noba-toggle:hover {
  background-color: var(--noba-secondary-hover);
}
.noba-button .noba-toggle.active {
  background-color: var(--noba-secondary-hover);
  border-color: white;
}
.noba-button .noba-toggle.active:hover {
  background-color: var(--noba-toggle-bg);
}
.noba-button .noba-toggle.active .active-indicator {
  display: flex;
}
.noba-button .noba-toggle:focus-visible {
  border-color: white;
}
.noba-button .noba-toggle:focus-visible::after {
  content: attr(aria-label);
  position: absolute;
  top: 0;
  right: 110%;
  background-color: #000;
  color: white;
  font-size: var(--noba-size-small);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  margin-top: 0.25rem;
  z-index: 9999;
}

#noba-tool {
  font-family: ui-sans-serif, system-ui, sans-serif;
  z-index: 99999;
  margin-left: var(--space-10);
  position: fixed;
  flex-direction: column;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 360px;
  max-width: 80%;
  max-height: 80vh;
  background-color: var(--noba-bg-tool);
  color: var(--noba-text);
  font-size: var(--noba-size-base);
  border: 1px solid var(--noba-border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 9990;
  display: none;
}
#noba-tool .panel-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1rem 0.25rem;
}
#noba-tool .panel-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#noba-tool .panel-header-title .style-h1 {
  font-weight: bold;
  font-size: 1.15rem;
}
#noba-tool .panel-header-title .panel-close-button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background-color: var(--noba-bg-feature);
}
#noba-tool .panel-header-title .panel-close-button:hover {
  background-color: var(--noba-bg-feature-hover);
}
#noba-tool #noba-features {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
}
#noba-tool #footer-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#noba-tool #footer-features button {
  width: 100%;
}
#noba-tool h1 {
  font-size: var(--noba-size-h1);
}
#noba-tool h2 {
  font-size: var(--noba-size-h2);
}
#noba-tool .wrapper {
  margin-top: 1rem;
}
#noba-tool .panel-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background-color: var(--noba-bg-footer);
  border: 1px solid var(--noba-feature-border);
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
#noba-tool .panel-footer .footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--noba-size-small);
}
#noba-tool .panel-footer .footer-info a {
  text-decoration: underline;
}
#noba-tool .panel-footer .footer-info a:hover {
  color: black;
}

#noba-tooltip {
  position: absolute;
  background-color: black;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: var(--noba-size-small);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.noba-feature-wrapper {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  flex-direction: column;
  padding: 0.5rem;
  background-color: var(--noba-bg-feature);
  border: 1px solid var(--noba-feature-border);
  border-radius: 0.5rem;
}
.noba-feature-wrapper.button-style {
  cursor: pointer;
}
.noba-feature-wrapper.button-style:hover {
  background-color: var(--noba-bg-feature-hover);
}
.noba-feature-wrapper.active {
  background-color: var(--noba-bg-feature-active);
}
.noba-feature-wrapper .noba-feature-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.noba-feature-wrapper .noba-feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.noba-feature-wrapper .noba-feature-header .noba-feature-title {
  margin-bottom: 0;
}
.noba-feature-wrapper .noba-feature-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.noba-feature-wrapper .noba-toggle-indicator {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  border: 2px solid var(--noba-feature-toggle-border);
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}
.noba-feature-wrapper.active .noba-toggle-indicator {
  background-color: var(--noba-feature-toggle-bg);
}
.noba-feature-wrapper.active .noba-toggle-indicator::after {
  content: "";
  position: absolute;
  left: 6px;
  transform: rotate(45deg);
  display: inline-block;
  height: 16px;
  width: 8px;
  border-bottom: 3px solid white;
  border-right: 3px solid white;
}
.noba-feature-wrapper .noba-feature-select-wrapper {
  display: flex;
}
.noba-feature-wrapper .noba-feature-select-wrapper select {
  flex: 1;
  width: 100%;
}

.noba-feature-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--noba-size-button);
  padding: 0.25rem 0.5rem;
  background-color: white;
  color: var(--noba-text);
  border: 2px solid var(--noba-primary);
  border-radius: 0.5rem;
  cursor: pointer;
}
.noba-feature-button:hover {
  background-color: var(--noba-primary-light);
}
.noba-feature-button.confirm {
  background-color: var(--noba-primary);
  color: var(--noba-on-primary);
}
.noba-feature-button.confirm:hover {
  background-color: var(--noba-primary-hover);
}

.noba-feature-label {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.noba-feature-fontsize {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.scale-indicator {
  margin: 0 1rem;
}

.noba-feature-select {
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  background-color: white;
  border: 1px solid var(--noba-feature-border);
  border-radius: 0.5rem;
  cursor: pointer;
}

.noba-hide-overlay {
  position: absolute;
  inset: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.noba-hide-box {
  background: #fff;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  border-radius: 0.5rem;
  text-align: center;
}

.noba-hide-text {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.noba-hide-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.high-contrast-link {
  color: var(--noba-hc-link-color) !important;
  text-decoration: underline !important;
  outline: 2px dashed var(--noba-hc-link-color) !important;
  font-weight: bold !important;
}
.high-contrast-link:hover {
  background-color: inherit;
  outline: 2px solid var(--noba-hc-link-color-hover) !important;
}
.high-contrast-link .bar {
  background-color: var(--noba-hc-link-color) !important;
}

.high-contrast-input {
  outline: 2px dashed var(--noba-hc-input-border) !important;
}
.high-contrast-input:hover {
  outline: 2px solid var(--noba-hc-input-border) !important;
}

.color-blind-deuteranopia {
  filter: url(#deuteranopia);
}

.color-blind-protanopia {
  filter: url(#protanopia);
}

.color-blind-tritanopia {
  filter: url(#tritanopia);
}

.color-blind-monochrome {
  filter: grayscale(100%) contrast(140%);
}

.reduce-motion #cc-main,
.reduce-motion #cc-main .cm,
.reduce-motion #cc-main .pm {
  --cc-modal-transition-duration: 0;
}
.reduce-motion *:not(.swiper-wrapper):not(.swiper-slide):not(.swiper-button-prev):not(.swiper-button-next):not(#cc-main):not(#cc-main *) {
  transition: none !important;
  animation: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
