/* Overlay */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.help-overlay[hidden] {
  display: none !important;
}

/* Dialog */
.help-dialog {
  width: min(92vw, 520px);
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px 12px;
  border: solid, 2px, black;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.help-dialog h3 {
  margin: 0 0 8px;
  font-size: clamp(18px, 4.6vw, 22px);
}
.help-body {
  line-height: 1.55;
  font-size: 15px;
  color: #222;
}
.help-body p {
  margin: 0 0 8px;
}
.help-noshow {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  margin-top: 8px;
}

.help-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.btn-primary {
  padding: 0.6rem 1rem;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 10px;
  background: #99115c;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background-color: #ad2c70;
  transform: scale(1.05);
}

.btn-primary:active {
  transform: scale(0.95);
}

.help-close {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 24px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Floating help button */
.help-fab {
  position: fixed;
  right: 20px;
  top: 5px; 
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #000;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  z-index: 9998;
}

@media (max-width: 480px) {
  .help-dialog {
    max-width: 80%; 
    width: auto;
    padding: 12px 14px; 
    font-size: 0.9rem; 
  }

  .help-body p {
    font-size: 0.9rem;
  }

  .help-actions button {
    font-size: 0.95rem;
    padding: 6px 12px;
  }
}

/* přístupnost: omezení animací */
@media (prefers-reduced-motion: reduce) {
  .help-overlay,
  .help-dialog {
    transition: none !important;
  }
}

@supports (env(safe-area-inset-bottom)) {
  .help-fab {
    /* pro iOS zařízení s výřezem */
    bottom: calc(env(safe-area-inset-bottom) + 16px);
  }
}
