/*
 Theme Name:     Legio
 Theme URI:      https://ddlegio.com
 Description:    A custom child theme of Shoptimizer
 Author:         Haroon Khalid
 Author URI:     https://ddlegio.com
 Template:       shoptimizer
 Version:        1.1.2
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

html,
body {
  background: black !important;
}

::selection {
  background: #155e75 !important;
}

a:focus {
  outline: unset !important;
}

.site-footer {
  display: none;
}

li {
  color: white !important;
}

/* ==========================================================================
   AG Grid Styles
   ========================================================================== */

#myGrid,
.ag-root,
.ag-root-wrapper {
  background-color: black !important;
  border: none !important;
  border-radius: 0 !important;

  & > div:first-child {
    border: none !important;
  }
}

.ag-header,
.ag-row {
  background-color: black;
}

.ag-row {
  border-bottom: 1px solid #404040 !important;

  &:hover {
    cursor: text;
  }

  &:last-child {
    border-bottom: none;
  }
}

.ag-row-hover {
  background-color: #010b0d !important;

  .ag-cell {
    color: #22d3ee !important;
  }
}

.ag-cell-focus,
.ag-cell:focus {
  border: 1px solid transparent !important;
  outline: none !important;
}

.ag-header-cell-text {
  color: #737373 !important;
  font-size: 18px;
}

.ag-icon {
  color: white !important;
}

/* ==========================================================================
   WordPress Content Styles
   ========================================================================== */

.entry-content {
  p,
  h1,
  h2,
  h3,
  h4 {
    color: white !important;
  }

  a {
    color: #00d3f2 !important;
    text-decoration: none !important;
  }

  .video-container {
    padding-bottom: 30% !important;
  }
}

h1.entry-title {
  color: white !important;
  line-height: 1 !important;
  font-size: 2.25rem !important;
  text-transform: capitalize !important;
}

.site-main:not(.grid) article.post {
  border-bottom: none !important;
}

/* ==========================================================================
   WordPress Blocks
   ========================================================================== */

.wp-block-quote {
  border-left: 0.25em solid;
  margin: 0 0 1.75em;
  padding-left: 1em;

  p {
    font-size: 16px !important;
    font-style: italic !important;
  }
}

.wp-block-file__button.wp-element-button {
  background: #171717;
  border: 1px solid #404040;
  border-radius: 3px;
  color: white !important;
  line-height: 1 !important;
}

/* ==========================================================================
   WooCommerce - Checkout
   ========================================================================== */

.entry-content .wc-block-checkout {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.wc-block-components-form.wc-block-checkout__form {
  label {
    color: #737373 !important;
  }

  input,
  select {
    background: black !important;
    border: 1px solid #404040 !important;
    color: white !important;
  }

  .wp-block-woocommerce-checkout-order-note-block {
    display: none;
  }

  .wp-block-woocommerce-checkout-terms-block {
    padding-top: 18px !important;
  }
}

.wp-block-woocommerce-checkout-order-summary-block {
  color: white !important;
}

.wc-block-components-address-form__address_2-toggle {
  color: #737373 !important;
}

.wc-block-components-checkout-place-order-button {
  border: 1px solid #404040 !important;
  font-weight: normal !important;
  font-size: 14px !important;
  color: white !important;
  border-radius: 3px !important;
  background: #171717 !important;
  padding: 12px 16px;
}

/* ==========================================================================
   WooCommerce - Coupons
   ========================================================================== */

.wc-block-components-totals-coupon__form {
  label {
    color: #737373 !important;
  }

  input {
    background: black !important;
    border: 1px solid #404040 !important;
    color: white !important;
  }
}

.wc-block-components-totals-coupon__button {
  border: 1px solid #404040 !important;
  font-weight: normal !important;
  font-size: 14px !important;
  color: white !important;
  border-radius: 3px !important;
  background: #171717 !important;
  padding: 12px 16px;
}

/* ==========================================================================
   WooCommerce - My Account
   ========================================================================== */

.woocommerce-MyAccount-content {
  padding-bottom: 50px !important;

  [role="alert"],
  .woocommerce-password-hint {
    color: #fca5a5 !important;
  }

  label {
    color: #737373 !important;
  }

  select,
  input,
  textarea {
    background: black !important;
    border: 1px solid #404040 !important;
    color: white !important;
  }

  /* Style native select dropdowns */
  select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem !important;
  }

  /* Style Select2 dropdowns (WooCommerce enhanced selects) */
  .select2-container--default .select2-selection--single {
    background: black !important;
    border: 1px solid #404040 !important;
    color: white !important;
    height: auto !important;
  }

  .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    color: white !important;
    line-height: normal !important;
    padding: 0.5rem !important;
  }

  .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 100% !important;
  }

  .select2-dropdown {
    background: black !important;
    border: 1px solid #404040 !important;
  }

  .select2-container--default .select2-results__option {
    background: black !important;
    color: white !important;
  }

  .select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background: #171717 !important;
    color: white !important;
  }

  h2,
  p,
  legend {
    color: white !important;
  }

  header a,
  p a {
    color: #00d3f3;
  }

  button[name="save_address"],
  button[type="submit"].woocommerce-Button:not(div.woocommerce-info button) {
    border: 1px solid #404040 !important;
    font-weight: normal !important;
    font-size: 14px !important;
    color: white !important;
    border-radius: 3px !important;
    background: #171717 !important;
    padding: 12px 16px;
  }
}

.woocommerce-MyAccount-navigation-link {
  a {
    color: white !important;
    text-transform: capitalize !important;

    &::before {
      background: #00d3f2 !important;
    }
  }
}

/* Custom icon for Members Area */
.woocommerce-MyAccount-navigation-link--members-area {
  a::before {
    content: "" !important;
    background: transparent !important;
    -webkit-mask: url("YOUR_ICON_URL_HERE.svg") no-repeat center !important;
    mask: url("YOUR_ICON_URL_HERE.svg") no-repeat center !important;
    background-color: #00d3f2 !important;
    /* OR use an image directly: */
    /* background-image: url('YOUR_ICON_URL_HERE.svg') !important; */
    /* background-size: contain !important; */
    /* background-repeat: no-repeat !important; */
    /* background-position: center !important; */
  }
}

.woocommerce-Addresses address {
  color: #737373 !important;
}

/* ==========================================================================
   WooCommerce - Messages & Validation
   ========================================================================== */

.woocommerce-info {
  background-color: #0891b2 !important;

  a {
    color: white !important;
    font-weight: normal !important;
  }
}

.wc-block-components-validation-error {
  path,
  span {
    color: #fca5a5 !important;
  }
}

/* ==========================================================================
   Theme Overrides
   ========================================================================== */

#shoptimizerCartDrawer,
.mobile-menu {
  display: none !important;
}

.wc-block-components-address-card__edit,
.wc-block-components-shipping-rates-control__package-title,
.wc-block-components-address-card__address-section,
.wc-block-components-checkbox__label {
  color: white !important;
}

/* White checkmark when checked (inline SVG) */
.wc-block-components-checkbox__input[type="checkbox"]:checked {
  background-color: #000 !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 6L9 17l-5-5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 14px 14px !important;
}

/* Hide Woo/Theme drawn tick (usually via label/control pseudo elements) */
.wc-block-components-checkbox__input[type="checkbox"]:checked + label::after,
.wc-block-components-checkbox__input[type="checkbox"]:checked + label::before,
.wc-block-components-checkbox__input[type="checkbox"]:checked
  + .wc-block-components-checkbox__label::after,
.wc-block-components-checkbox__input[type="checkbox"]:checked
  + .wc-block-components-checkbox__label::before,
.wc-block-components-checkbox__input[type="checkbox"]:checked ~ label::after,
.wc-block-components-checkbox__input[type="checkbox"]:checked ~ label::before {
  content: none !important;
  display: none !important;
  background: none !important;
  mask: none !important;
}

.wc-block-components-checkbox__input[type="checkbox"]:checked
  ~ .wc-block-components-checkbox__mark,
.wc-block-components-checkbox__input[type="checkbox"]:checked
  ~ .wc-block-components-checkbox__control::after,
.wc-block-components-checkbox__input[type="checkbox"]:checked
  ~ .wc-block-components-checkbox__control::before {
  content: none !important;
  display: none !important;
}

.wc-block-components-form.wc-block-checkout__form input[type="radio"] {
  background: white !important;
}

#nmi-card-number-element,
#nmi-card-expiry-element,
#nmi-card-cvc-element {
  background: black;
  border-color: #6f6f6f;
}

.wc-empty-cart-message .woocommerce-info {
  background-color: black !important;
  color: white !important;
}

.return-to-shop a {
  color: white !important;
}

.woocommerce-PaymentMethods.payment_methods.methods {
  margin-left: 0 !important;
}

.woocommerce-MyAccount-content .button:not(.woocommerce-info .button) {
  border: 1px solid #404040 !important;
  font-weight: normal !important;
  font-size: 14px !important;
  color: white !important;
  border-radius: 3px !important;
  background: #171717 !important;
  padding: 12px 16px;
}

table.my_account_subscriptions {
  thead tr th span {
    color: white;
  }

  td.subscription-id a {
    color: #00d3f3 !important;
  }

  td.subscription-status,
  td.subscription-next-payment,
  td.subscription-total {
    color: white;
  }
}

#woocommerce-subscriptions-related-orders-table,
table.woocommerce-MyAccount-orders,
table.my_account_orders,
table.shop_table.order_details,
table.subscription_details {
  tr,
  th,
  td {
    color: white;
  }

  th.woocommerce-orders-table__cell-order-number a,
  td.membership-plan a,
  td.order-number a,
  td.product-name a {
    color: #00d3f3 !important;
  }
}

.woocommerce-customer-details address {
  color: #737373;
}

mark.order-number,
mark.order-date,
mark.order-status {
  color: white;
}

section.woocommerce-order-details {
  padding: 0;
  border: none;
}

.membership-actions.order-actions a {
  padding: 4px 6px !important;
  font-size: 12px !important;
}

.woocommerce-message {
  background: #0891b2;
  color: white;
}

.woocommerce-MyAccount-navigation-link {
  a {
    &::before {
      display: none !important;
    }
  }
}
