/* TranslateShakespeare.com — Translator workspace v3.0.1
   Narrow mission: input, output, direction switch, essential controls only.
   Scoped entirely to .wpst; no interference with Kadence / homepage H1. */
.wpst {
  --wpst-ink: #1E2433;
  --wpst-burgundy: #7A3E4D;
  --wpst-plum: #5A365E;
  --wpst-gold: #C8A96B;
  --wpst-gold-dark: #937440;
  --wpst-cream: #F7F3EC;
  --wpst-paper: #EFE7DA;
  --wpst-slate: #667085;
  --wpst-border: #E2D7C7;
  --wpst-plain: #FFFEFC;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  margin: 8px auto 22px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--wpst-border);
  border-radius: 18px;
  background: var(--wpst-plain);
  color: var(--wpst-ink);
  box-shadow: 0 14px 43px rgba(30, 36, 51, .075), 0 2px 8px rgba(30, 36, 51, .025);
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}
.wpst, .wpst *, .wpst *::before, .wpst *::after { box-sizing: border-box; }
.wpst :is(button, select, textarea) { font-family: inherit; }
.wpst button { cursor: pointer; }
.wpst button:disabled { cursor: not-allowed; opacity: .5; }
.wpst :is(button, select, textarea):focus-visible {
  outline: 2px solid var(--wpst-burgundy) !important;
  outline-offset: 3px;
}
.wpst .wpst-workspace { width: 100%; min-width: 0; margin: 0; padding: 0; }

/* Direction band: a true three-column grid; switch never overlaps the labels. */
.wpst .wpst-directions {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 5px;
  min-height: 85px;
  margin: 0;
  padding: 13px 22px;
  border: 0;
  border-bottom: 1px solid var(--wpst-border);
  background:
    radial-gradient(circle at 50% 0%, rgba(200,169,107,.13), transparent 38%),
    linear-gradient(112deg, #FBF8F2, #F5EFE8 51%, #FBF8F2);
}
.wpst .wpst-directions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--wpst-gold) 29%, var(--wpst-burgundy) 51%, var(--wpst-gold) 72%, transparent);
  opacity: .85;
  pointer-events: none;
}
.wpst .wpst-direction-name {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--wpst-ink);
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.023em;
  text-align: center;
  overflow-wrap: break-word;
}
.wpst .wpst-direction-name--to { color: var(--wpst-burgundy); }

/* The swap button's dimensions, padding, display and transform are frozen on ALL states.
   No icon rotation; avoids the misaligned hover reported in v3.0.0. */
.wpst button.wpst-switch,
.wpst button.wpst-switch:hover,
.wpst button.wpst-switch:active,
.wpst button.wpst-switch:focus {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  place-self: center !important;
  flex: none !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  aspect-ratio: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid #D7C3AC !important;
  color: var(--wpst-burgundy) !important;
  background: #FFFDF9 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 2px 8px rgba(30, 36, 51, .035) !important;
  transform: none !important;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease !important;
}
.wpst button.wpst-switch:hover,
.wpst button.wpst-switch:focus-visible {
  color: #FFFDF9 !important;
  background: var(--wpst-burgundy) !important;
  border-color: var(--wpst-burgundy) !important;
  box-shadow: 0 0 0 5px rgba(122,62,77,.105) !important;
}
.wpst button.wpst-switch svg,
.wpst button.wpst-switch:hover svg,
.wpst button.wpst-switch:focus svg {
  display: block !important;
  flex: 0 0 25px !important;
  width: 25px !important;
  height: 25px !important;
  margin: 0 !important;
  padding: 0 !important;
  stroke: currentColor !important;
  transform: none !important;
  transition: none !important;
}

/* Twin writing surfaces — no decorative extra cards. */
.wpst .wpst-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  background: #fff;
}
.wpst .wpst-pane {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 25px clamp(19px, 2.35vw, 34px) 17px;
  background: #fff;
}
.wpst .wpst-pane--input { border-right: 1px solid var(--wpst-border); }
.wpst .wpst-pane--result {
  background: linear-gradient(145deg, #FAF7F2 0%, #F7F2EC 100%);
}
.wpst .wpst-pane:focus-within {
  box-shadow: inset 0 0 0 2px rgba(122,62,77,.27);
}
.wpst .wpst-pane-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  min-height: 18px;
}
.wpst .wpst-pane-heading label {
  margin: 0;
  padding: 0;
  color: #746A72;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  cursor: text;
}
.wpst .wpst-pane--result .wpst-pane-heading label { color: var(--wpst-burgundy); }
.wpst .wpst-count, .wpst .wpst-result-mark {
  color: #827A7B;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
.wpst .wpst-result-mark { color: var(--wpst-gold-dark); font-size: 18px; }
.wpst .wpst-pane textarea,
.wpst .wpst-pane textarea:hover,
.wpst .wpst-pane textarea:focus {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 220px !important;
  min-height: 175px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  resize: vertical !important;
  color: var(--wpst-ink) !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 450 !important;
  line-height: 1.75 !important;
  letter-spacing: -.012em !important;
  overflow-wrap: anywhere;
}
.wpst .wpst-pane textarea::placeholder { color: #87909D; opacity: 1; }
.wpst .wpst-pane--result textarea,
.wpst .wpst-pane--result textarea:hover,
.wpst .wpst-pane--result textarea:focus {
  color: var(--wpst-burgundy) !important;
  font-family: Fraunces, Georgia, serif !important;
  font-size: 19px !important;
  font-weight: 450 !important;
  line-height: 1.68 !important;
}
.wpst .wpst-pane--result textarea::placeholder { color: #877A8B; opacity: 1; }
.wpst .wpst-pane-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 13px 0 0;
  padding: 12px 0 0;
  min-height: 44px;
  border-top: 1px solid rgba(200,169,107,.27);
  color: #8B8590;
  font-size: 11px;
  line-height: 1.45;
}
.wpst .wpst-pane-footer > span:last-child:not(:first-child) { margin-left: auto; }
.wpst button.wpst-minor {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 31px !important;
  height: auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border: 1px solid #DDD0C0 !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  background: rgba(255,255,255,.68) !important;
  color: var(--wpst-plum) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  transition: background-color .16s, border-color .16s, color .16s !important;
}
.wpst button.wpst-minor:hover:not(:disabled) {
  background: #F0E5DB !important;
  border-color: var(--wpst-gold) !important;
  color: var(--wpst-burgundy) !important;
}
.wpst button.wpst-minor--copy { margin-left: auto !important; }
.wpst button.wpst-minor svg { display: block; width: 15px; height: 15px; }

/* Preference selects now live directly beneath the editors. Desktop each is
   precisely aligned with its corresponding half of the input/output workspace. */
.wpst .wpst-settings {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--wpst-border);
  background: #FCFAF6;
}
.wpst[data-direction="reverse"] .wpst-settings { display: none !important; }
.wpst .wpst-select-label {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  min-width: 0;
  gap: 8px;
  margin: 0;
  padding: 17px clamp(19px,2.35vw,34px) 18px;
  color: #685569;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: .04em;
}
.wpst .wpst-select-label:first-child { border-right: 1px solid var(--wpst-border); }
.wpst .wpst-select-label::after {
  content: "";
  position: absolute;
  right: clamp(34px, 4vw, 50px);
  bottom: 37px;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid var(--wpst-burgundy);
  border-bottom: 1.8px solid var(--wpst-burgundy);
  transform: rotate(45deg);
  pointer-events: none;
}
.wpst .wpst-select-label select,
.wpst .wpst-select-label select:hover,
.wpst .wpst-select-label select:focus {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 49px !important;
  min-height: 49px !important;
  margin: 0 !important;
  padding: 0 39px 0 15px !important;
  border: 1px solid #DFD2C2 !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  color: var(--wpst-ink) !important;
  box-shadow: 0 2px 6px rgba(30,36,51,.018) !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
  letter-spacing: -.015em !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s !important;
}
.wpst .wpst-select-label select:hover { border-color: var(--wpst-gold) !important; }
.wpst .wpst-select-label select:focus-visible {
  border-color: var(--wpst-burgundy) !important;
  box-shadow: 0 0 0 3px rgba(122,62,77,.10) !important;
}

/* One clear action row. */
.wpst .wpst-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 18px clamp(19px,2.35vw,34px) 20px;
  border: 0;
  border-top: 1px solid var(--wpst-border);
  background: #FFFDF9;
}
.wpst button.wpst-primary,
.wpst button.wpst-primary:focus,
.wpst button.wpst-primary:hover {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 25px;
  width: auto !important;
  min-width: 210px !important;
  min-height: 49px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 13px 20px !important;
  border: 1px solid var(--wpst-burgundy) !important;
  border-radius: 9px !important;
  background: var(--wpst-burgundy) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 14px rgba(122,62,77,.13) !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  letter-spacing: .015em !important;
  transition: background-color .18s, box-shadow .18s, border-color .18s !important;
  transform: none !important;
}
.wpst button.wpst-primary:hover:not(:disabled) {
  background: var(--wpst-plum) !important;
  border-color: var(--wpst-plum) !important;
  box-shadow: 0 8px 18px rgba(90,54,94,.18) !important;
}
.wpst button.wpst-primary svg { display:block; width: 18px; height: 18px; flex: 0 0 18px; }
.wpst .wpst-status {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #777580;
  font-family: Manrope,system-ui,sans-serif;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.6;
  text-align: right;
}
.wpst .wpst-status[data-state="success"] { color: #286447; }
.wpst .wpst-status[data-state="error"] { color: #A42E47; }
.wpst[aria-busy="true"] button.wpst-primary { cursor: progress; }

@media (max-width: 820px) {
  .wpst .wpst-directions { grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr); gap: 3px; min-height: 76px; padding: 12px 15px; }
  .wpst button.wpst-switch, .wpst button.wpst-switch:hover, .wpst button.wpst-switch:active, .wpst button.wpst-switch:focus {
    width: 46px !important; min-width: 46px !important; max-width: 46px !important;
    height: 46px !important; min-height: 46px !important; max-height: 46px !important;
  }
  .wpst .wpst-direction-name { font-size: clamp(15px,2.1vw,19px); }
  .wpst .wpst-pane-footer > span:last-child:not(:first-child) { display: none; }
}
@media (max-width: 620px) {
  .wpst { margin: 4px auto 17px; border-radius: 13px; box-shadow: 0 8px 23px rgba(30,36,51,.055); }
  .wpst .wpst-directions { grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr); min-height: 68px; padding: 9px 10px; }
  .wpst .wpst-direction-name { font-size: clamp(13px,3.7vw,17px); line-height: 1.27; }
  .wpst button.wpst-switch, .wpst button.wpst-switch:hover, .wpst button.wpst-switch:active, .wpst button.wpst-switch:focus {
    width: 42px !important; min-width: 42px !important; max-width: 42px !important;
    height: 42px !important; min-height: 42px !important; max-height: 42px !important;
  }
  .wpst button.wpst-switch svg, .wpst button.wpst-switch:hover svg, .wpst button.wpst-switch:focus svg { width: 22px !important; height: 22px !important; flex-basis: 22px !important; }
  .wpst .wpst-columns { grid-template-columns: minmax(0,1fr); }
  .wpst .wpst-pane { padding: 19px 17px 13px; }
  .wpst .wpst-pane--input { border-right: 0; border-bottom: 1px solid var(--wpst-border); }
  .wpst .wpst-pane-heading { margin-bottom: 10px; }
  .wpst .wpst-pane-heading label { font-size: 10px; }
  .wpst .wpst-pane textarea, .wpst .wpst-pane textarea:hover, .wpst .wpst-pane textarea:focus { height: 142px !important; min-height: 120px !important; font-size: 15px !important; }
  .wpst .wpst-pane--result textarea, .wpst .wpst-pane--result textarea:hover, .wpst .wpst-pane--result textarea:focus { height: 125px !important; min-height: 110px !important; font-size: 18px !important; }
  .wpst .wpst-pane-footer { margin-top: 10px; padding-top: 10px; min-height: 36px; }
  .wpst .wpst-settings { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .wpst .wpst-select-label { padding: 14px 12px 15px; font-size: 10px; }
  .wpst .wpst-select-label::after { right: 25px; bottom: 32px; width: 7px; height: 7px; }
  .wpst .wpst-select-label select, .wpst .wpst-select-label select:hover, .wpst .wpst-select-label select:focus { height: 44px !important; min-height: 44px !important; padding: 0 23px 0 11px !important; font-size: 11px !important; }
  .wpst .wpst-controls { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px 15px 16px; }
  .wpst button.wpst-primary, .wpst button.wpst-primary:hover, .wpst button.wpst-primary:focus { width: 100% !important; min-width: 0 !important; min-height: 48px !important; }
  .wpst .wpst-status { text-align: center; font-size: 11px; }
}
@media (max-width: 390px) {
  .wpst .wpst-directions { grid-template-columns: minmax(0,1fr) 47px minmax(0,1fr); padding: 9px 7px; }
  .wpst .wpst-direction-name { font-size: 13px; }
  .wpst .wpst-select-label { padding: 13px 10px 14px; }
  .wpst .wpst-select-label select, .wpst .wpst-select-label select:hover, .wpst .wpst-select-label select:focus { font-size: 10px !important; padding-left: 8px !important; padding-right: 18px !important; }
  .wpst .wpst-select-label::after { right: 20px; }
}
/* Tiny phones: use full-width selects rather than clipped option text. */
@media (max-width: 360px) {
  .wpst .wpst-settings { grid-template-columns: minmax(0, 1fr); }
  .wpst .wpst-select-label { padding: 12px 16px 13px; font-size: 11px; }
  .wpst .wpst-select-label:first-child { border-right: 0; border-bottom: 1px solid var(--wpst-border); }
  .wpst .wpst-select-label select,
  .wpst .wpst-select-label select:hover,
  .wpst .wpst-select-label select:focus {
    font-size: 12px !important;
    padding-left: 14px !important;
    padding-right: 34px !important;
  }
  .wpst .wpst-select-label::after { right: 32px; bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .wpst *, .wpst *::before, .wpst *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
