/* System2 Configurator - conversion action bar (buy / quote / share).
 *
 * Scoped under .s2c-convert so nothing here can leak into the rest of the app.
 * In-house tokens only, light theme, no dark mode. System font stack.
 */

.s2c-convert {
  --s2c-accent: #2563eb;
  --s2c-accent-ink: #ffffff;
  --s2c-accent-hover: #1d4ed8;
  --s2c-success: #059669;
  --s2c-success-hover: #047857;
  --s2c-muted: #6b7280;
  --s2c-border: #e5e7eb;
  --s2c-ink: #111827;
  --s2c-bg: #ffffff;
  --s2c-bg-soft: #f9fafb;
  --s2c-radius: 10px;
  --s2c-shadow: 0 -2px 12px rgba(17, 24, 39, 0.08);

  position: sticky;
  bottom: 0;
  z-index: 40;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--s2c-ink);
  background: var(--s2c-bg);
  border-top: 1px solid var(--s2c-border);
  box-shadow: var(--s2c-shadow);
}

.s2c-convert *,
.s2c-convert *::before,
.s2c-convert *::after {
  box-sizing: border-box;
}

.s2c-convert__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
}

.s2c-convert__summary {
  flex: 1 1 200px;
  min-width: 160px;
  line-height: 1.3;
}

.s2c-convert__total {
  font-size: 18px;
  font-weight: 700;
  color: var(--s2c-ink);
}

.s2c-convert__sub {
  font-size: 12px;
  color: var(--s2c-muted);
}

.s2c-convert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* buttons ----------------------------------------------------------------- */
.s2c-btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 11px 16px;
  border-radius: var(--s2c-radius);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.05s ease;
}

.s2c-btn:active {
  transform: translateY(1px);
}

.s2c-btn:focus-visible {
  outline: 2px solid var(--s2c-accent);
  outline-offset: 2px;
}

.s2c-btn--primary {
  background: var(--s2c-accent);
  color: var(--s2c-accent-ink);
}

.s2c-btn--primary:hover {
  background: var(--s2c-accent-hover);
}

.s2c-btn--success {
  background: var(--s2c-success);
  color: #ffffff;
}

.s2c-btn--success:hover {
  background: var(--s2c-success-hover);
}

.s2c-btn--ghost {
  background: var(--s2c-bg);
  color: var(--s2c-ink);
  border-color: var(--s2c-border);
}

.s2c-btn--ghost:hover {
  background: var(--s2c-bg-soft);
  border-color: #d1d5db;
}

.s2c-btn[disabled],
.s2c-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.s2c-btn__icon {
  font-size: 15px;
  line-height: 1;
}

/* fallback / toast panel --------------------------------------------------- */
.s2c-convert__note {
  flex: 1 1 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--s2c-border);
  border-left: 3px solid var(--s2c-accent);
  border-radius: 8px;
  background: var(--s2c-bg-soft);
  font-size: 13px;
  color: var(--s2c-ink);
}

.s2c-convert__note[hidden] {
  display: none;
}

.s2c-convert__note-title {
  font-weight: 600;
  margin: 0 0 6px;
}

.s2c-convert__note-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.s2c-convert__note-list a {
  color: var(--s2c-accent);
  text-decoration: none;
  font-weight: 500;
}

.s2c-convert__note-list a:hover {
  text-decoration: underline;
}

/* transient toast --------------------------------------------------------- */
.s2c-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(8px);
  z-index: 60;
  max-width: 90vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--s2c-ink, #111827);
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.s2c-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* responsive -------------------------------------------------------------- */
@media (max-width: 640px) {
  .s2c-convert__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .s2c-convert__actions {
    width: 100%;
  }

  .s2c-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
