/* VOCPhone download helper modal
 * Browser/OS-aware "how to finish your download" overlay.
 * Reuses the portal design tokens (see portal-theme.css).
 */

/* "Need help installing?" trigger under download buttons */
.dl-help-trigger {
  display: inline-flex;
  align-self: center;
  background: none;
  border: none;
  padding: 2px 4px;
  margin-top: 2px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--portal-teal, #0a5270);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.dl-help-trigger:hover {
  color: var(--portal-navy, #073d54);
}

/* In the hero, the trigger sits on the dark background */
.hero-content .dl-help-trigger {
  color: #ffffff;
  opacity: 0.85;
}

.hero-content .dl-help-trigger:hover {
  color: #ffffff;
  opacity: 1;
}

.dl-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 61, 84, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: dl-help-fade 0.2s ease;
  overflow-y: auto;
}

@keyframes dl-help-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dl-help-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: auto;
  background: var(--portal-white, #ffffff);
  border-radius: var(--portal-radius-card, 16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  animation: dl-help-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dl-help-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dl-help-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 1;
}

.dl-help-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Header */
.dl-help-header {
  background:
    linear-gradient(135deg, rgba(7, 61, 84, 0.35) 0%, rgba(10, 82, 112, 0.2) 100%),
    var(--portal-navy, #073d54);
  color: #ffffff;
  text-align: center;
  padding: 32px 28px 24px;
}

.dl-help-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--portal-orange, #ff6d54);
  box-shadow: 0 6px 20px rgba(255, 109, 84, 0.4);
}

.dl-help-icon svg {
  width: 28px;
  height: 28px;
  color: #ffffff;
}

.dl-help-header h2 {
  margin: 0 0 6px;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dl-help-sub {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.8;
  word-break: break-word;
}

/* Body */
.dl-help-body {
  padding: 24px 28px 8px;
}

.dl-help-lead {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--portal-text, #1a2b34);
}

.dl-help-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dl-help-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.dl-help-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--portal-teal, #0a5270);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.dl-help-step-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--portal-text, #1a2b34);
}

.dl-help-step-text strong {
  color: var(--portal-navy, #073d54);
  font-weight: 700;
}

.dl-help-step-text code {
  display: inline-block;
  background: var(--portal-bg, #f3f5f7);
  border: 1px solid var(--portal-border, #e1e6ea);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.8125rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--portal-navy, #073d54);
  word-break: break-all;
}

.dl-help-note {
  margin: 20px 0 0;
  padding: 12px 14px;
  background: var(--portal-bg, #f3f5f7);
  border-radius: var(--portal-radius-sm, 10px);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--portal-text-muted, #5a6b74);
}

/* Footer */
.dl-help-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 28px 24px;
}

.dl-help-retry {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--portal-teal, #0a5270);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dl-help-retry:hover {
  color: var(--portal-navy, #073d54);
}

.dl-help-done {
  padding: 12px 28px;
  background: var(--portal-orange, #ff6d54);
  color: #ffffff;
  border: none;
  border-radius: var(--portal-radius-button, 10px);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  box-shadow: var(--portal-shadow-button, 0 4px 14px rgba(255, 109, 84, 0.35));
  transition: all 0.2s ease;
}

.dl-help-done:hover {
  background: var(--portal-orange-light, #ff8470);
  transform: translateY(-1px);
}

.dl-help-done:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .dl-help-overlay {
    padding: 12px;
  }

  .dl-help-header {
    padding: 28px 20px 20px;
  }

  .dl-help-body {
    padding: 20px 20px 4px;
  }

  .dl-help-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 16px 20px 20px;
  }

  .dl-help-done {
    width: 100%;
  }

  .dl-help-retry {
    text-align: center;
  }
}
