﻿/* Scrollbar styling */

svg.store-context-icon {
  height: 22px;
  margin-right: 10px;
}

a.ico-store.store-context-link {
  text-decoration: underline;
}

li.store-context-wrapper {
  display: flex;
  align-items: center;
}

a.ico-store.store-context-link span {
  height: 14px;
  display: flex;
}

li.store-context-wrapper svg.store-context-icon {
  color: #8c8c8c;
}

li.store-context-wrapper:hover a.ico-store.store-context-link,
li.store-context-wrapper:hover svg.store-context-icon {
  color: #C5365B;
}

#store-context-container .store-context-dropdown {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  z-index: 10000;
  width: 318px;
  border: 1px solid #e5e5e5;
  background: #fff;
  box-shadow: none;
  text-align: left;
  transform: translateX(-50%);
}

#store-context-container .store-context-content {
  padding: 22px 14px 22px 18px;
  background: #fff;
}

#store-context-container .store-context-mobile-title {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid #ebebeb;
  color: #8E8E8E;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

#store-context-container .store-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  column-gap: 0;
  row-gap: 0;
  margin: 0 -8px;
}

#store-context-container .store-column {
  box-sizing: border-box;
  width: 50%;
  min-width: 0;
  padding: 0 8px;
  margin: 0 0 25px;
}

#store-context-container .state-header {
  margin: 0 0 8px;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

#store-context-container .store-item {
  display: block;
  margin: 0;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
  transition: color 0.18s ease;
  white-space: normal;
  border-bottom: none;
}

#store-context-container .store-item + .store-item {
  margin-top: 2px;
}

#store-context-container .store-item:hover,
#store-context-container .store-item:focus,
#store-context-container .store-item:active {
  background: transparent;
  color: #6d6d6d;
}

#store-context-container .store-delivery-row {
  display: flex;
  margin-top: 2px;
  padding: 0;
}

#store-context-container .store-item-delivery {
  display: inline-flex;
  min-width: 50%;
  padding-top: 6px;
}

#store-context-container .store-delivery-spacer {
  display: block;
  flex: 1 1 50%;
}

@media (max-width: 1024px) {
  #store-context-container .store-context-dropdown {
    width: 100%;
    top: 100%;
  }

  li.store-context-wrapper a.ico-store.store-context-link span,
  li.store-context-wrapper svg.store-context-icon {
    display: none;
  }

  li.store-context-wrapper a.ico-store.store-context-link svg {
    display: block !important;
  }

  div#store-context-container {
    position: absolute;
    left: 0;
    width: 100%;
  }

  .state-header {
    background-color: #f3f4f6;
    border-bottom: 1px solid #e4e6ea;
    text-align: center;
    padding: 12px 10px;
    font-size: 14px;
    color: #1f1f1f;
    letter-spacing: 0.2px;
  }

  .store-context-dropdown::-webkit-scrollbar {
    width: 6px;
  }

  .store-context-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
  }

  .store-context-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
  }

  .store-context-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }
}

.store-context-toast {
  position: fixed;
  top: 96px;
  right: 24px;
  min-width: 320px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 14px 14px 14px 12px;
  border: 1px solid var(--pc);
  border-radius: 10px;
  background: #ebfbff;
  color: var(--pc);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  z-index: 10020;
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.store-context-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.store-context-toast.is-hiding {
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
}

.store-context-toast-icon {
  color: #0f9a8f;
  font-size: 18px;
  line-height: 1.2;
}

.store-context-toast-body {
  flex: 1;
  min-width: 0;
}

.store-context-toast-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e2f3d;
  line-height: 1.2;
}

.store-context-toast-subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: #2d3b46;
  line-height: 1.2;
}

.store-context-toast-close {
  border: 0;
  background: transparent;
  color: #8aa1aa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

/* Product stock location dropdown */
.stock-location-container {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 5px;
  border: 0.5px solid #8e8e8e;
  margin-top: 10px;
  border-radius: 3px;
}

.stock-location-container.price-bottom-zone {
  width: calc(100% - 0);
}

@media (min-width: 1281px) {
  .stock-location-container.price-bottom-zone {
    width: calc(100% - 0px);
  }
}

.stock-location-container .stock-location-btn {
  background-color: #fff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--pc);
  border-radius: 3px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  text-transform: capitalize;
  border: 0;
  min-height: 40px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.stock-location-container .stock-location-btn:hover,
.stock-location-container .stock-location-btn.active {
  background-color: #fff;
}

.stock-location-container .stock-location-btn > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  text-align: left;
  padding-right: 6px;
}

.stock-location-container .stock-location-btn .dropdown-arrow {
  flex: 0 0 auto;
  margin-left: 8px;
}

.dropdown-arrow {
  transition: transform 0.2s;
}

.dropdown-arrow.rotated {
  transform: rotate(180deg);
}

.stock-location-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #ced4da;
  border-top: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stock-location-dropdown::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.stock-location-dropdown.visible {
  display: block;
}

.stock-location-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  position: relative;
}

@media (max-width: 767px) {
  .stock-location-container .stock-location-btn {
    font-size: 12px;
  }

  .stock-location-item {
    font-size: 13px;
  }
}

.product-grid,
.category-grid {
  z-index: unset;
  position: static;
}

.nop-jcarousel .carousel-title {
  z-index: -1;
}

.stock-location-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #f1f1f1;
  gap: 10px;
  font-size: 14px;
}

.stock-location-item:last-child {
  border-bottom: none;
}

.location-icon {
  width: 16px;
  text-align: center;
  display: inline-block;
  flex-shrink: 0;
}

.icon-in-stock {
  color: #008000;
}

.icon-low-stock {
  color: #ff0000;
}

.location-text {
  flex: 1;
  text-align: left;
  color: #495057;
}

.stock-legend {
  padding: 8px 12px;
  border-top: 1px solid #f8f9fa;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.status-in-stock {
  color: #008000;
  margin-right: 8px;
}

.status-low-stock {
  color: orange;
}

.status-out-of-stock {
  color: #ff0000;
}

.store-selection-item {
  cursor: pointer;
  transition: background-color 0.2s;
}

.store-selection-item:hover {
  background-color: #f8f9fa;
}

.stock-location-wrapper {
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stock-location-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.location-title {
  font-size: 28px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}

.location-mode-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 20px;
}

.context-option-card {
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s ease;
}

.context-option-card + .context-option-card {
  margin-top: 10px;
}

.context-option-card.active {
  border-color: #1f4d4f;
}

.context-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.context-option-header.set-location {
  padding-bottom: 8px;
  border-bottom: 1px solid #DCDCDC;
}

.context-option-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f1f1f;
}

.stock-msg {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  padding-left: 15px;
  border-radius: 4px;
  margin-left: auto;
  max-width: 55%;
  position: relative;
}

.stock-msg::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: #67B56D;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  position: absolute;
  left: 0;
  top: 3px;
}

.stock-msg.in-stock {
  color: #67B56D;
}

.stock-msg.in-stock::before {
  background-color: #67B56D;
}

.stock-msg.low-stock {
  color: #FFA600;
}

.stock-msg.low-stock::before {
  background-color: #FFA600;
}

.stock-msg.out-of-stock {
  color: #FF0000;
}

.stock-msg.out-of-stock::before {
  background-color: #FF0000;
}

.store-card-stock.stock-msg {
  display: block;
  margin: 0 0 10px 0;
  max-width: 100%;
  text-align: left;
  font-size: 12px;
}

.context-mode-radio {
  display: inline-block !important;
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #1f4d4f;
}

.context-option-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.selected-store-name {
  font-size: 12px;
  color: #1f4d4f;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.context-option-body .selected-store-name::before {
  content: "";
  width: 20px;
  height: 20px;
  display: inline-block;
  background-image: url("/Themes/Emporium/Content/img/store-icon.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

.selected-store-name.is-placeholder {
  color: #888;
  font-weight: 500;
}

.open-store-selector-btn {
  border: none;
  border-bottom: 1px solid #000;
  background: #fff;
  color: #000;
  padding: 3px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.btn-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.store-selector-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

.store-selector-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 10000;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.store-selector-panel.open {
  transform: translateX(0);
}

.store-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e5e5e5;
}

.store-selector-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.store-selector-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #000;
  cursor: pointer;
}

.store-selector-close::before {
  content: "\7a";
}

.store-selector-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.state-row {
  width: 100%;
  padding: 18px 4px;
  border: 0;
  border-bottom: 1px solid #ececec;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.state-row .arrow {
  color: #000;
  font-size: 16px;
  font-weight: 500;
}

.state-row .arrow::before {
  content: "\6a";
}

.store-selector-list {
  padding: 10px;
}

span.state-name {
  font-size: 20px;
}

span.back-store-icon::after {
  content: '\6a';
  padding-left: 10px;
  font-size: 12px;
  text-decoration: none;
}

span.back-store-icon span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-to-states {
  border: 0;
  background: transparent;
  color: #000;
  font-weight: 600;
  padding: 8px 0 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.store-card {
  border-bottom: 1px solid #ececec;
  padding: 14px 0;
  margin-bottom: 0;
  position: relative;
  padding-left: 32px;
}

.store-card::before {
  content: "";
  width: 25px;
  height: 100%;
  display: inline-block;
  position: absolute;
  background-image: url("/Themes/Emporium/Content/img/store-icon.svg");
  left: 0;
  top: 18px;
  background-repeat: no-repeat;
  background-size: contain;
}

.store-card:last-child {
  margin-bottom: 0;
}

.store-title {
  margin-bottom: 10px;
  font-size: 18px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.select-store-btn {
  background: #1f4d4f;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  font-weight: 600;
}

.select-store-btn:hover {
  background: #163a3c;
}

@media(max-width: 500px) {
  .stock-location-container .stock-location-btn {
    gap: 4px;
    padding: 8px 6px;
  }
}

.store-text {
  font-weight: bold;
}
