.dr-did-you-know {
  position: fixed;
  right: 22px;
  bottom: 58px;
  z-index: 1200;
  width: min(390px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--focus-color, #1767a7) 28%, #d1d5db);
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.24);
  animation: dr-tip-in 180ms ease-out;
}

.dr-did-you-know[hidden] {
  display: none !important;
}

body.theme-dark .dr-did-you-know {
  border-color: color-mix(in srgb, var(--focus-color, #1767a7) 48%, #374151);
  background: #111827;
  color: #e5e7eb;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48);
}

.dr-tips-fab {
  position: fixed;
  right: 72px;
  bottom: 2px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #000000;
  color: #facc15;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.dr-tips-fab:hover,
.dr-tips-fab:focus-visible {
  background: #171717;
  color: #fde047;
  outline: 2px solid rgba(250, 204, 21, 0.85);
  outline-offset: 2px;
}

.dr-tips-fab i {
  font-size: 17px;
}

.dr-tips-fab::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  bottom: 50px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.dr-tips-fab:hover::after,
.dr-tips-fab:focus-visible::after {
  opacity: 1;
}

body.theme-light .dr-tips-fab::after,
body.theme-grays .dr-tips-fab::after {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #0f172a;
}

.dr-tip-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 24px;
  font-size: 16px;
}

.dr-tip-position {
  margin-left: auto;
  color: inherit;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.55;
}

.dr-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--focus-color, #1767a7) 14%, #ffffff);
  color: var(--focus-color, #1767a7);
}

body.theme-dark .dr-tip-icon {
  background: color-mix(in srgb, var(--focus-color, #1767a7) 28%, #111827);
}

.dr-did-you-know p {
  margin: 10px 0 14px;
  font-size: 13px;
  line-height: 1.45;
}

.dr-tip-close {
  position: absolute;
  top: 7px;
  right: 9px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
}

.dr-tip-close:hover,
.dr-tip-close:focus-visible {
  opacity: 1;
}

.dr-tip-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.dr-tip-actions .w3-button {
  padding: 6px 11px;
  font-size: 12px;
}

@keyframes dr-tip-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dr-tip-scope {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 8px 0 10px;
  padding: 3px;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.dr-tip-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 27px;
  margin: 6px 0 0;
}

.dr-tip-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 27px;
  padding: 0;
  border: 1px solid rgba(100, 116, 139, 0.32);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.dr-tip-nav-button:hover,
.dr-tip-nav-button:focus-visible {
  border-color: var(--focus-color, #1767a7);
  background: var(--focus-color, #1767a7);
  color: #fff;
  outline: none;
}

.dr-tip-nav-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.dr-tip-nav-button:disabled:hover {
  border-color: rgba(100, 116, 139, 0.32);
  background: rgba(148, 163, 184, 0.12);
  color: inherit;
}

.dr-tip-scope-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.dr-tip-scope-button:hover,
.dr-tip-scope-button:focus-visible {
  background: rgba(148, 163, 184, 0.2);
  outline: none;
}

.dr-tip-scope-button.is-active {
  background: var(--focus-color, #1767a7);
  color: #fff;
}

.dr-tip-page-label {
  display: block;
  width: fit-content;
  margin: 0 0 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(23, 103, 167, 0.12);
  color: var(--focus-color, #1767a7);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

body.theme-dark .dr-tip-page-label {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.dr-tip-target {
  position: relative;
  z-index: 4;
  outline: 4px solid #efff00 !important;
  outline-offset: 5px;
  border-radius: 5px;
  animation: dr-tip-target-pulse 900ms ease-in-out 3;
}

#scubaCalendarViewToggle.dr-tip-target {
  border-radius: 999px;
}

#scubaFavSettingsBtn.dr-tip-target {
  border-radius: 50%;
}

@keyframes dr-tip-target-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(15, 23, 42, 0.92),
      0 0 0 7px rgba(239, 255, 0, 0.82),
      0 0 18px 7px rgba(239, 255, 0, 0.62);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(15, 23, 42, 0.96),
      0 0 0 13px rgba(239, 255, 0, 0.98),
      0 0 34px 14px rgba(239, 255, 0, 0.78);
  }
}

@media (max-width: 520px) {
  .dr-did-you-know {
    right: 10px;
    bottom: 58px;
    width: calc(100vw - 20px);
  }

  .dr-tip-actions {
    flex-wrap: wrap;
  }

  .dr-tip-scope {
    display: flex;
    width: 100%;
    box-sizing: border-box;
  }

  .dr-tip-scope-button {
    flex: 1 1 50%;
  }
}
