/* Download Button Addon — Front-end styles */
.dba-wrap { display: inline-block; }

/* Trigger button */
.dba-trigger-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  transition: transform .15s, box-shadow .2s;
  gap: 2px;
}
.dba-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}
.dba-trigger-btn:active { transform: scale(.97); }

.dba-icon { width: 20px; height: 20px; margin-bottom: 4px; }
.dba-btn-main { font-size: 16px; font-weight: 700; }
.dba-btn-sub  { font-size: 11px; opacity: .82; font-weight: 400; }

/* Overlay */
.dba-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: dbaFadeIn .18s ease;
}
.dba-overlay[hidden] { display: none !important; }

@keyframes dbaFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dbaSlideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Modal */
.dba-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  animation: dbaSlideUp .22s ease;
  overflow: hidden;
}
.dba-modal-header {
  background: linear-gradient(135deg, #635ad9, #a855f7);
  padding: 26px 28px 22px;
}
.dba-modal-body {
  padding: 20px 28px 28px;
}
.dba-modal h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}
.dba-modal-desc {
  font-size: 13px;
  color: rgba(255,255,255,.82);
  margin: 0;
  line-height: 1.55;
}

/* Close button */
.dba-close {
  position: absolute;
  top: 16px; right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .12s;
}
.dba-close { color: rgba(255,255,255,.7); }
.dba-close:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Document badge */
.dba-single-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f6f4ff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #4c3ec7;
  margin-bottom: 16px;
}
.dba-single-doc svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Fields */
.dba-field { margin-bottom: 14px; }
.dba-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}
.dba-req { color: #e24b4a; margin-left: 2px; }

.dba-field input[type=text],
.dba-field input[type=email],
.dba-field input[type=tel],
.dba-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  color: #111;
  background: #fff;
}
.dba-field input:focus,
.dba-field select:focus {
  border-color: #635ad9;
  box-shadow: 0 0 0 3px rgba(99,90,217,.12);
}

/* Privacy */
.dba-privacy label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: #555;
}
.dba-privacy a { color: #635ad9; }

/* Error */
.dba-error {
  font-size: 13px;
  color: #c0392b;
  background: #fff0f0;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}
.dba-error[hidden] { display: none; }

/* Submit */
.dba-submit-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .15s, transform .15s;
  margin-top: 4px;
}
.dba-submit-btn:hover { opacity: .9; transform: translateY(-1px); }
.dba-submit-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Spinner */
.dba-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dbaSpin .6s linear infinite;
}
@keyframes dbaSpin { to { transform: rotate(360deg); } }

/* Success */
.dba-success-step .dba-modal-header { text-align: center; padding-bottom: 28px; }
.dba-success-step .dba-modal-body   { text-align: center; }
.dba-success-icon {
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dba-success-icon svg { width: 32px; height: 32px; color: #fff; }
.dba-success-step h2 { margin-bottom: 0; }
.dba-success-step .dba-modal-body p { font-size: 14px; color: #555; margin-bottom: 20px; line-height: 1.6; }

.dba-direct-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.dba-direct-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: #f3f0ff;
  color: #5141c7;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}
.dba-direct-links a:hover { background: #ebe6ff; }

.dba-close-btn {
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 9px 24px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  color: #555;
  transition: background .12s;
}
.dba-close-btn:hover { background: #f5f5f5; }
