/* EVE V12.17.3 — definitive desktop regression repair
   1) Restore full album-size labels after V12.17.1 ellipsis rule.
   2) Give Step 1 / order-type selector the full form width.
   This file intentionally loads after V12.17.2 and uses higher-specificity
   selectors only where the previous cumulative rules conflict. */

@media (min-width: 881px) {
  /* ---------- Step 1: order type must own the whole content width ---------- */
  .eve-client-order-builder [data-v3-page-body="1"].eve-v3-fields {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    gap: 16px !important;
  }

  .eve-client-order-builder [data-v3-page-body="1"] > .eve-v3-field-block {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-album_type"].eve-v3-choice-grid.is-order-types {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    gap: 14px !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-album_type"].eve-v3-choice-grid.is-order-types .eve-v3-choice {
    min-width: 0 !important;
    min-height: 118px !important;
    padding: 16px !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-album_type"].eve-v3-choice-grid.is-order-types .eve-v3-choice-copy strong,
  .eve-client-order-builder [data-v3-choice-host="cart-album_type"].eve-v3-choice-grid.is-order-types .eve-v3-choice-copy small {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* ---------- Step 2: album sizes — defeat V12.17.1 ellipsis selector ---------- */
  .eve-client-order-builder [data-v3-choice-host="cart-size_id"].eve-v3-choice-grid.is-compact .eve-v3-choice {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    place-items: center !important;
    min-width: 0 !important;
    min-height: 72px !important;
    padding: 10px 34px !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-size_id"].eve-v3-choice-grid.is-compact .eve-v3-choice-copy {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: center !important;
    overflow: visible !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-size_id"].eve-v3-choice-grid.is-compact .eve-v3-choice-copy strong {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-size_id"].eve-v3-choice-grid.is-compact .eve-v3-choice-copy small {
    display: none !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-size_id"].eve-v3-choice-grid.is-compact .eve-v3-choice-icon {
    position: absolute !important;
    inset-inline-end: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
  }

  .eve-client-order-builder [data-v3-choice-host="cart-size_id"].eve-v3-choice-grid.is-compact .eve-v3-choice-tick {
    position: absolute !important;
    inset-inline-start: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
}

/* On narrower desktop/tablet widths, keep order types readable instead of
   squeezing them into narrow cards. */
@media (min-width: 701px) and (max-width: 980px) {
  .eve-client-order-builder [data-v3-choice-host="cart-album_type"].eve-v3-choice-grid.is-order-types {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
