.ecpo-form {
  --ecpo-accent: #e07b42;
  --ecpo-accent-strong: #c85f28;
  --ecpo-text: #0f172a;
  --ecpo-muted: #667085;
  --ecpo-line: rgba(15, 23, 42, 0.1);
  --ecpo-soft: #f8fafc;
  margin: 16px 0 18px;
  padding: clamp(16px, 2.6vw, 22px);
  border: 1px solid var(--ecpo-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(224, 123, 66, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.07);
}

.ecpo-form,
.ecpo-form * {
  box-sizing: border-box;
}

.ecpo-form__header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.ecpo-form__mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(224, 123, 66, 0.2);
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  background: rgba(224, 123, 66, 0.1);
  color: var(--ecpo-accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.ecpo-form__title {
  margin: 0 0 4px;
  color: var(--ecpo-text);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.ecpo-form__description,
.ecpo-form__hint {
  margin: 0;
  color: var(--ecpo-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ecpo-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ecpo-field {
  min-width: 0;
}

.ecpo-field--wide,
.ecpo-field--file {
  grid-column: 1 / -1;
}

.ecpo-field__label {
  display: block;
  margin: 0 0 7px;
  color: var(--ecpo-text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.ecpo-input,
.ecpo-textarea {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ecpo-text);
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ecpo-textarea {
  min-height: 104px;
  resize: vertical;
}

.ecpo-input:focus,
.ecpo-textarea:focus {
  border-color: rgba(224, 123, 66, 0.45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(224, 123, 66, 0.12);
}

.ecpo-file {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border: 1px dashed rgba(224, 123, 66, 0.42);
  border-radius: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ecpo-file:hover,
.ecpo-file:focus-within {
  border-color: rgba(224, 123, 66, 0.75);
  background: #fff;
  box-shadow: 0 10px 28px rgba(224, 123, 66, 0.12);
}

.ecpo-file__icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  background: var(--ecpo-accent);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.ecpo-file__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ecpo-file__body strong {
  color: var(--ecpo-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.ecpo-file__body small {
  color: var(--ecpo-muted);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ecpo-file__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.ecpo-form__hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(224, 123, 66, 0.08);
  color: var(--ecpo-accent-strong);
  font-weight: 800;
}

.woocommerce-cart .ecpo-form,
.woocommerce-checkout .ecpo-form {
  display: none;
}

.woocommerce-cart .variation a,
.woocommerce-checkout-review-order .variation a,
.woocommerce-order-details .wc-item-meta a {
  color: var(--ecpo-accent, #e07b42);
  font-weight: 800;
  text-decoration: none;
}

.ecpo-download-link,
.woocommerce-cart .variation .ecpo-download-link,
.woocommerce-checkout-review-order .variation .ecpo-download-link,
.woocommerce-order-details .wc-item-meta .ecpo-download-link {
  display: inline-flex;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(224, 123, 66, 0.24);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(224, 123, 66, 0.1);
  color: #c85f28;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.ecpo-download-link:hover,
.woocommerce-cart .variation .ecpo-download-link:hover,
.woocommerce-checkout-review-order .variation .ecpo-download-link:hover,
.woocommerce-order-details .wc-item-meta .ecpo-download-link:hover {
  border-color: rgba(224, 123, 66, 0.42);
  background: rgba(224, 123, 66, 0.16);
  color: #a94f22;
}

@media (max-width: 849px) {
  .ecpo-form {
    margin: 14px 0 16px;
    padding: 14px;
    border-radius: 16px;
  }

  .ecpo-form__header {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }

  .ecpo-form__mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .ecpo-form__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ecpo-input,
  .ecpo-textarea,
  .ecpo-file {
    border-radius: 14px;
  }
}
