/* Loading state styles */
.delivery-options-loading {
  position: relative;
}

.delivery-options-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  z-index: 5;
  border-radius: var(--radius);
}

.delivery-options-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  z-index: 6;
}

.delivery-options-spinner::after {
  content: '';
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--primary-green);
  border-color: var(--primary-green) transparent var(--primary-green) transparent;
  animation: delivery-spinner 1.2s linear infinite;
}

@keyframes delivery-spinner {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Add styles for buttons row */
.store-buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  width: 100%;
}

/* Adjust existing button styles */
.view-map-btn {
  padding: 0;
  margin: 0;
}

.store-actions {
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .store-buttons-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .store-actions {
    width: 100%;
  }

  .change-store-btn {
    width: 100%;
  }
}

/* Main Content HTML*/
:root {
  --primary-green: #00583d;
  --light-green: #007c56;
  --dark-green: #003f2c;
  --pale-green: #e6f2ef;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #adb5bd;
  --gray-700: #495057;
  --gray-900: #212529;
  --white: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.2s ease;
  --radius: 0.5rem;
}

.delivery-options-container {
  max-width: 100%;
  margin: 1.5rem 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  position: relative;
}

.delivery-options-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.delivery-radio-container {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.delivery-radio-option {
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--gray-300);
}

.delivery-radio-option:last-child {
  border-bottom: none;
}

.delivery-radio-input {
  margin-right: 1rem;
  margin-top: 0.25rem;
  accent-color: var(--primary-green);
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.delivery-radio-content {
  flex: 1;
}

.delivery-radio-label {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 1rem;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.delivery-radio-label-icon {
  margin-right: 0.5rem;
  color: var(--primary-green);
  width: 18px;
  height: 18px;
}

.delivery-radio-sublabel {
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-top: 0.25rem;
}

.stock-status {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.stock-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.stock-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.stock-dot.in-stock {
  background-color: var(--primary-green);
}

.stock-text.in-stock {
  color: var(--primary-green);
}

.stock-dot.low-stock {
  background-color: var(--warning);
}

.stock-text.low-stock {
  color: #92400e;
}

.stock-dot.not-available {
  background-color: var(--danger);
}

.stock-text.not-available {
  color: var(--danger);
}

.check-warehouse-btn {
  color: var(--primary-green);
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  margin-left: 1rem;
  cursor: pointer;
  text-decoration: underline;
}

.check-warehouse-btn:hover {
  color: var(--light-green);
}

.no-store-message {
  color: var(--gray-700);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.store-details-section {
  margin-top: 15px;
}

.warehouse-details-row {
  padding: 1rem;
  border-top: 1px solid var(--gray-300);
}

.store-hidden {
  display: none;
}

.store-section {
  background-color: var(--gray-100);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}

.store-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.store-info {
  display: flex;
  align-items: center;
}

.store-icon-wrapper {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--pale-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.store-icon {
  color: var(--primary-green);
  width: 1.25rem;
  height: 1.25rem;
}

.store-text h3 {
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  font-size: 1.1rem;
}

.store-address {
  margin: 0.25rem 0 0;
  color: var(--gray-700);
  font-size: 0.9rem;
  line-height: 1.5;
}

.store-hours {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.store-hours-icon {
  margin-right: 0.5rem;
  width: 16px;
  height: 16px;
}

.pickup-status {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-green);
}

.pickup-status-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  margin-right: 0.5rem;
  background-color: var(--primary-green);
}

.pickup-status-dot.in-stock {
  background-color: var(--primary-green);
}

.pickup-status-dot.low-stock {
  background-color: var(--warning);
}

.pickup-status-dot.not-available {
  background-color: var(--danger);
}

.change-store-btn {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  background-color: var(--primary-green);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.change-store-btn:hover {
  background-color: var(--light-green);
}

.store-map {
  margin-top: 1rem;
  height: 200px;
  margin-bottom: 1rem;
  display: none;
}

.store-map.visible {
  display: block;
}

.store-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
}

.view-map-btn {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-green);
  background: none;
  border: none;
  padding: 0.5rem 0;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  text-decoration: underline;
}

.view-map-btn:hover {
  color: var(--light-green);
}

.view-map-btn svg {
  margin-left: 0.25rem;
}

/* Focus and active state overrides */
.delivery-options-container button,
.delivery-options-container input {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.delivery-options-container button:focus,
.delivery-options-container button:active,
.delivery-options-container input:focus,
.delivery-options-container input:active {
  outline: none !important;
  box-shadow: none !important;
  border-color: inherit !important;
}

/* Responsive styles */
@media (max-width: 768px) {
  .delivery-radio-option {
    padding: 0.75rem;
  }
}

@media (max-width: 576px) {
  .store-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-actions {
    margin-top: 1rem;
    width: 100%;
  }

  .change-store-btn {
    width: 100%;
  }

  .delivery-radio-label {
    font-size: 0.9rem;
  }

  .delivery-radio-input {
    width: 1rem;
    height: 1rem;
  }
}

@media (max-width: 375px) {
  .delivery-options-title {
    font-size: 1.25rem;
  }

  .delivery-radio-option {
    padding: 0.5rem;
  }
}

/* Newly added css */
.hidden {
  display: none;
}

.disabled {
  color: grey;
  opacity: 0.5;
  pointer-events: none;
}

.other-warehouse-content {
  max-width: 24rem;
  margin-top: 1rem;
}

.other-warehouse-content i {
  font-style: normal;
  color: var(--primary-green);
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
}

.other-warehouse-content span {
  padding: 5px 5px;
  background-color: #e0e0e0;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #333;
  display: inline-block;
  margin: 0.1rem;
  cursor: pointer;
  width: auto;
}

/* New Tab Changes CSS */
.tab-buttons {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 8px; /* Rounded corners of the entire group */
  overflow: hidden;   /* So border-radius is respected */
}

.tab-button {
  flex: 1;
  text-align: center;
  cursor: pointer;
  border: none;
  padding: 10px 15px;
  font-weight: 500;
  background-color: white;
  transition: all 0.2s ease;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  will-change: transform, box-shadow, border-bottom-color, color, background-color;
}

.tab-button:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 25%;
  right: 0;
  height: 50%;
  width: 1px;
  background-color: #ddd; /* vertical separator */
}

.tab-button svg {
  stroke: black;
  transition: stroke 0.4s ease, transform 0.4s ease;
}

.tab-button:hover:not(:disabled):not(.active) {
  background-color: #f9f9f9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); /* subtle lift only on hover */
  transform: scale(1.02);
}

.tab-button:hover:not(:disabled):not(.active) svg {
  transform: scale(1.1);
}

.tab-button.active {
  border-bottom: 3px solid #00583d;
  color: #00583d;
  background-color: #f0faf7;
  box-shadow: none; /* No shadow on active → looks clean */
}

.tab-button.active svg {
  stroke: #00583d;
}

.tab-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  color: #999;
  background-color: #fafafa;
}

.tab-button:disabled svg {
  stroke: #999;
}

.tab-button:focus,
.tab-button:active {
  outline: none;
  box-shadow: none;
}

.tab-button:focus,
.tab-button:active {
  outline: none !important;
  box-shadow: none !important;
}

.tab-button.active:focus,
.tab-button.active:active {
  border-bottom: 3px solid #00583d !important;
  color: #00583d !important;
  background-color: #f0faf7 !important;
}

.delivery-radio-option {
  display: none;
}

.delivery-radio-input:checked+.delivery-radio-content+#delivery-availability {
  display: block;
}

.delivery-radio-input:checked+.delivery-radio-content+#pickup-content {
  display: block;
}

/* Available for delivery text CSS */
.shipping-status.available {
  color: #00583d;
  font-weight: 600;
}

.shipping-status,
.shipping-status span {
  display: flex;
}

.shipping-status {
  display: flex;
  align-items: center;
  border: 1px solid #00583d !important;
  border-radius: 5px;
  background-color: #FDF8F5;
  padding: 10px 25px;
  margin-top: 10px;
}

.cnc__available-icon {
  height: 24px;
  margin-right: 10px;
}