/* Account navigation and actions; deliberately excludes the checkout. */
body.ec27-account-page #columns > .breadcrumb {
  margin-bottom: 6px;
}
body.ec27-account-page #center_column .page-heading {
  margin-top: 0;
}
body.ec27-account-page #center_column {
  width: 100%;
  max-width: none;
}
#my-account .addresses-lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
#my-account .addresses-lists::before,
#my-account .addresses-lists::after { display: none; }
#my-account .addresses-lists > [class*="col-"],
#my-account .addresses-lists .myaccount-link-list { display: contents; }
#my-account .addresses-lists ul.myaccount-link-list li {
  display: flex;
  min-width: 0;
  padding: 0;
}
#my-account .addresses-lists ul.myaccount-link-list li a { width: 100%; }
@media (max-width: 1199px) {
  #my-account .addresses-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  #my-account .addresses-lists { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
#my-account ul.myaccount-link-list li a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  gap: 14px;
  border: 1px solid #dce1e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #252a2e;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
  text-shadow: none;
  transition: border-color .15s, background-color .15s;
}
#my-account ul.myaccount-link-list li a i {
  position: static;
  flex: 0 0 26px;
  width: 26px;
  height: auto;
  padding: 0;
  border: 0;
  color: #ff0028;
  font-size: 22px;
}
#my-account ul.myaccount-link-list li a span {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-wrap: anywhere;
}
#my-account ul.myaccount-link-list li a:hover {
  border-color: #ff0028;
  background: #fff2f5;
  color: #252a2e;
}
body.ec27-account-page #center_column .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid #ff0028;
  border-radius: 8px;
  background: #ff0028;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  text-shadow: none;
  box-shadow: none;
}
body.ec27-account-page #center_column .button span {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit !important;
  font: inherit;
  text-shadow: none;
}
body.ec27-account-page #center_column .button:hover {
  background: #dc0023;
  border-color: #dc0023;
  color: #fff;
}
body.ec27-account-page #center_column .footer_links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
body.ec27-account-page #center_column .footer_links li {
  float: none;
  margin: 0;
  padding: 0;
}
body.ec27-account-page #center_column .footer_links .button {
  background: #fff !important;
  color: #ff0028 !important;
}
body.ec27-account-page #center_column .footer_links .button:hover {
  background: #fff2f5 !important;
}
#my-account ul.myaccount-link-list li a:focus-visible,
body.ec27-account-page #center_column .button:focus-visible {
  outline: 2px solid #ff0028;
  outline-offset: 3px;
}
@media (max-width: 767px) {
  #my-account ul.myaccount-link-list li a { min-height: 52px; font-size: 14px; }
}

/* Keep the withdrawal link consistent with the other account cards. */
#my-account ul.myaccount-link-list li.retractation-account-link > a {
  min-height: 58px !important;
  padding: 12px 16px !important;
  color: #252a2e !important;
}
#my-account ul.myaccount-link-list li.retractation-account-link > a:hover,
#my-account ul.myaccount-link-list li.retractation-account-link > a:focus {
  color: #252a2e !important;
}
@media (max-width: 767px) {
  #my-account ul.myaccount-link-list li.retractation-account-link > a {
    min-height: 52px !important;
  }
}

/* Withdrawal tables: readable columns and contained actions. */
body.module-retractation-default #center_column .table-responsive {
  max-width: 100%;
  overflow-x: auto;
}
body.module-retractation-default .retractation-orders-table,
body.module-retractation-default .retractation-products-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
body.module-retractation-default .retractation-orders-table th,
body.module-retractation-default .retractation-orders-table td,
body.module-retractation-default .retractation-products-table th,
body.module-retractation-default .retractation-products-table td {
  padding: 12px;
  vertical-align: middle;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
body.module-retractation-default .retractation-orders-table th:nth-child(1) { width: 18%; }
body.module-retractation-default .retractation-orders-table th:nth-child(2) { width: 16%; }
body.module-retractation-default .retractation-orders-table th:nth-child(3) { width: 38%; }
body.module-retractation-default .retractation-orders-table th:nth-child(4) { width: 28%; }
body.module-retractation-default .retractation-orders-table .retractation-action,
body.module-retractation-default .retractation-orders-table .retractation-action-disabled,
body.module-retractation-default .retractation-orders-table .label {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  line-height: 1.4;
}
body.module-retractation-default .retractation-products-table th:nth-child(1) { width: 12%; }
body.module-retractation-default .retractation-products-table th:nth-child(2) { width: 48%; }
body.module-retractation-default .retractation-products-table th:nth-child(3) { width: 24%; }
body.module-retractation-default .retractation-products-table th:nth-child(4) { width: 16%; }
@media (max-width: 767px) {
  body.module-retractation-default #center_column .table-responsive { border: 0; overflow: visible; }
  body.module-retractation-default .retractation-orders-table td,
  body.module-retractation-default .retractation-products-table td {
    padding: 12px !important;
  }
  body.module-retractation-default .retractation-orders-table td::before,
  body.module-retractation-default .retractation-products-table td::before {
    position: static;
    display: block;
    width: auto;
    margin-bottom: 6px;
  }
}

/* Closed desktop borders for account tables; retain the mobile card layout. */
@media (min-width: 768px) {
body.module-retractation-default .retractation-orders-table,
body.module-retractation-default .retractation-products-table,
body#history #order-list,
body.ec27-account-page #center_column #order-detail-content > table,
body.ec27-account-page #center_column table.detail_step_by_step,
body.ec27-account-page #center_column table.footab {
  border: 1px solid #dce1e6 !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
}
body.module-retractation-default .retractation-orders-table > thead > tr > th,
body.module-retractation-default .retractation-products-table > thead > tr > th,
body#history #order-list > thead > tr > th,
body.ec27-account-page #center_column #order-detail-content > table > thead > tr > th,
body.ec27-account-page #center_column table.detail_step_by_step > thead > tr > th,
body.ec27-account-page #center_column table.footab > thead > tr > th {
  background: #11151a;
  color: #fff;
}
body.module-retractation-default .retractation-orders-table > thead > tr > th,
body.module-retractation-default .retractation-products-table > thead > tr > th,
body#history #order-list > thead > tr > th,
body.ec27-account-page #center_column #order-detail-content > table > thead > tr > th,
body.ec27-account-page #center_column table.detail_step_by_step > thead > tr > th,
body.ec27-account-page #center_column table.footab > thead > tr > th {
  border: 0;
  border-right: 1px solid #dce1e6;
  border-bottom: 1px solid #dce1e6;
}
body.module-retractation-default .retractation-orders-table > thead > tr > th:last-child,
body.module-retractation-default .retractation-products-table > thead > tr > th:last-child,
body#history #order-list > thead > tr > th:last-child,
body.ec27-account-page #center_column #order-detail-content > table > thead > tr > th:last-child,
body.ec27-account-page #center_column table.detail_step_by_step > thead > tr > th:last-child,
body.ec27-account-page #center_column table.footab > thead > tr > th:last-child {
  border-right: 0;
}
body.module-retractation-default .retractation-orders-table > tbody > tr > td,
body.module-retractation-default .retractation-products-table > tbody > tr > td,
body#history #order-list > tbody > tr > td,
body.ec27-account-page #center_column #order-detail-content > table > tbody > tr > td,
body.ec27-account-page #center_column table.detail_step_by_step > tbody > tr > td,
body.ec27-account-page #center_column table.footab > tbody > tr > td {
  border: 0;
  border-right: 1px solid #dce1e6;
  border-bottom: 1px solid #dce1e6;
}
body.module-retractation-default .retractation-orders-table > tbody > tr > td:last-child,
body.module-retractation-default .retractation-products-table > tbody > tr > td:last-child,
body#history #order-list > tbody > tr > td:last-child,
body.ec27-account-page #center_column #order-detail-content > table > tbody > tr > td:last-child,
body.ec27-account-page #center_column table.detail_step_by_step > tbody > tr > td:last-child,
body.ec27-account-page #center_column table.footab > tbody > tr > td:last-child {
  border-right: 0;
}
body.module-retractation-default .retractation-orders-table > tfoot > tr > td,
body.module-retractation-default .retractation-products-table > tfoot > tr > td,
body#history #order-list > tfoot > tr > td,
body.ec27-account-page #center_column #order-detail-content > table > tfoot > tr > td,
body.ec27-account-page #center_column table.detail_step_by_step > tfoot > tr > td,
body.ec27-account-page #center_column table.footab > tfoot > tr > td {
  border: 0;
  border-right: 1px solid #dce1e6;
  border-bottom: 1px solid #dce1e6;
}
body.module-retractation-default .retractation-orders-table > tfoot > tr > td:last-child,
body.module-retractation-default .retractation-products-table > tfoot > tr > td:last-child,
body#history #order-list > tfoot > tr > td:last-child,
body.ec27-account-page #center_column #order-detail-content > table > tfoot > tr > td:last-child,
body.ec27-account-page #center_column table.detail_step_by_step > tfoot > tr > td:last-child,
body.ec27-account-page #center_column table.footab > tfoot > tr > td:last-child {
  border-right: 0;
}
body.module-retractation-default .retractation-orders-table > tbody > tr:last-child > td,
body.module-retractation-default .retractation-products-table > tbody > tr:last-child > td,
body#history #order-list > tbody > tr:last-child > td,
body.ec27-account-page #center_column #order-detail-content > table > tbody > tr:last-child > td,
body.ec27-account-page #center_column table.detail_step_by_step > tbody > tr:last-child > td,
body.ec27-account-page #center_column table.footab > tbody > tr:last-child > td {
  border-bottom: 0;
}
}

#history .ec27-order-details-mobile { display: none; }
@media (max-width: 1024px) {
  #history .ec27-order-details-mobile { display: block; margin-top: 8px; }
  #history .ec27-order-details-mobile .button { gap: 6px; }
}

@media (min-width: 768px) {
  #history #order-list > tbody > tr > td { vertical-align: middle; }
  #history #order-list .history_state > .label {
    max-width: 100%;
    margin: 0;
    white-space: normal;
    line-height: 1.4;
  }
}

/* Order details: highlight only the invoice download link. */
body.ec27-account-page #center_column .info-order a[href*="controller=pdf-invoice"],
body.ec27-account-page #center_column .info-order a[href*="/pdf-invoice"] {
  color: #ff0028 !important;
}

/* Keep the separator above order totals, including colspan cells. */
@media (min-width: 768px) {
  body.ec27-account-page #center_column #order-detail-content > table > tbody > tr:last-child > td {
    border-bottom: 1px solid #dce1e6;
  }
  body.ec27-account-page #center_column #order-detail-content > table > tfoot > tr:last-child > td {
    border-bottom: 0;
  }
  body.ec27-account-page #center_column #order-detail-content > table > tbody > tr > td {
    vertical-align: middle;
  }
}

/* Personal information: airy account form, keeping native validation and hooks. */
#identity #center_column .ec27-identity-panel {
  max-width: 100%; padding: 28px; background: #fff;
  border: 1px solid #dce1e6; border-radius: 12px; box-shadow: none;
}
#identity .ec27-identity-panel > .page-subheading {
  margin: 0 0 12px; padding: 0; border: 0;
  color: #202428; font-size: 26px; font-weight: 700; text-transform: none;
}
#identity .ec27-identity-panel .info-title { color: #606872; line-height: 1.6; margin-bottom: 8px; }
#identity .ec27-identity-panel > p.required { font-size: 12px; color: #737b84; margin-bottom: 20px; }
#identity #center_column .ec27-identity-panel form.std { width: 100%; max-width: none; }
#identity .ec27-identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 24px; min-width: 0; }
#identity .ec27-identity-grid > .form-group { min-width: 0; max-width: none; margin: 0; }
#identity .ec27-identity-section,
#identity .ec27-identity-wide,
#identity .ec27-identity-grid > .checkbox,
#identity .ec27-identity-grid > .page-subheading,
#identity .ec27-identity-actions { grid-column: 1 / -1; }
#identity .ec27-identity-section {
  margin: 8px 0 0; padding: 18px 0 0; border-top: 1px solid #e8ebef;
  color: #24282d; font-size: 18px; font-weight: 700; line-height: 1.4;
}
#identity .ec27-identity-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
#identity .ec27-identity-grid label { margin-bottom: 8px; color: #353b42; font-weight: 600; font-size: 14px; }
#identity #center_column .ec27-identity-grid .form-control {
  width: 100%; max-width: none; min-height: 46px; padding: 10px 14px;
  border: 1px solid #dce1e6; border-radius: 6px; background-color: #fff;
  color: #24282d; font-size: 15px; box-shadow: none;
}
#identity #center_column .ec27-identity-grid .form-control:focus { border-color: #ff0028; outline: 2px solid #ffe5e9; outline-offset: 1px; box-shadow: none; }
#identity .ec27-identity-grid > .form-group { position: relative; }
#identity .ec27-identity-grid input[type=password] { padding-right: 44px !important; }
#identity .ec27-identity-grid .iconpwd { position: absolute; right: 15px; top: 43px; color: #737b84; cursor: pointer; }
#identity .ec27-identity-grid .help { margin: 8px 0 0; color: #737b84; font-size: 12px; }
#identity .ec27-identity-grid > .checkbox { margin: 0; padding: 12px 16px; border-radius: 6px; background: #f7f8fa; }
#identity .ec27-identity-grid .checkbox label { margin: 0; font-weight: 400; line-height: 1.6; }
#identity .ec27-identity-gender .radio-inline { padding: 0; margin: 0 18px 0 0; }
#identity .ec27-identity-gender .radio-inline label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
#identity .ec27-identity-grid div.selector { width: 100% !important; height: auto; min-height: 46px; padding: 0; border: 0; background: none; overflow: visible; }
#identity .ec27-identity-grid div.selector > span { display: none; }
#identity .ec27-identity-grid div.selector select { position: static; opacity: 1; }
#identity .ec27-identity-grid select.form-control { appearance: auto; cursor: pointer; }
#identity .ec27-identity-grid .ec27-identity-actions { margin-top: 4px; padding-top: 20px; border-top: 1px solid #e8ebef; }
#identity .footer_links { display: flex; flex-wrap: wrap; gap: 12px; }
#identity .footer_links li { margin: 0; }
@media (max-width: 767px) {
  #identity #center_column .ec27-identity-panel { padding: 20px 16px; border-radius: 8px; }
  #identity .ec27-identity-panel > .page-subheading { font-size: 23px; line-height: 1.3; }
  #identity .ec27-identity-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  #identity #center_column .ec27-identity-grid .form-control { font-size: 16px; }
  #identity .ec27-identity-actions .button { width: 100%; }
}

/* Separate the new-address action from the address cards. */
body#addresses #center_column > .main-page-indent {
  margin-top: 20px;
}

/* Selectize wrappers are not input fields; keep birthday values on one line. */
#identity #center_column .ec27-identity-grid .ec27-form-dropdown.selectize-control.form-control {
  min-height: 0; height: auto; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none;
}
#identity #center_column .ec27-identity-grid .ec27-form-dropdown .selectize-input {
  display: flex; align-items: center; min-height: 46px;
  padding: 10px 32px 10px 12px; box-sizing: border-box;
}
#identity #center_column .ec27-identity-grid .ec27-form-dropdown .selectize-input > .item {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  overflow-wrap: normal; word-break: normal;
}
#identity #center_column .ec27-identity-grid .ec27-form-dropdown .selectize-input > input {
  min-height: 0 !important; max-width: 100%; padding: 0 !important; margin: 0 !important;
  border: 0 !important; border-radius: 0; background: transparent !important;
  line-height: 22px; box-shadow: none !important;
}
#identity .ec27-identity-birthday > .row {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px; max-width: 540px; margin: 0;
}
#identity .ec27-identity-birthday > .row::before,
#identity .ec27-identity-birthday > .row::after { display: none; }
#identity .ec27-identity-birthday > .row > .col-xs-4 {
  float: none; width: auto; min-width: 0; padding: 0;
}

/* Override the inherited identity limits (94px columns / 84px controls). */
#identity #center_column form.std .ec27-identity-birthday > .row {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.5fr) minmax(0, 1fr);
  width: 100%; max-width: 420px; gap: 10px; margin: 0;
}
#identity #center_column form.std .ec27-identity-birthday > .row > .col-xs-4 {
  width: auto; max-width: none; min-width: 0; padding: 0; float: none;
}
#identity #center_column form.std .ec27-identity-birthday > .row > .col-xs-4 .form-control,
#identity #center_column form.std .ec27-identity-birthday .ec27-form-dropdown {
  width: 100%; max-width: none;
}
#identity #center_column form.std .ec27-identity-birthday .selectize-input {
  width: 100%; padding: 10px 28px 10px 10px;
}
#identity #center_column form.std .ec27-identity-birthday .selectize-input::after { right: 11px; }

@media (max-width: 480px) {
  #identity #center_column form.std .ec27-identity-birthday .selectize-input {
    padding: 10px 22px 10px 8px; font-size: 14px;
  }
  #identity #center_column form.std .ec27-identity-birthday .selectize-input::after { right: 8px; }
}

/* Password strength is sized to its field, even after viewport changes. */
#identity #center_column .ec27-identity-grid .form-group > .progress {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* Address selects follow the native 271px input width, without nested borders. */
body#address #center_column .form-group .ec27-form-dropdown.selectize-control {
  width: 100%; max-width: 271px; min-width: 0;
  height: auto; min-height: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
body#address #center_column .form-group .ec27-form-dropdown .selectize-input {
  width: 100%; min-height: 42px; box-sizing: border-box;
}
body#address #center_column .form-group .ec27-form-dropdown .selectize-input > input {
  min-height: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
}

/* Client logout remains visible and touch accessible on the account page. */
#my-account .ec27-account-logout-action{display:flex;justify-content:flex-end;margin:0 0 20px}
#my-account .ec27-account-logout-action>a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:1px solid #f80823;border-radius:6px;background:#fff;color:#c90019;font-weight:700;text-decoration:none}
#my-account .ec27-account-logout-action>a:hover,#my-account .ec27-account-logout-action>a:focus-visible{background:#fff1f4;color:#a80015}
