:root {
  --strr-primary: var(--wp--preset--color--primary, #1769ff);
  --strr-background: #f7f9fc;
  --strr-surface: #ffffff;
  --strr-text: #162033;
  --strr-muted: #5f6b7a;
  --strr-border: #d8dee8;
  --strr-radius: 8px;
  --strr-popup-width: 380px;
  --strr-shadow: 0 18px 60px rgba(22, 32, 51, .18);
  --strr-success: #12805c;
  --strr-warning: #a15c00;
  --strr-error: #b42318;
}

.strr-popup,
.strr-dialog,
.strr-panel,
.strr-dashboard {
  box-sizing: border-box;
  color: var(--strr-text);
  font-family: inherit;
}

.strr-popup {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  overflow: hidden;
  width: min(var(--strr-popup-width), calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--strr-border);
  border-radius: var(--strr-radius);
  background: var(--strr-surface);
  box-shadow: var(--strr-shadow);
}

.strr-popup--accent::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--strr-primary);
}

.strr-popup[hidden],
.strr-dialog-backdrop[hidden] {
  display: none;
}

.strr-popup__title,
.strr-dialog h2,
.strr-panel h1,
.strr-panel h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.strr-popup p,
.strr-dialog p,
.strr-panel p {
  margin: 0 0 14px;
}

.strr-popup__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 42px 12px 0;
}

.strr-popup__icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--strr-primary), white 88%);
  color: var(--strr-primary);
}

.strr-popup__icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.strr-popup__badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--strr-border);
  border-radius: 999px;
  background: var(--strr-background);
  color: var(--strr-muted);
  padding: 3px 10px;
  font-size: .82rem;
  font-weight: 700;
}

.strr-popup__close,
.strr-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--strr-muted);
  font-size: 24px;
  cursor: pointer;
}

.strr-popup__actions,
.strr-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.strr-button,
.strr-share-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--strr-primary);
  border-radius: var(--strr-radius);
  background: var(--strr-primary);
  color: #fff;
  padding: 9px 14px;
  text-decoration: none;
  cursor: pointer;
}

.strr-link-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--strr-primary);
  padding: 8px;
  text-decoration: underline;
  cursor: pointer;
}

.strr-popup--button-outline .strr-button {
  background: var(--strr-surface);
  color: var(--strr-primary);
}

.strr-popup--button-soft .strr-button {
  border-color: color-mix(in srgb, var(--strr-primary), white 60%);
  background: color-mix(in srgb, var(--strr-primary), white 86%);
  color: var(--strr-primary);
}

.strr-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(22, 32, 51, .48);
}

.strr-dialog {
  z-index: 9999;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 22px;
  border: 1px solid var(--strr-border);
  border-radius: var(--strr-radius);
  background: var(--strr-surface);
  box-shadow: var(--strr-shadow);
}

.strr-form {
  display: grid;
  gap: 12px;
}

.strr-form label,
.strr-admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.strr-form input[type="email"],
.strr-copy-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--strr-border);
  border-radius: var(--strr-radius);
  padding: 8px 10px;
  font: inherit;
}

.strr-checkbox {
  grid-template-columns: 20px 1fr;
  align-items: start;
  font-weight: 400;
}

.strr-form__message.is-error {
  color: var(--strr-error);
}

.strr-public-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px;
}

.strr-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--strr-border);
  border-radius: var(--strr-radius);
  background: var(--strr-surface);
}

.strr-dashboard__header,
.strr-copy-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.strr-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.strr-progress {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: #e8edf5;
}

.strr-progress span {
  display: block;
  height: 100%;
  background: var(--strr-success);
}

.strr-table {
  width: 100%;
  border-collapse: collapse;
}

.strr-table th,
.strr-table td {
  border-bottom: 1px solid var(--strr-border);
  padding: 8px;
  text-align: left;
}

.strr-live {
  min-height: 1.5em;
}

.strr-button:focus-visible,
.strr-link-button:focus-visible,
.strr-share-button:focus-visible,
.strr-form input:focus-visible,
.strr-popup__close:focus-visible,
.strr-dialog__close:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--strr-primary), white 35%);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .strr-popup {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }

  .strr-dialog {
    width: 100vw;
    max-width: none;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }

  .strr-dashboard__grid,
  .strr-dashboard__header,
  .strr-copy-row {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
