/* Driver.js custom skin aligned with Gestor OS tokens */

:root {
  --driver-brand: var(--brand, #2563eb);
  --driver-overlay: rgba(15, 23, 42, 0.25);
  --driver-popover-bg: var(--bg, #ffffff);
  --driver-popover-radius: 12px;
  --driver-popover-shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
}

.driver-overlay {
  background: var(--driver-overlay);
}

.driver-popover {
  background: var(--driver-popover-bg);
  border-radius: var(--driver-popover-radius);
  box-shadow: var(--driver-popover-shadow);
  color: var(--text-primary, #111111);
  max-width: 380px;
  padding: 14px;
  font-family: Inter, "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.driver-popover .driver-popover-title {
  font-weight: 600;
  color: var(--text-primary, #111111);
  margin-bottom: 6px;
}

.driver-popover .driver-popover-description {
  color: var(--text-sub, #6b7280);
  line-height: 1.35;
}

.driver-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.driver-btn {
  background: var(--driver-brand);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

/* Local fallback tour used when the bundled Driver.js is a placeholder */
.driver-local-tour-open,
.driver-local-tour-open body {
  overflow: hidden;
}

.driver-local-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  z-index: 9990;
}

.driver-local-popover {
  position: fixed;
  z-index: 9991;
  width: min(420px, calc(100vw - 24px));
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.22);
  padding: 18px;
  color: var(--text-primary, #111111);
  font-family: Inter, "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.driver-local-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.driver-local-popover-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label, #6b7280);
}

.driver-local-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-primary, #111111);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.driver-local-popover-title {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-primary, #111111);
}

.driver-local-popover-description {
  margin: 0;
  color: var(--text-sub, #475569);
  line-height: 1.45;
  white-space: pre-line;
}

.driver-local-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.driver-local-progress {
  font-size: 12px;
  color: var(--text-label, #6b7280);
}

.driver-local-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.driver-local-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.driver-local-btn-primary {
  background: var(--driver-brand);
  color: #fff;
}

.driver-local-btn-secondary {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-primary, #111111);
}

.driver-local-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.driver-local-highlight {
  position: relative;
  z-index: 9992;
  outline: 2px solid rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.12);
  border-radius: 14px;
}

.driver-local-popover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 38%);
}

@media (max-width: 640px) {
  .driver-popover { max-width: calc(100% - 32px); padding: 16px; }
  .driver-btn { padding: 10px 14px; }

  .driver-local-popover {
    width: calc(100vw - 20px);
    padding: 14px;
    border-radius: 16px;
  }

  .driver-local-popover-title {
    font-size: 18px;
  }

  .driver-local-popover-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .driver-local-actions {
    justify-content: space-between;
  }
}
