/* Match the Mail APIs Affiliate / Offer field order and spacing in Core Production. */
.production-workspace-grid-v47 section[data-production-section="2"]:has(.production-offer-main-v350) {
  container-type: inline-size;
}

.production-workspace-grid-v47 section[data-production-section="2"]:has(.production-offer-main-v350) > div:first-child {
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px !important;
}

.production-workspace-grid-v47 section[data-production-section="2"]:has(.production-offer-main-v350) > div:last-child {
  padding: 14px !important;
}

.production-affiliate-actions-v350 {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.production-affiliate-actions-v350 .production-generate-button-v116 {
  min-height: 30px;
  width: auto;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 11px;
}

.production-workspace-grid-v47 section[data-production-section="2"] > div:last-child > div.production-offer-main-v350 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px 12px;
  align-items: start;
}

.production-workspace-grid-v47 section[data-production-section="2"] > div:last-child > div.production-offer-copy-v350 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px;
  margin-top: 12px;
}

.production-offer-copy-pair-v350 {
  display: grid;
  grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.production-offer-main-v350 label,
.production-offer-copy-v350 label,
.production-offer-advanced-v350 label {
  min-width: 0;
  margin: 0;
}

.production-offer-main-v350 label > span:first-child,
.production-offer-copy-v350 label > span:first-child,
.production-offer-advanced-v350 label > span:first-child {
  font-size: 10px;
  letter-spacing: .04em;
  line-height: 1.4;
}

.production-offer-main-v350 label > .input,
.production-offer-main-v350 label > div > .input,
.production-offer-copy-v350 label > .input,
.production-offer-advanced-v350 label > .input,
.production-offer-advanced-v350 label > div > .input {
  height: 35px;
  min-height: 35px;
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 8px;
  margin-top: 5px;
}

.production-offer-main-v350 .production-offer-popover-v256 {
  position: static;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  border-radius: 12px;
  padding: 8px;
}

.production-offer-main-v350 .production-offer-results-v256 {
  max-height: 192px;
  margin-top: 8px;
}

.production-offer-advanced-v350 {
  display: block;
  border-top: 1px solid #e5eaf0;
  margin-top: 12px;
  padding-top: 9px;
}

.production-offer-advanced-v350 summary {
  color: #64748b;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.production-offer-advanced-v350 summary span {
  font-weight: 400;
  margin-left: 8px;
}

.production-offer-advanced-v350 > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.dark .production-offer-advanced-v350 { border-color: rgba(255,255,255,.12); }
.dark .production-offer-advanced-v350 summary { color: #cbd5e1; }
.dark .production-offer-main-v350 .production-offer-popover-v256 { background: #111114; }

@container (max-width: 760px) {
  .production-workspace-grid-v47 section[data-production-section="2"] > div:last-child > div.production-offer-main-v350,
  .production-workspace-grid-v47 section[data-production-section="2"] > div:last-child > div.production-offer-copy-v350,
  .production-offer-advanced-v350 > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .production-offer-copy-pair-v350 { grid-template-columns: 1fr; }
}

@container (max-width: 420px) {
  .production-workspace-grid-v47 section[data-production-section="2"] > div:last-child > div.production-offer-main-v350,
  .production-workspace-grid-v47 section[data-production-section="2"] > div:last-child > div.production-offer-copy-v350,
  .production-offer-advanced-v350 > div {
    grid-template-columns: 1fr !important;
  }
}
