@charset "utf-8";

/* Mobile (max-width: 767px). Mirrors join.css + responsive layout. */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff !important;
  background-image: none !important;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #222;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px;
  box-sizing: border-box;
}

#wrapper {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0 4px;
  box-sizing: border-box;
}

a:link,
a:visited,
a:active {
  text-decoration: none;
  color: #0b57d0;
}

a:hover {
  text-decoration: none;
  color: #c60;
}

/* Full-bleed header: negate body horizontal padding (matches body { padding: 0 14px }) */
.join-mobile-epoch-header {
  margin-left: -14px;
  margin-right: -14px;
  margin-bottom: 14px;
  width: calc(100% + 28px);
  max-width: none;
  text-align: center;
  box-sizing: border-box;
}

.join-mobile-epoch-header img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
}

#siteInfo {
  margin: 8px auto 12px;
  padding: 0;
  font-size: 12px;
  color: #222;
  width: 100% !important;
  max-width: 420px;
  box-sizing: border-box;
  height: auto !important;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  background: #fafafa;
  overflow: hidden;
  box-shadow: none;
}

/* Stack label / value for narrow screens (table markup stays server-side) */
#siteInfo table {
  border-collapse: collapse;
  border-spacing: 0;
}

#siteInfo tr {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid #ececec;
}

#siteInfo tr:last-child {
  border-bottom: none;
}

#siteInfo td {
  display: block;
  width: 100% !important;
  padding: 0 !important;
  background-color: transparent !important;
  vertical-align: top;
  text-align: left !important;
}

#siteInfo td:first-child {
  margin-bottom: 4px;
}

#siteInfo lable.product_header,
#siteInfo .product_header {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  line-height: 1.25;
}

#siteInfo lable.product_info,
#siteInfo .product_info {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* JA/CN templates wrap rows in legacy <font>; class rules control size/color */
#siteInfo font {
  font-size: inherit !important;
  line-height: inherit;
}

#usernameBox {
  margin: 0 auto !important;
  padding: 16px 14px !important;
  width: 100% !important;
  max-width: 420px;
  position: relative;
  background-color: transparent;
  left: 0;
  box-sizing: border-box;
  border-radius: 8px;
  border: none;
  box-shadow: none;
  color: #222;
}

#usernameBox td {
  background-color: transparent !important;
}

#usernameBox font {
  font-size: inherit !important;
  line-height: inherit;
  color: inherit !important;
}

#usernameBox lable.form_header,
#usernameBox .form_header {
  font-size: 12px;
  color: #222 !important;
}

#usernameBox lable.form_info,
#usernameBox .form_info {
  color: #666 !important;
}

#usernameBox label.error {
  color: #c62828 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 0 1px !important;
  text-align: left;
}

#usernameBox .subText {
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}

#usernameBox input[type="text"],
#usernameBox input[type="password"] {
  color: #222;
  background-color: #fff;
  border-color: #bdbdbd;
}

/*
 * jQuery Validate adds class "error" on invalid inputs. The generic .error rule below
 * is for messages — keep invalid fields the same size as valid ones.
 */
#usernameBox input.error,
#usernameBox input[type="text"].error,
#usernameBox input[type="password"].error {
  font-size: 16px;
  padding: 8px 6px;
  line-height: normal;
  color: #222;
}

input {
  border: 1px solid #444;
  padding: 8px 6px;
  font-size: 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.error {
  color: #c62828;
  font-size: 13px;
  padding: 6px 0;
  line-height: 1.45;
}

/*
 * Hide desktop legal block on mobile. Use p.footer on all locales — do not rely on
 * :has() alone (unsupported :has() can invalidate a whole selector list in some UAs,
 * and JA/CN used only :has(span.style1) before, leaving a tall near-invisible block).
 */
p.footer {
  display: none !important;
}

p:has(span.style1),
p:has(span.style2) {
  display: none !important;
}

.footer-mobile-copyright {
  display: block !important;
  margin: 10px auto 0;
  padding: 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #555;
  text-align: center;
}

/* Legacy spacer <p> after legal block — hidden on mobile only (desktop join.css unchanged) */
.join-mobile-footer-spacer {
  display: none !important;
}

/*
 * Single-column join layout: hide promo-image cells, fee column, and
 * activation placeholder cells; hide Epoch logo strip next to JOIN button.
 * Requires :has() (Safari 15.4+, Chromium 105+).
 */
#Table_01 td:has(> img:only-child) {
  display: none !important;
}

#Table_01 td[background*="no-monthly"],
#Table_01 td[background*="membership-fees"],
#Table_01 td[background*="CN-no-monthly"] {
  display: none !important;
}

#Table_01 td[background*="Instant-access"]:not(:has(input)):not(:has(button)) {
  display: none !important;
}

#Table_01 td:has(#submit-pp) div[style*="360px"],
#Table_01 td:has(#submit) div[style*="360px"] {
  display: none !important;
}

#Table_01 td:has(#usernameBox),
#Table_01 td:has(#siteInfo) {
  width: 100% !important;
}

/* Legacy fixed-width table: fit viewport */
#Table_01 {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
  table-layout: auto;
  border-collapse: collapse;
}

#Table_01 td,
#Table_01 th {
  height: auto !important;
  vertical-align: top;
}

#Table_01 img,
#Table_01 input[type="image"] {
  max-width: 100% !important;
  width: auto;
  height: auto !important;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#siteInfo table,
#usernameBox table {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
}

#usernameBox input[style] {
  width: 100% !important;
  max-width: min(280px, 100%);
}

/*
 * Mobile only: line break before username / password / email fields (label above input).
 */
#usernameBox table tr:has(> td lable.form_header):has(> td lable.form_input) {
  display: block;
  padding: 4px 0;
}

#usernameBox table tr:has(> td lable.form_header):has(> td lable.form_input) > td {
  display: block;
  width: 100% !important;
  text-align: left !important;
  height: auto !important;
}

#usernameBox table tr:has(> td lable.form_header):has(> td lable.form_input) > td:first-child {
  margin-bottom: 6px;
}

#Table_01 td div[style*="width"] {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

/* Strip decorative cell/table backgrounds (wallpaper JPGs) on mobile */
#Table_01 td[background],
#Table_01 table[background] {
  background-image: none !important;
  background-color: #fff !important;
}

#siteInfo table[background] {
  background-image: none !important;
  background-color: transparent !important;
}

/*
 * Submit image: templates use position:relative with top:-20px (EN) or bottom:20px (JA/CN)
 * so the button sits on the seam between table cells. On the single-column mobile layout
 * that reads as overlapping the #usernameBox area; reset offset and add top spacing.
 */
#Table_01 input#submit-pp.submit,
#Table_01 input#submit.submit,
#Table_01 button#submit-pp.submit,
#Table_01 button#submit.submit {
  top: 0 !important;
  bottom: auto !important;
  margin-top: 8px;
}

/* Fallback for browsers/layout quirks: keep submit area visible on mobile. */
#Table_01 td[background*="Instant-access"] {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

#submit-pp,
#submit {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
