/* ==========================================================================
   Content we did not lay out ourselves, in the site's type and colours:
   pages made in the editor and EDD's pages (wd-shell.php), EDD's and
   Software Licensing's parts on My Account (account.php), the 404 page,
   search results and archives. Loaded on those pages only (inc/wingdevs.php).
   ========================================================================== */

/* Generic page hero: long titles stay readable. */
.wd .wd-shell-hero { padding-bottom: 8px; }
.wd .wd-shell-hero h1 { max-width: 20ch; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }

/* Prose ------------------------------------------------------------------- */

.wd .wd-content { max-width: 860px; margin: 0 auto; font-size: 1rem; line-height: 1.7; color: var(--wd-ink-2); }
.wd .wd-content > :first-child { margin-top: 0; }
.wd .wd-content h1 { font-size: 2.2rem; margin: 40px 0 14px; }
.wd .wd-content h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.wd .wd-content h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.wd .wd-content h4 { font-size: 1rem; margin: 20px 0 6px; }
.wd .wd-content p { margin: 0 0 14px; }
.wd .wd-content ul, .wd .wd-content ol { margin: 0 0 16px; padding-left: 22px; }
.wd .wd-content ul { list-style: disc; }
.wd .wd-content ol { list-style: decimal; }
.wd .wd-content li { margin: 4px 0; }
.wd .wd-content a:not(.button):not(.edd-submit):not(.wp-block-button__link) { color: var(--wd-primary); font-weight: 600; }
.wd .wd-content a:not(.button):not(.edd-submit):hover { text-decoration: underline; text-underline-offset: 3px; }
.wd .wd-content img { height: auto; border-radius: var(--wd-r-sm); }
.wd .wd-content blockquote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 3px solid var(--wd-primary); color: var(--wd-ink); }
.wd .wd-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--wd-bg-2); }
.wd .wd-content hr { border: 0; border-top: 1px solid var(--wd-line); margin: 32px 0; }
.wd .wd-content .wp-block-button__link { display: inline-flex; padding: 12px 20px; border-radius: 12px; background: var(--wd-primary); color: #fff; font-weight: 600; }

/* Tables (editor tables, EDD and Software Licensing) */
.wd .wd-content table, .wd .wd-account__panel table, .wd .edd-table {
  width: 100%; margin: 0 0 20px; border-collapse: separate; border-spacing: 0; font-size: .92rem;
  background: #fff; border: 1px solid var(--wd-line); border-radius: var(--wd-r-md); overflow: hidden;
}
.wd .wd-content th, .wd .wd-content td, .wd .wd-account__panel th, .wd .wd-account__panel td, .wd .edd-table th, .wd .edd-table td {
  text-align: left; vertical-align: top; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--wd-line); color: var(--wd-ink-2);
}
.wd .wd-content th, .wd .wd-account__panel th, .wd .edd-table th {
  background: var(--wd-bg-2); color: var(--wd-ink-3); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.wd .wd-content tr:last-child td, .wd .wd-account__panel tr:last-child td, .wd .edd-table tr:last-child td { border-bottom: 0; }

/* Forms (EDD's own forms: log-in, profile, checkout) ----------------------- */

.wd .wd-content fieldset, .wd .wd-account fieldset { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.wd .wd-content legend, .wd .wd-account legend { display: block; width: 100%; margin: 0 0 12px; padding: 0; font: 700 1.1rem/1.3 var(--wd-font-display); color: var(--wd-ink); }
.wd .wd-content label, .wd .wd-account label { display: block; margin: 0 0 6px; font-size: .88rem; font-weight: 600; color: var(--wd-ink); }
.wd .wd-content form p, .wd .wd-account form p, .wd .edd-blocks-form__group { margin: 0 0 14px; }
.wd .wd-content input[type="text"], .wd .wd-content input[type="email"], .wd .wd-content input[type="password"], .wd .wd-content input[type="tel"], .wd .wd-content input[type="number"], .wd .wd-content input[type="url"], .wd .wd-content select, .wd .wd-content textarea,
.wd .wd-account input[type="text"], .wd .wd-account input[type="email"], .wd .wd-account input[type="password"], .wd .wd-account select {
  width: 100%; max-width: 100%; margin: 0; padding: 12px 14px; border: 1px solid var(--wd-line-2); border-radius: 12px; background: #fff; box-shadow: none;
  font: 400 .95rem/1.4 var(--wd-font-body); color: var(--wd-ink);
}
.wd .wd-content input:focus, .wd .wd-content select:focus, .wd .wd-content textarea:focus, .wd .wd-account input:focus, .wd .wd-account select:focus {
  outline: none; border-color: var(--wd-primary); box-shadow: 0 0 0 3px var(--wd-primary-soft);
}
.wd .wd-content input[type="checkbox"], .wd .wd-account input[type="checkbox"], .wd .wd-content input[type="radio"] { width: auto; margin: 0 8px 0 0; accent-color: var(--wd-primary); }
.wd .wd-content label:has(> input[type="checkbox"]), .wd .wd-account label:has(> input[type="checkbox"]) { display: flex; align-items: center; font-weight: 500; color: var(--wd-ink-2); }

/* Buttons: EDD marks its buttons .edd-submit / .button */
.wd .wd-content .edd-submit, .wd .wd-content input[type="submit"], .wd .wd-content button[type="submit"], .wd .wd-content a.button,
.wd .wd-account .edd-submit, .wd .wd-account input[type="submit"], .wd .wd-account a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; margin: 4px 0 0; padding: 12px 20px;
  border: 1px solid var(--wd-primary); border-radius: 12px; background: var(--wd-primary); color: #fff;
  font: 600 .95rem/1.2 var(--wd-font-body); text-decoration: none; cursor: pointer; box-shadow: none; transition: background .15s, border-color .15s;
}
.wd .wd-content .edd-submit:hover, .wd .wd-content input[type="submit"]:hover, .wd .wd-content a.button:hover,
.wd .wd-account .edd-submit:hover, .wd .wd-account input[type="submit"]:hover, .wd .wd-account a.button:hover { background: var(--wd-primary-2); border-color: var(--wd-primary-2); color: #fff; text-decoration: none; }
.wd .wd-account a.button.gray, .wd .wd-content a.button.gray, .wd .wd-account .edd-manage-license-back {
  background: #fff; border-color: var(--wd-line-2); color: var(--wd-ink);
}
.wd .wd-account a.button.gray:hover, .wd .wd-account .edd-manage-license-back:hover { background: var(--wd-bg-2); border-color: var(--wd-line-2); color: var(--wd-ink); }

/* EDD notices */
.wd .edd_errors, .wd .edd-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; font-size: .92rem; line-height: 1.5; }
.wd .edd_errors, .wd .edd-alert-error { background: #fff0f1; border: 1px solid #ffc9cf; color: #9f1d2c; }
.wd .edd-alert-success, .wd .edd_success { background: var(--wd-green-soft); border: 1px solid #bfe8cd; color: #0f6b3a; }
.wd .edd-alert-info, .wd .edd-alert-warn { background: var(--wd-amber-soft); border: 1px solid #f8dc9a; color: #7a4d00; }
.wd .edd_errors p, .wd .edd-alert p { margin: 0; }

/* My Account ---------------------------------------------------------------- */

.wd .wd-account { max-width: 1160px; }
.wd .wd-account.wd-container--narrow { max-width: 560px; }

/* WooCommerce-style: the menu is a column of rows on the left, the tab on the right. */
.wd .wd-account__layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.wd .wd-account__tabs {
  position: sticky; top: 100px; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--wd-line); border-radius: var(--wd-r-lg); background: #fff;
}
.wd .wd-account__tabs a {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--wd-line);
  font-weight: 600; font-size: .95rem; color: var(--wd-ink-2); transition: background .15s, color .15s;
}
.wd .wd-account__tabs a:last-child { border-bottom: 0; }
.wd .wd-account__tabs a svg { flex: none; width: 18px; height: 18px; color: var(--wd-ink-3); }
.wd .wd-account__tabs a:hover { background: var(--wd-bg-2); color: var(--wd-ink); }
.wd .wd-account__tabs a.is-active { background: var(--wd-primary-soft); color: var(--wd-primary-ink); box-shadow: inset 3px 0 0 var(--wd-primary); }
.wd .wd-account__tabs a.is-active svg { color: var(--wd-primary); }
.wd .wd-account__tabs .wd-account__logout { color: var(--wd-ink-3); }
.admin-bar .wd .wd-account__tabs { top: 132px; }

.wd .wd-account__panel { color: var(--wd-ink-2); line-height: 1.6; }
.wd .wd-account__panel a:not(.wd-btn):not(.button):not(.edd-submit) { color: var(--wd-primary); font-weight: 600; }
.wd .wd-account__panel a:not(.wd-btn):not(.button):not(.edd-submit):hover { text-decoration: underline; text-underline-offset: 3px; }

/* Orders: EDD's Order History block */
.wd .edd-blocks__orders .edd-blocks__columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.wd .edd-blocks-orders__order { margin: 0; padding: 20px 22px; border: 1px solid var(--wd-line); border-radius: var(--wd-r-lg); background: #fff; box-shadow: var(--wd-shadow-sm); }
.wd .edd-blocks-orders__order-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--wd-line); }
.wd .edd-blocks-orders__order-id { font: 700 1.05rem/1.3 var(--wd-font-display); color: var(--wd-ink); }
.wd .edd-blocks-orders__order-status { padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--wd-bg-3); color: var(--wd-ink-2); }
.wd .edd-blocks-orders__order-status.complete { background: var(--wd-green-soft); color: #0f6b3a; }
.wd .edd-blocks-orders__order-data { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 14px; font-size: .92rem; }
.wd .edd-blocks-orders__order-amount { font-weight: 700; color: var(--wd-ink); }
.wd .edd-blocks-orders__order-details { display: grid; gap: 8px; font-size: .92rem; }
.wd .edd-blocks-orders__order-details > * { margin: 0; padding: 0; }
.wd .edd-blocks-orders__order-data { margin-top: 0; }
.wd .wd-order-appsumo { justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--wd-primary-soft); color: var(--wd-primary-ink); font-size: .8rem; font-weight: 700; }
.wd .wd-billing-link { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--wd-line); border-radius: var(--wd-r-md); background: var(--wd-bg-2); font-size: .9rem; color: var(--wd-ink-3); }
.wd .wd-billing-link .edd-submit { margin: 0; }

/* Licences: Software Licensing's tables */
.wd .edd_sl_item_name { font-weight: 700; color: var(--wd-ink); margin: 0 0 8px; }
.wd .edd_sl_license_price_option { font-weight: 500; color: var(--wd-ink-3); }
.wd .wd-account input.edd_sl_license_key { width: 100%; max-width: 340px; padding: 8px 10px; font: 500 .85rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--wd-bg-2); }
.wd .edd_sl_license_status { font-weight: 700; }
.wd .edd_sl_license_status.edd-sl-active { color: #0f6b3a; }
.wd .edd_sl_status_label, .wd .edd_sl_expires_label, .wd .edd_sl_limit_label { color: var(--wd-ink-3); }
.wd .edd_sl_purchase_number { display: inline-block; margin-top: 6px; font-size: .85rem; }
.wd .view-key-wrapper img { display: inline-block; width: 18px; height: auto; }
.wd .edd-manage-license-back { margin: 0 0 16px; }
.wd .wd-account__panel--orders > p:first-child { margin: 0 0 16px; }
.wd .edd_sl_table .edd_sl_no_upgrades { color: var(--wd-ink-3); }
.wd .edd-sl-manage-license-form, .wd #edd_sl_license_add_site_form { margin: 20px 0 0; padding: 20px; border: 1px solid var(--wd-line); border-radius: var(--wd-r-md); background: var(--wd-bg-2); }

/* Profile */
.wd .wd-account__profile { max-width: 640px; padding: 26px 28px; border: 1px solid var(--wd-line); border-radius: var(--wd-r-lg); background: #fff; }
.wd .wd-account__profile #edd_profile_address_fieldset { display: none; }
.wd .wd-account__profile fieldset + fieldset { padding-top: 22px; border-top: 1px solid var(--wd-line); }

/* Log-in card (EDD's Login block) */
.wd .wd-account__login { padding: 28px; }
.wd .wd-account__login .edd-blocks-form { display: block; border: 0; padding: 0; }
.wd .wd-account__login .edd-blocks-form__group-submit .edd-submit { width: 100%; }
.wd .wd-account__login .edd-blocks-form__group-lost-password { margin: 14px 0 0; text-align: center; font-size: .9rem; }
.wd .wd-account__login .edd-blocks-form__group-lost-password a { color: var(--wd-primary); font-weight: 600; }
.wd .wd-account__aside p { margin: 0 0 8px; }

/* 404, search and archives --------------------------------------------------- */

.wd .wd-shell__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 960px; margin: 0 auto; }
.wd .wd-shell__links .wd-card, .wd .wd-shell__list .wd-card { display: grid; gap: 4px; padding: 20px 22px; }
.wd .wd-shell__links strong, .wd .wd-shell__list strong { font: 700 1.05rem/1.3 var(--wd-font-display); color: var(--wd-ink); }
.wd .wd-shell__links span, .wd .wd-shell__list span { font-size: .92rem; color: var(--wd-ink-3); }
.wd .wd-shell__list { display: grid; gap: 14px; max-width: 860px; margin: 0 auto; }
.wd .wd-shell__pager { max-width: 860px; margin: 28px auto 0; }
.wd .wd-shell__pager .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.wd .wd-shell__pager .page-numbers { padding: 8px 14px; border: 1px solid var(--wd-line); border-radius: 10px; font-weight: 600; color: var(--wd-ink-2); }
.wd .wd-shell__pager .page-numbers.current { background: var(--wd-primary); border-color: var(--wd-primary); color: #fff; }
.wd .wd-shell__pager .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 760px) {
  .wd .wd-shell__links { grid-template-columns: 1fr; }
  .wd .wd-account__layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .wd .wd-account__tabs { position: static; }
  .wd .wd-account__tabs a { padding: 13px 16px; }
  .wd .wd-account__profile, .wd .wd-account__login { padding: 20px 18px; }
  /* Software Licensing's wide tables scroll inside the page instead of widening it. */
  .wd .wd-account__panel table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* EDD's Login block puts a tick box and its label side by side in one control. */
.wd .wd-account .edd-blocks-form__control:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
.wd .wd-account .edd-blocks-form__control:has(> input[type="checkbox"]) label { margin: 0; font-weight: 500; color: var(--wd-ink-2); }
