/* MPS Shop: account */
/* ===== Your Account pages: Downloads, Order History, Addresses, Profile ===== */
#hikashop_download_listing, #hikashop_order_listing, #hikashop_address_listing, .com-users-profile__edit {
  --mps-green: #394b40; --mps-line: #e3e6e3; --mps-soft: #6b6f6b; --mps-panel: #f4f6f5;
}
.mps-acc-title { margin: 0 0 22px; }

/* fields and drop-downs, as in the checkout */
#hikashop_download_listing input.form-control, #hikashop_order_listing input.form-control,
#hikashop_address_listing input.form-control, .com-users-profile__edit input.form-control,
#hikashop_download_listing select, #hikashop_order_listing select, #hikashop_address_listing select {
  height: 46px; padding: 0 12px; border: 1px solid #c7c7c7 !important; border-radius: 8px !important; background-color: #fff;
  font-size: 16px; font-family: inherit; color: #222; box-shadow: none; box-sizing: border-box;
}
#hikashop_download_listing select, #hikashop_order_listing select, #hikashop_address_listing select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 40px !important; width: auto; min-width: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 16px 16px !important;
}
#hikashop_download_listing :is(input, select):focus, #hikashop_order_listing :is(input, select):focus,
#hikashop_address_listing :is(input, select):focus, .com-users-profile__edit input:focus {
  border-color: var(--mps-green) !important; outline: 2px solid rgba(57,75,64,.2); outline-offset: 0;
}

/* buttons */
#hikashop_download_listing .hikashop_search_block button, #hikashop_order_listing .hikashop_search_block button,
#hikashop_address_listing .hikabtn, .com-users-profile__edit .btn-primary, .mps-acc-cta {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; width: auto !important; height: 46px; padding: 0 22px !important;
  background: var(--mps-green, #394b40) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important;
  font: 600 12px/1 Raleway, sans-serif !important; letter-spacing: .1em; text-transform: uppercase; text-decoration: none !important; cursor: pointer;
}
#hikashop_download_listing .hikashop_search_block button:hover, #hikashop_order_listing .hikashop_search_block button:hover,
#hikashop_address_listing .hikabtn:hover, .com-users-profile__edit .btn-primary:hover, .mps-acc-cta:hover { background: #2a3830 !important; }
.com-users-profile__edit .btn-danger:not(.btn-sm) {
  display: inline-flex; align-items: center; height: 46px; padding: 0 22px; background: #fff !important; color: #c92222 !important;
  border: 1px solid #c92222 !important; border-radius: 8px; font: 600 12px/1 Raleway, sans-serif; letter-spacing: .1em; text-transform: uppercase;
}

/* search bar and filters: one grey panel */
#hikashop_download_listing #adminForm > .hk-row-fluid, #hikashop_order_listing #adminForm > .hk-row-fluid {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin: 0 0 20px; padding: 16px; background: var(--mps-panel); border: 1px solid rgba(0,0,0,.06); border-radius: 8px;
}
#hikashop_download_listing #adminForm > .hk-row-fluid > [class*="hkc-"], #hikashop_order_listing #adminForm > .hk-row-fluid > [class*="hkc-"] {
  float: none !important; width: auto !important; flex: 0 1 auto; padding: 0 !important; margin: 0 !important;
}
#hikashop_download_listing #adminForm > .hk-row-fluid::before, #hikashop_download_listing #adminForm > .hk-row-fluid::after,
#hikashop_order_listing #adminForm > .hk-row-fluid::before, #hikashop_order_listing #adminForm > .hk-row-fluid::after { display: none !important; }
.hikashop_search_block { display: flex !important; gap: 8px; align-items: center; flex-wrap: nowrap; }
.hikashop_search_block input.form-control { width: 280px !important; max-width: 60vw; }
.hikashop_search_block .element-invisible { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#hikashop_order_listing .hikashop_order_sort { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; font-size: 14px; color: var(--mps-soft); }
#hikashop_order_listing .hikashop_order_sort br { display: none; }

/* downloads table */
#hikashop_downloads { width: 100%; border: 1px solid var(--mps-line) !important; border-radius: 8px; border-collapse: separate !important; border-spacing: 0; overflow: hidden; background: #fff; }
#hikashop_downloads thead th {
  padding: 12px 14px !important; background: var(--mps-panel) !important; border: 0 !important; text-align: left !important;
  font: 600 12px Raleway, sans-serif !important; letter-spacing: .08em; text-transform: uppercase; color: var(--mps-green) !important;
}
#hikashop_downloads thead th a { color: inherit !important; text-decoration: none; }
#hikashop_downloads tbody td { padding: 12px 14px !important; border: 0 !important; border-top: 1px solid var(--mps-line) !important; background: #fff !important; box-shadow: none !important; vertical-align: middle; }
#hikashop_downloads tbody tr:hover td { background: #fafbfa !important; }
#hikashop_downloads tbody a { color: var(--mps-green); font-weight: 600; }
#hikashop_downloads tfoot td { padding: 10px 14px !important; border: 0 !important; border-top: 1px solid var(--mps-line) !important; background: #fff !important; }
#hikashop_downloads tfoot .pagination, #hikashop_downloads tfoot .list-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; }
#hikashop_downloads tfoot .limit { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mps-soft); }
#hikashop_downloads tfoot select { height: 36px !important; min-width: 80px !important; font-size: 14px !important; }
#hikashop_downloads .hikashop_results_counter { font-size: 13px; color: var(--mps-soft); }
#hikashop_downloads .mps-acc-empty td { padding: 36px 20px !important; text-align: center; color: var(--mps-soft); }

/* empty states */
.mps-acc-empty p { margin: 0 0 16px; font-size: 16px; color: #444; }
#hikashop_order_listing .hika_no_orders {
  padding: 36px 20px !important; text-align: center; background: #fff !important; border: 1px solid var(--mps-line) !important; border-radius: 8px; box-shadow: none !important;
}
#hikashop_order_listing .hika_no_orders p { margin: 0 0 16px; font-size: 16px; font-style: normal !important; color: #444; }

/* order cards (when there are orders) */
#hikashop_order_listing .hikashop_orders_content > div:not(.hika_no_orders) {
  margin: 0 0 14px; border: 1px solid var(--mps-line) !important; border-radius: 8px !important; background: #fff !important; box-shadow: none !important; position: relative;
}
/* no overflow clipping, so the Actions menu can open over the next order; round the inner corners instead */
#hikashop_order_listing .hk-card-order > :first-child { border-radius: 7px 7px 0 0; }
#hikashop_order_listing .hk-card-order > :last-child { border-bottom-left-radius: 7px; border-bottom-right-radius: 7px; }
#hikashop_order_listing .hk-card-order:focus-within, #hikashop_order_listing .hk-card-order:has(.hkdropdown.open, [aria-expanded="true"][data-toggle="hkdropdown"]) { z-index: 20; }
#hikashop_order_listing .hkdropdown-menu { z-index: 30; }
#hikashop_order_listing .hikashop_orders_content a { color: var(--mps-green); }

/* addresses */
#hikashop_user_addresses_default { display: grid; gap: 12px; margin: 0 0 28px; padding: 16px; background: var(--mps-panel); border: 1px solid rgba(0,0,0,.06); border-radius: 8px; }
#hikashop_user_addresses_default dl.hika_options { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 12px; margin: 0; }
#hikashop_user_addresses_default dl.hika_options dt { float: none; width: auto; margin: 0; padding: 0; text-align: left; font-size: 14px; font-weight: 600; color: #333; white-space: normal; }
#hikashop_user_addresses_default dl.hika_options dd { margin: 0; padding: 0; }
#hikashop_user_addresses_default select { width: 100% !important; }
#hikashop_user_addresses_show h3 { margin: 0 0 14px; font: 300 22px Roboto, sans-serif; }
#hikashop_user_addresses_show .hk-row-fluid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
#hikashop_user_addresses_show .hk-row-fluid::before, #hikashop_user_addresses_show .hk-row-fluid::after { display: none; }
#hikashop_user_addresses_show .hk-row-fluid > [class*="hkc-"] { float: none !important; width: auto !important; max-width: none !important; grid-column: auto !important; flex: none !important; padding: 0 !important; margin: 0 !important; }
#hikashop_address_listing .hikashop_user_address {
  display: flex; flex-direction: column; margin: 0 0 14px; padding: 18px 20px !important; border: 1px solid var(--mps-line) !important; border-radius: 8px;
  background: #fff !important; line-height: 1.6; box-shadow: none !important;
}
#hikashop_address_listing .hikashop_user_address .hika_edit {
  order: 2; position: static !important; display: flex; gap: 18px; margin: 14px 0 0; padding: 12px 0 0 !important; border-top: 1px solid var(--mps-line);
  background: none !important; height: auto !important; float: none !important;
}
#hikashop_address_listing .hika_edit a { display: inline-flex; align-items: center; gap: 6px; color: var(--mps-green); font-weight: 600; font-size: 14px; text-decoration: none !important; }
#hikashop_address_listing .hika_edit a span { display: inline !important; position: static !important; width: auto !important; height: auto !important; clip: auto !important; clip-path: none !important; overflow: visible !important; margin: 0 !important; white-space: nowrap; }
#hikashop_address_listing .hika_edit a:last-child { color: #c92222; }
#hikashop_address_listing .hikabtn .fa { font-size: 11px; }
/* the edit / new address form that opens in place */
#hikashop_address_listing .hkform-group { display: block; margin: 0 0 16px; }
#hikashop_address_listing .hkform-group > .hkcontrol-label { display: block; float: none; width: auto; margin: 0 0 6px; padding: 0; text-align: left; font-size: 14px; font-weight: 600; color: #333; }
#hikashop_address_listing .hkform-group > [class*="hkc-sm"] { float: none; width: 100%; margin: 0; padding: 0; }
#hikashop_address_listing .hkform-group :is(input.form-control, select) { width: 100% !important; }

/* profile */
.com-users-profile__edit fieldset { margin: 0 0 22px; padding: 22px 24px; border: 1px solid var(--mps-line); border-radius: 8px; background: #fff; }
.com-users-profile__edit fieldset > legend:not(.visually-hidden) { float: left; width: 100%; margin: 0 0 16px; padding: 0; font: 300 22px Roboto, sans-serif; }
.com-users-profile__edit fieldset > legend + * { clear: both; }
.com-users-profile__edit fieldset fieldset { margin: 0; padding: 0; border: 0; }
.com-users-profile__edit .control-group { margin: 0 0 16px; }
.com-users-profile__edit .control-label label { font-size: 14px; font-weight: 600; color: #333; }
.com-users-profile__edit input.form-control { width: 100%; }
.com-users-profile__edit .input-group { display: flex; flex-wrap: nowrap; }
.com-users-profile__edit .input-group input.form-control { border-radius: 8px 0 0 8px !important; }
.com-users-profile__edit .input-password-toggle { height: 46px; padding: 0 16px; border: 1px solid #c7c7c7; border-left: 0; border-radius: 0 8px 8px 0; background: var(--mps-panel); color: var(--mps-green); }
.com-users-profile__edit .com-users-profile__edit-submit { display: flex; gap: 12px; flex-wrap: wrap; }
.com-users-profile__edit .com-users-profile__edit-submit .controls { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  #hikashop_user_addresses_show .hk-row-fluid { grid-template-columns: 1fr; }
  #hikashop_user_addresses_default dl.hika_options { grid-template-columns: 1fr; gap: 6px; }
  .hikashop_search_block input.form-control { width: 100% !important; max-width: none; }
  #hikashop_download_listing #adminForm > .hk-row-fluid > [class*="hkc-"], #hikashop_order_listing #adminForm > .hk-row-fluid > [class*="hkc-"] { flex: 1 1 100%; }
  #hikashop_order_listing .hikashop_order_sort { justify-content: flex-start; }
}
/* address edit form: OK and Cancel side by side */
#hikashop_address_listing :has(> .hikashop_checkout_address_ok_button) { display: flex !important; flex-direction: row-reverse; justify-content: flex-end; gap: 12px; margin-top: 8px; }
#hikashop_address_listing .hikashop_checkout_address_ok_button, #hikashop_address_listing .hikashop_checkout_address_cancel_button {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; width: auto !important; float: none !important; height: 46px; margin: 0 !important; padding: 0 22px !important;
  border-radius: 8px !important; font: 600 12px/1 Raleway, sans-serif !important; letter-spacing: .1em; text-transform: uppercase; text-decoration: none !important;
}
#hikashop_address_listing .hikashop_checkout_address_ok_button { background: #394b40 !important; color: #fff !important; border: 0 !important; }
#hikashop_address_listing .hikashop_checkout_address_ok_button:hover { background: #2a3830 !important; }
#hikashop_address_listing .hikashop_checkout_address_cancel_button { background: #fff !important; color: #c92222 !important; border: 1px solid #c92222 !important; }
/* filters line up with the search box (HikaShop gives the first drop-down a bottom margin) */
#hikashop_order_listing #adminForm > .hk-row-fluid :is(select, input, button),
#hikashop_download_listing #adminForm > .hk-row-fluid :is(select, input, button) { margin: 0 !important; vertical-align: middle; }
#hikashop_order_listing #adminForm > .hk-row-fluid select, #hikashop_download_listing #adminForm > .hk-row-fluid select { height: 46px !important; }

/* order history: every order row lines up (fixed column widths), and the products button keeps its label */
#hikashop_order_listing .hk-card-order .hk-card-body > .hk-row-fluid {
  display: grid !important; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 120px 110px 170px; gap: 10px 16px; align-items: center;
}
#hikashop_order_listing .hk-card-order .hk-card-body > .hk-row-fluid > [class*="hkc-"] { grid-column: auto !important; width: auto !important; min-width: 0; margin: 0 !important; float: none !important; }
#hikashop_order_listing .hika_order_more { text-align: right; }
#hikashop_order_listing .hika_order_number_value { white-space: nowrap; }
#hikashop_order_listing .hika_order_more .hikabtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; white-space: nowrap; }
#hikashop_order_listing .hika_order_more .element-invisible { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 759px) {
  #hikashop_order_listing .hk-card-order .hk-card-body > .hk-row-fluid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #hikashop_order_listing .hika_order_more { grid-column: 1 / -1 !important; }
}
