[class*="color-scheme"] .st-product-card-actions__trigger-modal  {
  --color-button-background: 0, 0, 0 !important;
  --color-button-text: 255, 255, 255 !important;
}

.st-product-card-actions {
  display: flex;
  max-width: 100%;
}

.st-product-card-actions > * {
  flex: 0 0 auto;
}

.st-product-card-actions__trigger-wrapper {
  display: block;
  max-width: 100%;
}

.st-product-card-actions__trigger-wrapper--full {
  flex: 1 1 auto;
  width: 100%;
}

.st-product-card-actions__trigger {
  display: block;
  width: auto;
  max-width: 100%;
}

.st-product-card-actions__trigger-summary {
  display: block;
  width: auto;
}

.st-product-card-actions__trigger-summary--icon-right
  .st-product-card-actions__trigger-control {
  flex-direction: row-reverse;
}

.st-product-card-actions__trigger-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--st-product-alert-trigger-gap, 8px);
  width: auto;
  max-width: 100%;
  padding: var(--st-product-alert-trigger-padding-y, 12px)
    var(--st-product-alert-trigger-padding-x, 16px);
  color: var(--st-product-alert-trigger-text-color, #111111);
  text-align: center;
  font-family: var(--st-product-alert-trigger-font-family);
  font-size: var(--st-product-alert-trigger-font-size, 14px);
  font-weight: var(--st-product-alert-trigger-font-weight, 600);
  line-height: var(--st-product-alert-trigger-line-height, 1.1);
  text-transform: uppercase;
  letter-spacing: var(--st-product-alert-trigger-letter-spacing, 0.08em);
  cursor: pointer;
  appearance: none;
  border: var(--st-product-alert-trigger-border-width, 1px) solid
    var(--st-product-alert-trigger-border-color, #111111);
  border-radius: var(--st-product-alert-trigger-border-radius, 4px);
  background: none;
  box-sizing: border-box;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.st-product-card-actions__trigger-control--solid {
  color: var(--st-product-alert-trigger-text-color, #ffffff);
  background-color: var(--st-product-alert-trigger-background-color, #111111);
  border-color: var(--st-product-alert-trigger-border-color, #111111);
}

.st-product-card-actions__trigger-control--outline,
.st-product-card-actions__trigger-control--icon-only {
  background-color: var(--st-product-alert-trigger-background-color, #ffffff);
}

.st-product-card-actions__trigger-control--ghost {
  background-color: transparent;
  border-color: transparent;
}

.st-product-card-actions__trigger-summary:hover
  .st-product-card-actions__trigger-control,
.st-product-card-actions__trigger-summary:focus-visible
  .st-product-card-actions__trigger-control {
  color: var(--st-product-alert-trigger-hover-text-color, #ffffff);
  background-color: var(--st-product-alert-trigger-hover-background-color, #111111);
}

.st-product-card-actions__trigger-control--solid:hover,
.st-product-card-actions__trigger-control--solid:focus-visible {
  opacity: 0.88;
}

.st-product-card-actions__trigger-summary:hover
  .st-product-card-actions__trigger-control--outline,
.st-product-card-actions__trigger-summary:focus-visible
  .st-product-card-actions__trigger-control--outline {
  border-color: var(--st-product-alert-trigger-hover-border-color, #111111);
}

.st-product-card-actions__trigger-summary:hover
  .st-product-card-actions__trigger-control--ghost,
.st-product-card-actions__trigger-summary:focus-visible
  .st-product-card-actions__trigger-control--ghost {
  border-color: transparent;
}

.st-product-card-actions__trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--st-product-alert-trigger-icon-size, 18px);
  height: var(--st-product-alert-trigger-icon-size, 18px);
  flex: 0 0 var(--st-product-alert-trigger-icon-size, 18px);
}

.st-product-card-actions__trigger-icon > * {
  display: block;
  width: 100%;
  height: 100%;
}

.st-product-card-actions__trigger-label {
  display: inline-block;
}

.st-product-card-actions__trigger--full,
.st-product-card-actions__trigger-summary--full,
.st-product-card-actions__trigger-control--full {
  width: 100%;
}

.st-product-card-actions__trigger-control--icon-only {
  width: auto;
  min-width: 0;
  padding-inline: var(--st-product-alert-trigger-padding-x, 16px);
  padding-block: var(--st-product-alert-trigger-padding-y, 12px);
}

.st-product-card-actions__trigger-modal {
  width: min(
    var(--st-product-alert-modal-width, 600px),
    calc(100vw - var(--page-padding, 20px) * 2)
  );
  max-width: calc(100vw - var(--page-padding, 20px) * 2);
  max-height: auto;
  margin: auto;
  box-sizing: border-box;
  background-color: #ebebeb;
  border: 0;
  overflow: hidden;
}

.st-product-card-actions__trigger-modal[open] {
  display: flex;
  flex-direction: column;
}

/* Close button inside header — plain X, no border */
.st-product-card-actions__modal-header .modal__close-control {
  color: #ffffff;
  border: none;
  border-radius: 0;
  background: none;
  width: auto;
  height: auto;
}

.st-product-card-actions__modal-header .modal__close-control svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  min-height: 20px;
}

.st-product-card-actions__trigger-modal-content {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--st-product-alert-modal-padding, 24px);
}

.st-product-card-actions__trigger-modal-content:has(.klaviyo-form) {
  padding: 0;
}

/* Modal body — Klaviyo form */
.st-product-card-actions__modal-body {
  flex: 0 0 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 70px;
  box-sizing: border-box;
  text-align: center;
}

.st-product-card-actions__modal-body-text {
  margin: 0 0 16px;
  font-size: var(--st-modal-body-font-size, 21px);
  font-family: var(--st-modal-body-font-family, 'Jost', sans-serif);
  line-height: 1;
  color: inherit;
}

/* Override Klaviyo inline styles */
.st-product-card-actions__modal-body .klaviyo-form form {
  background-color: transparent !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.st-product-card-actions__modal-body .klaviyo-form form > div {
  min-height: 0 !important;
}

/* Hide entire form-row containers that hold richtext — handled by modal header/body text */
.st-product-card-actions__modal-body [data-testid="form-row"]:has(.klaviyo-form-richtext) {
  display: none !important;
}

/* Center email+button group in the body */
.st-product-card-actions__modal-body [data-testid="form-row"]:has(.klaviyo-emailinput) {
  justify-content: center !important;
}

/* Email input component — fixed width */
.st-product-card-actions__modal-body [data-testid="form-component"]:has(.klaviyo-emailinput) {
  flex: 0 0 auto !important;
}

.st-product-card-actions__modal-body .klaviyo-emailinput {
  min-width: 347px !important;
}

.st-product-card-actions__modal-body .klaviyo-emailinput input {
  border: 1px solid #D2D2D2 !important;
  border-right: none !important;
  height: 40px !important;
  color: #000000 !important;
  font-family: 'Jost', sans-serif !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0 12px !important;
}

.st-product-card-actions__modal-body .klaviyo-emailinput input::placeholder {
  color: #919191 !important;
  font-size: 12px !important;
}

.st-product-card-actions__modal-body .klaviyo-emailinput input:focus {
  outline: none !important;
  border-color: #919191 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Button component — fixed size */
.st-product-card-actions__modal-body [data-testid="form-component"]:has(.klaviyo-form-button) {
  flex: 0 0 auto !important;
  padding: 0px;
}

.st-product-card-actions__modal-body .klaviyo-form-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  background-color: #000000 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0 20px !important;
  cursor: pointer !important;
}

/* Modal header */
.st-product-card-actions__modal-header {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 185px;
  padding: 28px 60px 0;
  text-align: center;
  box-sizing: border-box;
  background-image: image-set(
    url('https://img-va.myshopline.com/image/store/1766435262439/klaviyo-modal-lines-header.png?w=600&h=198') 1x,
    url('https://img-va.myshopline.com/image/store/1766435262439/klaviyo-modal-lines-header.png?w=1200&h=396') 2x
  );
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top center;
}

.st-product-card-actions__modal-header-title {
  margin: 0;
  color: #ffffff;
  font-size: var(--st-modal-header-font-size, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: var(--st-modal-header-font-family, 'Jost', sans-serif);
  font-weight: 700;
}

/* Modal footer */
.st-product-card-actions__modal-footer {
  flex-shrink: 0;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  background-image: image-set(
    url('https://img-va.myshopline.com/image/store/1766435262439/klaviyo-modal-lines-footer.png?w=600&h=128') 1x,
    url('https://img-va.myshopline.com/image/store/1766435262439/klaviyo-modal-lines-footer.png?w=1200&h=256') 2x
  );
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top center;
}

.st-product-card-actions__modal-footer-logo svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 65px;
}

.st-product-card-actions__trigger-modal-content > *:first-child {
  margin-top: 0;
}

.st-product-card-actions__trigger-modal-content > *:last-child {
  margin-bottom: 0;
}

.st-product-card-actions__trigger-modal-title {
  margin-block: 0 16px;
}

.st-product-card-actions__trigger-wrapper--button
  .st-product-card-actions__trigger-control {
  min-height: 24px;
}

.st-product-card-actions .st-product-alert-message__text {
  font-size: var(--st-product-alert-message-font-size, 12px) !important;
}

@media (min-width: 600px) and (max-width: 959px) {
  .st-product-card-actions__modal-header {
    padding: 40px 138px !important;
    min-height: 160px!important;
  }

  .st-product-card-actions__modal-body-text {
    padding: 0 120px;
  }
}

/* Restock form */
.st-restock-form {
  width: 100%;
  max-width: 347px;
  margin: 0 auto;
}

.st-restock-form__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.st-restock-form .field {
  margin: 0;
}

.st-restock-form .field__inner {
  position: relative;
  display: block;
}

.st-restock-form .field__input {
  display: block;
  width: 100%;
  padding: 18px 12px 8px;
  line-height: 1.4;
  border: 1px solid #D2D2D2;
  border-radius: 0;
  box-sizing: border-box;
  font-family: var(--sort-body-font);
  font-size: 12px;
  color: #000000;
  background: #ffffff;
  text-align: left;
  transition: border-color 0.2s ease;
}

.st-restock-form .field__input::placeholder {
  color: #919191;
}

.st-restock-form .field__input:focus {
  outline: none;
  border-color: #919191;
  box-shadow: none;
}

.st-restock-form .field__label {
  inset-inline: 12px 0;
  text-align: left;
}

.st-restock-form__consent {
  margin-bottom: 16px;
}

.st-restock-form__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.st-restock-form__consent-checkbox {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #000000;
}

.st-restock-form__consent-text {
  font-family: var(--sort-body-font);
  font-size: 10px;
  line-height: 1.5;
  color: #29252C;
}

.st-restock-form__error {
  margin-bottom: 12px;
  font-family: var(--sort-body-font);
  font-size: 12px;
  color: #cc0000;
  text-align: center;
}

.st-restock-form__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: var(--sort-body-font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 12px 20px;
  box-sizing: border-box;
  background-color: rgb(var(--color-button-background));
  color: rgb(var(--color-button-text));
  border: 1px solid rgb(var(--color-button-background));
}

@media (max-width: 959px) {
  .st-restock-form__submit {
    font-size: 15px;
  }
}

.st-restock-form__submit:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.st-restock-form__submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: st-restock-spin 0.6s linear infinite;
  position: absolute;
  right: 14px;
  z-index: 1;
}

st-restock-form.is-loading .st-restock-form__submit-spinner {
  display: block;
}

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

.st-restock-form__success {
  text-align: center;
  padding: 16px 0;
}

.st-restock-form__success-message {
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #29252C;
}

@media (max-width: 959px) {
  .st-restock-form {
    max-width: 100%;
  }
}

@media (max-width: 959px) {
  .st-product-card-actions .st-product-alert-message__text {
    font-size: var(--st-product-alert-message-font-size-mobile, 12px) !important;
  }

  .st-product-card-actions__trigger-icon {
    width: var(--st-product-alert-trigger-icon-size-mobile, 18px);
    height: var(--st-product-alert-trigger-icon-size-mobile, 18px);
    flex: 0 0 var(--st-product-alert-trigger-icon-size-mobile, 18px);
  }

  .st-product-card-actions__trigger-control {
    font-size: var(--st-product-alert-trigger-font-size-mobile, 13px);
    padding: var(--st-product-alert-trigger-padding-y-mobile, 10px)
      var(--st-product-alert-trigger-padding-x-mobile, 14px);
  }

  .st-product-card-actions__trigger-control--icon-only {
    width: auto;
    min-width: 0;
    padding-inline: var(--st-product-alert-trigger-padding-x-mobile, 14px);
    padding-block: var(--st-product-alert-trigger-padding-y-mobile, 10px);
  }

  .st-product-card-actions__trigger-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 90vh;
    border-radius: 0;
  }

  .st-product-card-actions__trigger-modal-content {
    padding: var(--st-product-alert-modal-mobile-padding, 20px);
  }

  .st-product-card-actions__modal-header {
    min-height: 140px;
    padding: 20px 24px;
    border-radius: 0;
  }

  .st-product-card-actions__modal-header-title {
    font-size: var(--st-modal-header-font-size-mobile, 28px);
  }

  .st-product-card-actions__modal-body {
    padding: 10px 35px ;
  }

  .st-product-card-actions__modal-body-text {
    font-size: var(--st-modal-body-font-size-mobile, 14px);
  }

  .st-product-card-actions__modal-body [data-testid="form-row"]:has(.klaviyo-emailinput) {
    width: 100% !important;
  }

  .st-product-card-actions__modal-body [data-testid="form-component"]:has(.klaviyo-emailinput) {
    width: 100% !important;
  }

  .st-product-card-actions__modal-body .klaviyo-emailinput {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  .st-product-card-actions
    theme-dialog.st-product-card-actions__trigger[data-mobile-placement='center']
    > .st-product-card-actions__trigger-modal,
  .st-product-card-actions
    theme-dialog.st-product-card-actions__trigger[data-placement='center']:not([data-mobile-placement='bottom'])
    > .st-product-card-actions__trigger-modal {
    inset: 0;
    width: min(
      var(--st-product-alert-modal-width, 600px),
      calc(100vw - var(--page-padding, 20px) * 2)
    );
    max-width: calc(100vw - var(--page-padding, 20px) * 2);
    max-height: calc(100vh - 40px);
    margin: auto;
    border-radius: 0;
  }
}
