/* GPTV single product review editing */

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-existing-form {
  margin: 0;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-existing-form
  .form-submit {
  display: none;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--gptv-shop-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__summary {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__summary
  h3 {
  margin: 0 0 5px;
  color: var(--gptv-shop-text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__status {
  margin: 0;
  color: var(--gptv-shop-accent-hover) !important;
  font-size: 13px;
  font-weight: 800;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__edit,
:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__save {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0 !important;
  padding: 0 17px !important;
  border: 1px solid var(--gptv-shop-accent) !important;
  border-radius: 13px !important;
  background: var(--gptv-shop-accent) !important;
  color: #fff !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 28px rgba(94, 86, 255, 0.2);
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__edit:hover,
:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__save:hover {
  border-color: var(--gptv-shop-accent-hover) !important;
  background: var(--gptv-shop-accent-hover) !important;
  color: #fff !important;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__panel {
  display: grid;
  gap: 13px;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__panel[hidden] {
  display: none;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__panel
  label,
:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__rating
  legend {
  margin: 0;
  color: var(--gptv-shop-muted);
  font-size: 13px;
  font-weight: 800;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__rating {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__rating
  legend {
  flex-basis: 100%;
  margin-bottom: 4px;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__rating
  label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  border: 1px solid var(--gptv-shop-border);
  border-radius: 999px;
  background: var(--gptv-shop-field);
  color: var(--gptv-shop-dim) !important;
  cursor: pointer;
  font-size: 18px;
  transition:
    border-color var(--gptv-shop-transition),
    color var(--gptv-shop-transition),
    background-color var(--gptv-shop-transition);
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__rating
  input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__rating
  label:is(.is-selected, :hover, :focus-within) {
  border-color: var(--gptv-shop-accent-hover);
  background: var(--gptv-shop-accent-soft);
  color: var(--gptv-shop-accent-hover) !important;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor
  textarea {
  width: 100%;
  min-height: 140px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--gptv-shop-border);
  border-radius: 13px;
  background: var(--gptv-shop-field);
  color: var(--gptv-shop-text);
  box-shadow: none;
  resize: vertical;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor
  textarea:focus {
  border-color: var(--gptv-shop-accent-hover);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(152, 145, 240, 0.15);
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--gptv-shop-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--gptv-shop-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__cancel:hover {
  border-color: var(--gptv-shop-border-hover);
  color: var(--gptv-shop-text);
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__message {
  min-height: 20px;
  color: var(--gptv-shop-muted);
  font-size: 13px;
  font-weight: 700;
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__message.is-error {
  color: var(--gptv-shop-danger);
}

:where(.gptv-product-page, body.single-product)
  .gptv-product-review-editor__message.is-success {
  color: var(--gptv-shop-success);
}

@media (max-width: 620px) {
  :where(.gptv-product-page, body.single-product)
    .gptv-product-review-editor__summary,
  :where(.gptv-product-page, body.single-product)
    .gptv-product-review-editor__actions {
    align-items: stretch;
    flex-direction: column;
  }

  :where(.gptv-product-page, body.single-product)
    .gptv-product-review-editor__edit,
  :where(.gptv-product-page, body.single-product)
    .gptv-product-review-editor__save,
  :where(.gptv-product-page, body.single-product)
    .gptv-product-review-editor__cancel {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.gptv-product-page, body.single-product)
    .gptv-product-review-editor__rating
    label {
    transition: none !important;
  }
}
