/* Sähköpostipalvelun hinnat, tilauksen kulku ja tilauslomake (partials/sahkoposti-tilaus.php).
   Värit ja fontti tulevat sahkoposti-office.css:n tokeneista. */

.mo-prices, .mo-order { --mo-ok: #1a9d5b; --mo-error: #b42318; }
.mo-prices { padding-top: 70px; }
.mo-order { scroll-margin-top: 96px; }
.mo-order [hidden], .mo-prices [hidden] { display: none !important; }

/* ── Hintakortit ── */
.mo-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 8px; align-items: stretch; }
.mo-plan {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1.5px solid var(--border); border-radius: 24px; padding: 32px 28px 28px;
  box-shadow: var(--sh-md);
}
.mo-plan.is-featured { border-color: var(--navy); box-shadow: var(--sh-lg); }
.mo-plan-badge {
  position: absolute; top: -13px; left: 28px; padding: 5px 14px; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em;
}
.mo-plan-provider {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em;
}
.mo-plan-provider.ms { background: rgba(0, 120, 212, .08); color: var(--ms-blue); }
.mo-plan-provider.gws { background: rgba(66, 133, 244, .08); color: var(--g-blue); }
.mo-plan h3 { font-size: 24px; font-weight: 900; letter-spacing: -.02em; margin: 14px 0 4px; }
.mo-plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mo-plan-price strong { font-size: 40px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; color: var(--navy-dark); }
.mo-plan-price span { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.mo-plan-year { font-size: 14px; color: var(--text-muted); margin: 2px 0 20px; }
.mo-plan-list { list-style: none; display: grid; gap: 10px; margin-bottom: 26px; }
.mo-plan-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.mo-plan-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--mo-ok); }
.mo-plan-pick {
  margin-top: auto; padding: 14px 20px; border-radius: 999px; border: 2px solid var(--navy);
  background: #fff; color: var(--navy-dark); font-size: 15px; font-weight: 800;
  transition: background .15s, color .15s;
}
.mo-plan-pick:hover, .mo-plan.is-featured .mo-plan-pick { background: var(--navy); color: #fff; }
.mo-plan.is-featured .mo-plan-pick:hover { background: var(--navy-dark); }
.mo-plan-pick:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.mo-fee {
  display: flex; align-items: center; gap: 28px; margin-top: 32px;
  background: var(--navy-50); border: 1.5px solid #d5daed; border-radius: 20px; padding: 24px 28px;
}
.mo-fee-amount { display: flex; flex-direction: column; flex-shrink: 0; }
.mo-fee-amount strong { font-size: 28px; font-weight: 900; letter-spacing: -.02em; color: var(--navy-dark); }
.mo-fee-amount span { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.mo-fee-text strong { display: block; font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.mo-fee-text p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.mo-example { margin-top: 20px; text-align: center; font-size: 15px; color: var(--text-muted); }
.mo-example strong { color: var(--text); }

/* ── Tilauksen kulku ── */
.mo-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: none; }
.mo-steps li { background: #fff; border: 1.5px solid var(--border); border-radius: 20px; padding: 28px 26px; }
.mo-step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 18px; font-weight: 900; margin-bottom: 16px;
}
.mo-steps h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.mo-steps p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* ── Lomake ── */
.mo-card {
  max-width: 820px; margin: 0 auto;
  background: #fff; border: 1.5px solid var(--border); border-radius: 24px; box-shadow: var(--sh-md); padding: 40px;
}
.mo-head { margin-bottom: 28px; }
.mo-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); margin-bottom: 8px; }
.mo-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 10px; }
.mo-lead { font-size: 16px; color: var(--text-muted); line-height: 1.6; }

.mo-group { border: none; min-width: 0; margin: 0 0 32px; padding: 0; }
.mo-group legend { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; padding: 0; }
.mo-legend-num {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 800;
}
.mo-optional { font-weight: 400; color: var(--text-muted); }

.mo-radio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mo-radio-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mo-radio { display: block; cursor: pointer; }
.mo-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mo-radio-body {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 14px; background: #fff;
  transition: border-color .15s, background .15s;
}
.mo-radio:hover .mo-radio-body { border-color: #d5daed; }
.mo-radio input:checked + .mo-radio-body { border-color: var(--navy); background: var(--navy-50); box-shadow: 0 0 0 1px var(--navy); }
.mo-radio input:focus-visible + .mo-radio-body { outline: 3px solid var(--pink); outline-offset: 2px; }
.mo-radio-provider { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.mo-radio-name { font-size: 16px; font-weight: 800; color: var(--text); }
.mo-radio-price { font-size: 14px; color: var(--text-muted); }

.mo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.mo-full { grid-column: 1 / -1; }
.mo-field label { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.mo-field input[type="text"], .mo-field input[type="email"], .mo-field input[type="tel"], .mo-field textarea, .mo-input {
  width: 100%; min-width: 0; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: var(--text);
  font: 500 16px/1.4 var(--font);
  transition: border-color .15s, box-shadow .15s;
}
.mo-field textarea { resize: vertical; min-height: 88px; }
.mo-field input:focus, .mo-field textarea:focus, .mo-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(45, 58, 125, .12); }
.mo-field input:user-invalid, .mo-input:user-invalid { border-color: var(--red); }
.mo-field.has-error input, .mo-input.has-error { border-color: var(--red); }
.mo-hint { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-top: 6px; }
.mo-hint--top { margin: -6px 0 14px; }
.mo-hint a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.mo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mo-group > .mo-field + .mo-hint { margin-top: 6px; }

/* Postilaatikkorivit */
.mo-mailbox-head, .mo-mailbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 40px; gap: 12px; }
.mo-mailbox-head { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; padding: 0 2px; }
.mo-mailboxes { display: grid; gap: 10px; }
.mo-mailbox { align-items: center; }
.mo-address { display: flex; align-items: center; min-width: 0; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.mo-address:focus-within { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(45, 58, 125, .12); }
.mo-address .mo-input { border: none; box-shadow: none; border-radius: 12px 0 0 12px; flex: 1 1 40%; min-width: 0; }
.mo-address .mo-input:focus { box-shadow: none; }
.mo-address.has-error { border-color: var(--red); }
.mo-address-domain { flex: 0 1 auto; max-width: 60%; padding-right: 14px; font-size: 15px; font-weight: 600; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-remove {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--text-muted); transition: background .15s, color .15s;
}
.mo-remove:hover { background: var(--pink-50); color: var(--pink); }
.mo-remove:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.mo-remove svg { width: 18px; height: 18px; }
.mo-mailbox-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.mo-add {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  border: 1.5px dashed #b7bfdc; color: var(--navy-dark); font-size: 15px; font-weight: 700;
  transition: border-color .15s, background .15s;
}
.mo-add:hover:not(:disabled) { border-color: var(--navy); background: var(--navy-50); }
.mo-add:disabled { opacity: .5; cursor: not-allowed; }
.mo-add:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.mo-add svg { width: 16px; height: 16px; }
.mo-count { font-size: 15px; font-weight: 800; color: var(--navy-dark); }

/* Valintaruudut */
.mo-box {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #c7ccd9; background: #fff; color: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.mo-box svg { width: 14px; height: 14px; }
.mo-interest input, .mo-consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
input:checked + .mo-box { background: var(--navy); border-color: var(--navy); color: #fff; }
input:focus-visible + .mo-box { outline: 3px solid var(--pink); outline-offset: 2px; }
.mo-interests legend { margin-bottom: 12px; }
.mo-interest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mo-interest {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: #fff;
  transition: border-color .15s, background .15s;
}
.mo-interest:hover { border-color: #d5daed; }
.mo-interest:has(input:checked) { border-color: var(--navy); background: var(--navy-50); }
.mo-interest .mo-box { margin-top: 1px; }
.mo-interest-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mo-interest-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.mo-interest-price { font-size: 13px; color: var(--text-muted); }
.mo-more {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0;
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--navy-100); background: var(--navy-50);
  color: var(--navy); font: 700 14px var(--font); cursor: pointer; transition: background .15s;
}
.mo-more:hover { background: var(--navy-100); }
.mo-more:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.mo-more svg { width: 16px; height: 16px; transition: transform .2s; }
.mo-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.mo-interests #mo-more-grid { margin-bottom: 8px; }

/* Yhteenveto */
.mo-summary { background: var(--navy-50); border: 1.5px solid #d5daed; border-radius: 18px; padding: 22px 24px; margin: 28px 0 20px; }
.mo-summary h3 { font-size: 17px; font-weight: 800; margin-bottom: 12px; color: var(--navy-dark); }
.mo-summary dl { display: grid; gap: 8px; }
.mo-summary dl > div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.mo-summary dt { color: var(--text-muted); font-weight: 600; }
.mo-summary dd { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.mo-summary .mo-sum-total { margin-top: 6px; padding-top: 12px; border-top: 1.5px solid #d5daed; font-size: 18px; }
.mo-summary .mo-sum-total dt { color: var(--navy-dark); font-weight: 800; }
.mo-summary .mo-sum-total dd { font-size: 24px; font-weight: 900; letter-spacing: -.02em; color: var(--navy-dark); }
.mo-sum-note { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-top: 12px; }

.mo-consent { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 15px; line-height: 1.5; margin-bottom: 22px; }
.mo-consent .mo-box { margin-top: 1px; }
.mo-consent a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mo-actions { display: flex; }
.mo-actions .btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }
.mo-status { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.mo-status:empty { display: none; }
.mo-status.is-error { color: var(--mo-error); font-weight: 600; }
.mo-status a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

.mo-done { text-align: center; padding: 28px 8px; outline: none; }
.mo-done svg { width: 52px; height: 52px; margin: 0 auto 14px; color: var(--mo-ok); }
.mo-done h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.mo-done p { font-size: 16px; color: var(--text-muted); line-height: 1.65; max-width: 520px; margin: 0 auto 8px; overflow-wrap: anywhere; }

/* Kiinteä tilausnappi: alle 1024 px, sivuston yhteydenottopalkin (.mcta) yläpuolella */
.mo-sticky { display: none; }

@media (max-width: 900px) {
  .mo-plan-grid, .mo-steps { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .mo-radio-grid { grid-template-columns: 1fr; }
  .mo-fee { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 700px) {
  .mo-prices { padding-top: 56px; }
  .mo-card { padding: 28px 20px; border-radius: 20px; }
  .mo-grid, .mo-interest-grid, .mo-radio-grid--two { grid-template-columns: 1fr; }
  .mo-mailbox-head { display: none; }
  .mo-mailbox { grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; padding: 12px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); }
  .mo-mailbox > .mo-input, .mo-mailbox > .mo-address { grid-column: 1; }
  .mo-mailbox > .mo-remove { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .mo-actions .btn-primary { width: 100%; justify-content: center; }
}
@media (max-width: 1023px) {
  .mo-sticky {
    position: fixed; left: 16px; right: 16px; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); z-index: 130;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    max-width: 520px; margin: 0 auto;
    padding: 15px 22px; border-radius: 999px; background: var(--grad); color: #fff;
    font-size: 15px; font-weight: 800; box-shadow: 0 12px 28px -8px rgba(230, 70, 68, .6);
  }
  .mo-sticky[hidden] { display: none; }
  .mo-sticky:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
}

/* ── Vertailukortit: alustojen logot, hinta ja tilauspainikkeet ── */
.mo-plan-provider svg { width: 14px; height: 14px; }
.platform-logo-icon svg { width: 28px; height: 28px; }
.platform-card { display: flex; flex-direction: column; }
.platform-card .platform-tag { align-self: flex-start; }
.platform-order { margin-top: auto; padding-top: 28px; }
.platform-card .platform-price { margin: 0 0 14px; padding-top: 20px; border-top: 1.5px solid var(--border); font-size: 15px; color: var(--text-muted); line-height: 1.4; }
.platform-price strong { font-size: 28px; font-weight: 900; letter-spacing: -.02em; color: var(--navy-dark); }
.platform-order-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.platform-order .mo-plan-pick { margin-top: 0; flex: 1 1 180px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.platform-order .mo-plan-pick small { font-size: 12px; font-weight: 600; opacity: .8; }
.platform-order .mo-plan-pick.is-primary { background: var(--navy); color: #fff; }
.platform-order .mo-plan-pick.is-primary:hover { background: var(--navy-dark); }
