﻿/* Grouped Flyout Shopping Cart Styles - Simplex Theme Color Scheme */

/* Simplex Color Variables */
:root {
  --simplex-red: #ea5648;
  --simplex-dark-red: #ca3628;
  --simplex-grey-black: #333333;
  --simplex-light-grey: #f9f9f9;
}

/* Professional Flyout Container - Enhanced Visual Hierarchy */
.flyout-cart-grouped {
  position: absolute;
  width: 480px;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  z-index: 1060;
  top: 100%;
  right: 0;
  margin-top: 0px;
  overflow: hidden;
  font-family: var(--font-default);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.flyout-cart-grouped-shopping-cart {
  font-size: 13px;
  max-height: 400px;
  overflow-y: auto;
  background-color: #ffffff;
}

/* Professional Flyout Header - Simplex Typography Standards */
.flyout-cart-header {
  display: grid;
  grid-template-columns: 36px 1fr 55px 85px; /* Increased qty and amount columns */
  padding: 12px 16px;
  font: 600 14px var(--font-default);
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
  border-bottom: 2px solid #e9ecef;
  border-radius: 6px 6px 0 0;
  align-items: center;
  gap: 8px;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flyout-cart-header-product a {
  color: var(--simplex-red);
  text-decoration: none;
  font-weight: bold;
  font-family: var(--font-default);
  font-size: 14px;
}

.flyout-cart-header-product a:hover {
  color: var(--simplex-dark-red);
  text-decoration: none;
}

.flyout-cart-header-qty {
  text-align: center;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-default);
  text-transform: uppercase;
}

.flyout-cart-header-amount {
  text-align: right;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-default);
  text-transform: uppercase;
}

.flyout-cart-header-spacer {
  /* Empty spacer to align with image column */
}

/* Clean empty cart styling - Simplex Standards */
.flyout-cart-empty-cart {
  padding: 24px;
  text-align: center;
  color: #666;
  font-size: 14px;
  font-weight: normal;
  font-family: var(--font-default);
}

/* Professional Product Grouping - Enhanced Spacing */
.flyout-cart-grouped-items {
  padding: 0;
  background: #fff;
}

.flyout-cart-product-group {
  border-bottom: 2px solid #e9ecef;
  background: #fff;
  transition: background-color 0.1s ease;
}

.flyout-cart-product-group:hover {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}

.flyout-cart-product-group:last-child {
  border-bottom: none;
}

/* Professional Product Header - Simplex Typography Standards */
.flyout-cart-product-header {
  display: grid;
  grid-template-columns: 36px 1fr 55px 85px; /* Increased qty and amount columns */
  padding: 10px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #f2f4f5 100%);
  border-bottom: 1px solid #dee2e6;
  align-items: center;
  font: 500 14px var(--font-default);
  gap: 8px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5);
}

.flyout-cart-product-name {
  color: #444;
  font-weight: 600;
  font-family: var(--font-default);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.3;
}

.flyout-cart-product-name .price {
  color: var(--simplex-grey-black);
  font-weight: 600;
  font-family: var(--font-default);
  font-size: 14px;
}

.flyout-cart-product-qty {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-default);
  color: #777;
}

.flyout-cart-product-amount {
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-default);
  color: var(--simplex-grey-black);
}

/* Professional Variants Container - Enhanced Visual Hierarchy */
.flyout-cart-variants-container {
  background: linear-gradient(135deg, #fafbfc 0%, #f5f7f8 100%);
  border-top: 1px solid #dee2e6;
  border-left: 3px solid var(--simplex-red);
  box-shadow: inset 2px 0 4px rgba(74, 178, 241, 0.06);
}

/* Professional Variant Rows - Simplex Typography Standards */
.flyout-cart-variant-row {
  display: grid;
  grid-template-columns: 36px 1fr 55px 85px; /* Increased qty and amount columns */
  align-items: start;
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid #e9ecef;
  gap: 8px;
  min-height: 44px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(250, 251, 252, 0.9) 100%
  );
  transition: background-color 0.1s ease;
}

.flyout-cart-variant-row:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(248, 249, 250, 1) 100%
  );
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.flyout-cart-variant-row:last-child {
  border-bottom: none;
  border-radius: 0 0 0 3px;
}

/* Professional Variant Image - Enhanced Visual Design */
.flyout-cart-variant-image {
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(135deg, #f8f9fa 0%, #f2f4f5 100%);
  border: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s ease;
}

.flyout-cart-variant-image:hover {
  transform: scale(1.02);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.flyout-cart-variant-image img {
  width: 23px;
  height: 30px;
  object-fit: contain;
  border-radius: 3px;
}

/* Variant info with color/pack and size breakdown - Simplex Standards */
.flyout-cart-variant-info {
  color: #555;
  font-size: 13px;
  line-height: 1.5;
  padding-right: 10px;
}

/* Professional Color and Pack Info - Simplex Typography Standards */
.flyout-cart-color-pack-line {
  color: #343a40;
  font: 700 13px var(--font-default);
  margin-bottom: 2px;
  line-height: 1.3;
  height: 16px;
  display: flex;
  align-items: center;
}

.pack-info {
  color: var(--simplex-grey-black);
  font: 600 12px var(--font-default);
  margin-left: 6px;
  background: linear-gradient(
    135deg,
    rgba(74, 178, 241, 0.12) 0%,
    rgba(74, 178, 241, 0.08) 100%
  );
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(74, 178, 241, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Professional Size Breakdown - Simplex Typography Standards */
.flyout-cart-size-breakdown-line {
  margin-left: 12px;
  color: #495057;
  font: 500 12px var(--font-default);
  line-height: 1.4;
  margin-top: 2px;
  display: block;
  word-wrap: break-word; /* Allow wrapping if too long */
  overflow-wrap: break-word; /* Modern browsers */
}

/* Mode-specific styling */
.flyout-cart-pack-mode .flyout-cart-size-breakdown-line {
  font-weight: 400;
}

.flyout-cart-manual-mode .flyout-cart-size-breakdown-line {
  font-weight: 400;
}

/* Professional Quantity Column - Simplex Typography Standards */
.flyout-cart-variant-qty {
  text-align: center;
  font: 600 13px var(--font-default);
  color: #495057;
  align-self: start;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  background: linear-gradient(
    135deg,
    rgba(74, 178, 241, 0.08) 0%,
    rgba(74, 178, 241, 0.05) 100%
  );
  border-radius: 3px;
  padding: 3px 6px;
  border: 1px solid rgba(74, 178, 241, 0.15);
  letter-spacing: 0.2px;
}

/* Professional Amount Column - Simplex Typography Standards */
.flyout-cart-variant-amount {
  text-align: right;
  font: 600 13px var(--font-default);
  color: var(--simplex-grey-black);
  align-self: start;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 18px;
  background: linear-gradient(
    135deg,
    rgba(76, 177, 124, 0.08) 0%,
    rgba(76, 177, 124, 0.05) 100%
  );
  border-radius: 3px;
  padding: 3px 6px;
  border: 1px solid rgba(76, 177, 124, 0.15);
  letter-spacing: 0.2px;
}

/* Professional Flyout Footer - Simplex Typography Standards */
.flyout-cart-footer {
  display: grid;
  grid-template-columns: 36px 1fr 55px 85px; /* Increased qty and amount columns */
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
  border-top: 2px solid #e9ecef;
  border-radius: 0 0 6px 6px;
  align-items: center;
  font-size: 14px;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.flyout-cart-subtotal-container {
  grid-column: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  justify-self: end;
  width: fit-content;
  max-width: 80px;
}

/* Subtotal label removed - now showing amount only */

.flyout-cart-subtotal-amount {
  font-weight: 700;
  color: var(--simplex-grey-black);
  font-size: 14px;
  font-family: var(--font-default);
  white-space: nowrap;
}

.flyout-cart-footer-buttons {
  grid-column: 2;
  display: flex;
  gap: 0.625rem;
  justify-content: flex-start;
}

.flyout-cart-product-spacer {
  /* Empty spacer to align with variant image column */
}

/* View Cart Button - TRUE nopCommerce 4.80 SEARCH Button Standards */
.flyout-cart-button {
  /* nopCommerce 4.80 SEARCH Button Typography */
  font-family: var(--font-default);
  font-size: 14px;
  font-weight: normal;
  line-height: normal;
  text-transform: uppercase;

  /* nopCommerce 4.80 SEARCH Button Sizing */
  height: 36px;
  min-height: 36px;
  padding: 0 15px;
  box-sizing: border-box;

  /* nopCommerce 4.80 SEARCH Button Visual Standards */
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;

  /* nopCommerce 4.80 SEARCH Button Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* nopCommerce 4.80 SEARCH Button Colors */
  background-color: var(--simplex-grey-black);
  color: #fff;

  /* Simple transition like SEARCH button */
  transition: background-color 0.2s ease;
}

.flyout-cart-button:hover,
.flyout-cart-button:focus {
  background-color: #222222;
  color: #fff;
  text-decoration: none;
  outline: none;
}

.flyout-cart-button:active {
  background-color: #222222;
  color: #fff;
}

/* Checkout Button - TRUE nopCommerce 4.80 SEARCH Button Standards with Success Color */
.flyout-cart-checkout-button {
  /* nopCommerce 4.80 SEARCH Button Typography */
  font-family: var(--font-default);
  font-size: 14px;
  font-weight: normal;
  line-height: normal;
  text-transform: uppercase;

  /* nopCommerce 4.80 SEARCH Button Sizing */
  height: 36px;
  min-height: 36px;
  padding: 0 15px;
  box-sizing: border-box;

  /* nopCommerce 4.80 SEARCH Button Visual Standards */
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;

  /* nopCommerce 4.80 SEARCH Button Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* nopCommerce 4.80 SEARCH Button Colors - Success Green */
  background-color: var(--simplex-red);
  color: #fff;

  /* Simple transition like SEARCH button */
  transition: background-color 0.2s ease;
}

.flyout-cart-checkout-button:hover,
.flyout-cart-checkout-button:focus {
  background-color: #3a8b63;
  color: #fff;
  text-decoration: none;
  outline: none;
}

.flyout-cart-checkout-button:active {
  background-color: #2d6b4d;
  color: #fff;
}

/* Clean scrollbar */
.flyout-cart-grouped-shopping-cart::-webkit-scrollbar {
  width: 6px;
}

.flyout-cart-grouped-shopping-cart::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.flyout-cart-grouped-shopping-cart::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.flyout-cart-grouped-shopping-cart::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* ====================================================================
   OLD RESPONSIVE STYLES - REPLACED BY flyout-cart-responsive.css
   These styles have been moved to a dedicated responsive CSS file
   for better organization and comprehensive multi-resolution support.
   ==================================================================== */

/* @media (max-width: 576px) { ... } - See flyout-cart-responsive.css */

/* === Color Variant Unavailability (deleted attribute value) === */
.flyout-cart-variant-row.color-variant-unavailable {
    opacity: 0.55;
    border-left: 3px solid #e8a317;
    background-color: #fffdf5;
}
.color-unavailable-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #b8860b;
    background: #fff8e1;
    border: 1px solid #f5c842;
    border-radius: 3px;
    padding: 1px 6px;
}
/* Placeholder shown while the flyout body is being fetched.
   Language-neutral on purpose: the body arrives in well under a second for a normal
   cart, and a large B2B cart would otherwise stare at an empty panel. */
.flyout-cart-wrapper[data-flyout-state="loading"] {
  min-height: 90px;
}
.flyout-cart-loading {
  display: block;
  margin: 36px auto;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  animation: flyout-cart-spin 0.8s linear infinite;
}
@keyframes flyout-cart-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .flyout-cart-loading { animation: none; }
}
