/* dData Solution Inquiry — shared contact modal.
   Loaded by every page. Colours read the page's own design tokens so the modal
   picks up each product's accent; team.html defines no tokens, hence fallbacks. */

.ci-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  background: rgba(17, 20, 24, 0.55);
  opacity: 0;
  transition: opacity 180ms cubic-bezier(0.25, 1, 0.5, 1);
}
.ci-backdrop.is-open { display: flex; }
.ci-backdrop.is-shown { opacity: 1; }

.ci-modal {
  width: 100%; max-width: 560px;
  background: var(--bp-bg, #fff);
  box-shadow: 0 0 0 1px rgba(17, 20, 24, 0.1),
              0 4px 8px rgba(17, 20, 24, 0.12),
              0 18px 46px 6px rgba(17, 20, 24, 0.2);
  font-family: 'Alliance No.2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--bp-text, #111418);
  transform: translateY(-8px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.ci-backdrop.is-shown .ci-modal { transform: none; }

/* ---- Header ---- */
.ci-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--bp-border-light, #E5E8EB);
}
.ci-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--bp-primary, #2D72D2);
  margin-bottom: 8px;
}
.ci-eyebrow-line {
  width: 20px; height: 1px; background: currentColor; opacity: 0.45;
}
.ci-title {
  font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
  line-height: 1.25; margin: 0 0 6px;
}
.ci-sub {
  font-size: 13px; line-height: 1.55; margin: 0;
  color: var(--bp-text-secondary, #5F6B7C);
}
.ci-close {
  margin-left: auto; flex-shrink: 0;
  width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center;
  background: none; border: none; cursor: pointer;
  color: var(--bp-text-muted, #8F99A8);
  transition: background 100ms, color 100ms;
}
.ci-close:hover { background: var(--bp-bg-wash, #EDEFF2); color: var(--bp-text, #111418); }
.ci-close svg { width: 14px; height: 14px; }

/* ---- Form ---- */
.ci-body { padding: 20px 24px 8px; }
.ci-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ci-field { margin-bottom: 14px; }
.ci-label {
  display: block; margin-bottom: 5px;
  font-size: 12px; font-weight: 600;
  color: var(--bp-text, #111418);
}
.ci-req { color: var(--bp-danger, #CD4246); margin-left: 2px; }
.ci-input,
.ci-textarea {
  width: 100%; display: block;
  padding: 8px 10px;
  font-family: inherit; font-size: 14px; line-height: 1.5;
  color: var(--bp-text, #111418);
  background: var(--bp-bg, #fff);
  border: none; border-radius: 0;
  box-shadow: 0 0 0 1px var(--bp-border, #D3D8DE);
  transition: box-shadow 100ms;
}
.ci-textarea { resize: vertical; min-height: 92px; }
.ci-input:focus,
.ci-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--bp-primary, #2D72D2),
              0 0 0 3px color-mix(in srgb, var(--bp-primary, #2D72D2) 20%, transparent);
}
.ci-field.has-error .ci-input,
.ci-field.has-error .ci-textarea {
  box-shadow: 0 0 0 1px var(--bp-danger, #CD4246);
}
.ci-error {
  display: none;
  margin-top: 4px; font-size: 11.5px;
  color: var(--bp-danger, #CD4246);
}
.ci-field.has-error .ci-error { display: block; }
.ci-hint {
  margin-top: 4px; font-size: 11.5px;
  color: var(--bp-text-muted, #8F99A8);
}

/* ---- Footer ---- */
.ci-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 24px 22px;
}
.ci-foot-note {
  margin-right: auto;
  font-size: 11.5px; line-height: 1.45;
  color: var(--bp-text-muted, #8F99A8);
}
.ci-book {
  display: inline-block; margin-top: 3px;
  color: var(--bp-primary, #2D72D2); text-decoration: none; font-weight: 500;
}
.ci-book:hover { text-decoration: underline; }

.ci-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  border: none; border-radius: 0; cursor: pointer;
  text-decoration: none;   /* the result panel uses an <a> as a button */
  transition: background 100ms, opacity 100ms;
}
.ci-btn-ghost {
  background: var(--bp-bg, #fff); color: var(--bp-text, #111418);
  box-shadow: 0 0 0 1px rgba(17, 20, 24, 0.15);
}
.ci-btn-ghost:hover { background: var(--bp-bg-wash, #EDEFF2); }
.ci-btn-primary { background: var(--bp-primary, #2D72D2); color: #fff; }
.ci-btn-primary:hover { background: var(--bp-primary-hover, #215DB0); }
.ci-btn[disabled] { opacity: 0.6; cursor: default; }
.ci-spinner {
  width: 13px; height: 13px; flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff; border-radius: 50%;
  animation: ci-spin 600ms linear infinite;
}
@keyframes ci-spin { to { transform: rotate(360deg); } }

/* ---- Result panel ---- */
.ci-result { display: none; padding: 32px 24px 28px; text-align: center; }
.ci-modal.is-done .ci-body,
.ci-modal.is-done .ci-foot { display: none; }
.ci-modal.is-done .ci-result { display: block; }
.ci-result-icon {
  width: 44px; height: 44px; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bp-success, #238551) 12%, transparent);
  color: var(--bp-success, #238551);
}
.ci-result-icon svg { width: 22px; height: 22px; }
.ci-result-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.ci-result-text {
  font-size: 13.5px; line-height: 1.6; margin: 0 auto 20px; max-width: 360px;
  color: var(--bp-text-secondary, #5F6B7C);
}
.ci-result-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 560px) {
  .ci-backdrop { padding: 0; align-items: stretch; }
  .ci-modal { max-width: none; min-height: 100%; }
  .ci-row { grid-template-columns: 1fr; gap: 0; }
  .ci-head { padding: 18px 18px 14px; }
  .ci-body { padding: 18px 18px 6px; }
  .ci-foot { flex-wrap: wrap; padding: 14px 18px 20px; }
  .ci-foot-note { width: 100%; margin: 0 0 10px; }
  .ci-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ci-backdrop, .ci-modal { transition: none; }
  .ci-spinner { animation-duration: 2s; }
}
