/* =========================================================
   Compliance Verification - globale Hilfe
   Als eigene Datei /styles/help.css einbinden.
========================================================= */

.global-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-width: 120px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 22px;
  background: #1f5ea8;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.global-help-btn:hover {
  background: #376da6;
  transform: translateY(-1px);
}

.global-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-size: 14px;
  font-weight: 800;
}

body.cv-help-open {
  overflow: hidden;
}

.cv-help-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 5000;
}

.cv-help-modal.is-open {
  display: block;
}

.cv-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 14, 27, .72);
  backdrop-filter: blur(3px);
}

.cv-help-dialog {
  position: relative;
  width: min(1050px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1f2937;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.4);
  overflow: hidden;
}

.cv-help-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid #dce3ea;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.cv-help-header h2 {
  margin: 0 0 8px;
  color: #0d2f57;
}

.cv-help-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-help-role {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.cv-help-role-content {
  background: #dcfce7;
  color: #166534;
}

.cv-help-role-admin {
  background: #dbeafe;
  color: #1e40af;
}

.cv-help-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #475569;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.cv-help-close:hover {
  background: #e2e8f0;
}

.cv-help-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px 28px;
}

.cv-help-section {
  padding: 0 0 30px;
  margin: 0 0 30px;
  border-bottom: 1px solid #e2e8f0;
}

.cv-help-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.cv-help-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.cv-help-section-heading h3 {
  margin: 0 0 5px;
  color: #0d2f57;
}

.cv-help-section-heading p {
  margin: 0;
  color: #64748b;
}

.cv-help-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #0d2f57;
  color: #fff;
  font-weight: 800;
}

.cv-help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
  gap: 28px;
  align-items: start;
}

.cv-help-grid h4 {
  margin: 18px 0 8px;
  color: #0d2f57;
}

.cv-help-grid h4:first-child {
  margin-top: 0;
}

.cv-help-grid p,
.cv-help-grid li {
  color: #334155;
  line-height: 1.55;
}

.cv-help-steps {
  margin: 0;
  padding-left: 22px;
}

.cv-help-steps li {
  margin-bottom: 7px;
}

.cv-help-tip {
  margin-top: 18px;
  padding: 13px 15px;
  border-left: 4px solid #1f5ea8;
  border-radius: 8px;
  background: #eef4fb;
  color: #334155;
}

.cv-help-shot {
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 14px;
  background: #f8fafc;
}

.cv-help-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.cv-help-shot-caption {
  padding: 9px 12px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
}

.cv-help-shot-placeholder {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 2px dashed #cbd5e1;
  color: #64748b;
  text-align: center;
}

.cv-help-shot-placeholder code {
  color: #0d2f57;
}

.cv-help-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.cv-help-context {
  color: #64748b;
  font-size: 12px;
}

.cv-help-context code {
  color: #334155;
}

@media (max-width: 900px) {
  .global-help-btn {
    min-width: auto;
  }

  .cv-help-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .cv-help-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    margin: 8px auto;
  }

  .cv-help-header,
  .cv-help-body,
  .cv-help-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cv-help-footer {
    align-items: flex-end;
    flex-direction: column;
  }
}
