/* AR Sulehri — Frontend Button
   Author: ok
   ─────────────────────────────────────────────────── */

.arsp-download-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f7f7fc 0%, #eeeefc 100%);
  border: 1px solid #e0e0ef;
  border-radius: 12px;
  font-family: inherit;
}

/* ── Button ──────────────────────────────────────────── */
.arsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: #1a1a2e;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(26,26,46,.25);
  position: relative;
  overflow: hidden;
}

.arsp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}

.arsp-btn:hover {
  background: #16163f;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,26,46,.32);
}

.arsp-btn:hover::before {
  background: rgba(255,255,255,.05);
}

.arsp-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(26,26,46,.2);
}

.arsp-btn:focus-visible {
  outline: 3px solid rgba(26,26,46,.4);
  outline-offset: 2px;
}

/* Loading state */
.arsp-btn.is-loading {
  pointer-events: none;
  opacity: .8;
}

.arsp-btn.is-loading .arsp-btn__icon,
.arsp-btn.is-loading .arsp-btn__label {
  opacity: 0;
}

.arsp-btn.is-loading .arsp-btn__spinner {
  opacity: 1;
}

/* ── Icon ────────────────────────────────────────────── */
.arsp-btn__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity .15s;
}

.arsp-btn__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* ── Label ───────────────────────────────────────────── */
.arsp-btn__label {
  transition: opacity .15s;
  white-space: nowrap;
}

/* ── Spinner ─────────────────────────────────────────── */
.arsp-btn__spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
}

.arsp-btn__spinner::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: arsp-spin .65s linear infinite;
}

@keyframes arsp-spin {
  to { transform: rotate(360deg); }
}

/* ── Hint text ───────────────────────────────────────── */
.arsp-hint {
  margin: 0;
  font-size: 12.5px;
  color: #7a7a9a;
  font-style: italic;
}

/* ── Error ───────────────────────────────────────────── */
.arsp-error {
  display: none;
  width: 100%;
  margin-top: 10px;
  padding: 8px 14px;
  background: #fff2f4;
  border: 1px solid #ffd0d8;
  border-radius: 6px;
  color: #c0392b;
  font-size: 13px;
}

.arsp-error.is-visible {
  display: block;
}

/* ── Dark-mode ───────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .arsp-download-wrap {
    background: linear-gradient(135deg, #1e1e30 0%, #25254a 100%);
    border-color: #35355a;
  }
  .arsp-hint {
    color: #9090b0;
  }
}
