/* ============================================================
   MYDRAP custom overrides — lumise-custom.css
   Loaded always (no media restriction).
   Rules here apply to ALL viewport widths.
   ============================================================ */

/* ORDER SWAP: add-to-cart before cart icon — all viewports */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] {
	display: flex;
	align-items: center;
	float: right;
	gap: 6px;
}
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed {
	order: 1;
	float: none;
}
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-cart-options {
	order: 2;
	float: none;
	display: flex !important;
	align-items: center;
}

/* CART BUTTON: flex column + checkout label — all viewports */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] button#lumise-addToCart {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 10px;
	gap: 2px;
	background-color: #3f4652 !important;
	border-radius: 3px;
	margin: 0 !important;
}

/* Center both nav items vertically in the flex bar — all viewports */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-cart-options,
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed {
	align-self: center;
}
div#LumiseDesign div#lumise-navigations ul[data-block="right"] button#lumise-addToCart::after {
	content: '→ checkout';
	font-size: 9px;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

/* FLAG IMG — nav button only (>span>img, not dropdown imgs).
   Three cascades need countering:
   - stock sets float:left (collapses span, causes layout issues in flex nav)
   - stock/theme can set height:auto (overrides the 20px)
   - max-width can crush it in flex context
   en.png is 48×48px square; at height:20px the correct width is 20px.
   width:auto cannot be used here — flex container context causes it to
   compute incorrectly. Explicit 20px is required.
   All four declarations use !important. Do not remove any of them. */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li[data-tool="languages"] > span > img {
	height: 20px !important;
	width: 20px !important;
	float: none !important;
	max-width: none !important;
}

/* Fix divider (li[data-view="sp"]) vertical alignment broken by flex */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li[data-view="sp"] {
	align-self: center;
	position: static;
	top: auto;
	height: 24px;
}

/* CHECKOUT BUTTON: replace cart.svg with same line-art icon — all viewports */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] button#lumise-addToCart img {
	display: none;
}
div#LumiseDesign div#lumise-navigations ul[data-block="right"] button#lumise-addToCart::before {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	flex-shrink: 0;
}

/* ============================================================
   TABLET FIX (737px–1170px) — v3.0.25
   
   NAV LAYOUT:
   Convert nav bar to flex — eliminates float-wrap of the right
   ul at narrow tablet widths. margin-left:auto on the right ul
   replaces float:right.
   
   UNDO/REDO UL:
   Its li children have float:left (stock), collapsing the ul
   to 0px height as a flex child → items bleed out of the nav.
   overflow:hidden + height:54px contain them.
   
   BACK TO SHOP (li.back_mobile):
   Shown by the outer @media (max-width:1170px) block in
   responsive.css. We hide it in this range — it has no place
   in the tablet layout.
   
   ICON-ONLY BUTTONS:
   Translation strings like "ADD TO DESIGNER CART" are too wide
   at tablet widths. Use the same icon-only treatment as mobile:
   hide the button's text children (span, i), show cart icon via
   ::before and '+' via ::after. Matches mobile UX, prevents
   any layout overflow regardless of translation string length.
   ============================================================ */
@media only screen and (min-width: 737px) and (max-width: 1170px) {
	/* Flex nav — eliminates float-wrap */
	div#LumiseDesign div#lumise-navigations {
		display: flex;
		align-items: center;
	}
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] {
		float: none !important;
		margin-left: auto;
		margin-right: 13px;
	}
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed {
		margin: 0 4px !important;
		float: none !important;
		display: flex !important;
		align-items: center;
	}
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-cart-options {
		margin: 0 4px;
		float: none;
	}
	/* Contain floated li children in undo/redo ul */
	div#LumiseDesign div#lumise-navigations ul[data-block="left"][data-resp="undo-redo"] {
		overflow: hidden;
		height: 54px;
	}
	/* Hide back_mobile — shown by outer 1170px block, not wanted here.
	   Specificity must beat responsive.css: div#LumiseDesign div#lumise-navigations
	   ul[data-block]>li.back_mobile = 0,2,1,3. We match + !important wins. */
	div#LumiseDesign div#lumise-navigations ul[data-block] > li.back_mobile,
	div#LumiseDesign div#lumise-navigations ul[data-block] > li.back_mobile a {
		display: none !important;
	}
	/* Icon-only: hide translation text span only; keep i for the + character */
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action > span {
		display: none;
	}
	/* Show i element as + sign (overrides icon font ::before) — frees ::after for shimmer */
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action > i {
		display: inline-block;
		font-style: normal;
		font-size: 0; /* hide the icon font character itself */
	}
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action > i::before {
		content: '+' !important;
		font-family: sans-serif !important;
		font-size: 18px;
		font-weight: 400;
		color: #ffffff;
		line-height: 1;
	}
	/* Icon-only: cart icon ::before, ::after now free for shimmer */
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action {
		display: flex !important;
		align-items: center;
		justify-content: center;
		gap: 3px;
		height: 44px;
		padding: 0 10px;
		margin: 0;
	}
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action::before {
		content: '';
		display: inline-block;
		width: 18px;
		height: 18px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
		background-size: contain;
		background-repeat: no-repeat;
		background-position: center;
		flex-shrink: 0;
	}
}

/* Hide product price display — confusing, looks like cart count */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li > span.lumise-product-price {
	display: none;
}
div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li:has(> span.lumise-product-price) {
	display: none;
}

/* ============================================================
   BUTTON UX — v3.0.32

   Core rule: stock button#lumise-addToCart has margin:9px 0 0 10px
   and height:36px. The li is 54px tall. The 9px top margin is the
   exact vertical centering mechanism: (54-36)/2 = 9px.
   NEVER override height or margin without making the li a flex
   container first — otherwise the button overflows the nav bar.
   ============================================================ */

/* CHECKOUT: amber colour only.
   Stock height:36px + margin:9px = correctly centred. Do not touch. */
div#LumiseDesign div#lumise-navigations ul[data-block="right"] button#lumise-addToCart {
	background-color: #d4860e !important;
}

/* BACK TO SHOP: ghost text link, not a button */
div#LumiseDesign div#lumise-navigations li#back-btn a.back_shop {
	background: transparent !important;
	color: rgba(255, 255, 255, 0.5) !important;
	text-transform: none !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	letter-spacing: 0 !important;
	height: auto !important;
	line-height: 54px;
	padding: 0 8px !important;
	margin: 0 !important;
	border-radius: 0 !important;
}
div#LumiseDesign div#lumise-navigations li#back-btn a.back_shop::before {
	content: '← ';
}
div#LumiseDesign div#lumise-navigations li#back-btn a.back_shop:hover {
	background: transparent !important;
	color: rgba(255, 255, 255, 0.85) !important;
}

/* FLAG: primary_color.css colours this i element to match the nav.

/* ADD BUTTON — desktop only (>1170px): icon-above-label paired look.

   WHY li display:flex comes first:
   The li is 54px tall (stock). Without making it a flex container, any
   button height other than 36px (with 9px top margin) will overflow.
   Making the li a flex container lets us set button height freely —
   the button centres automatically via align-items:center.

   Tablet (737-1170px) already sets display:flex on li#lumise-proceed
   in the tablet block above. This rule covers desktop only. */
@media only screen and (min-width: 1171px) {
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed {
		display: flex !important;
		align-items: center;
	}
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		height: 44px;
		float: none;
		margin: 0;
		padding: 0 14px;
		gap: 2px;
	}
	/* Hide arrow icon only — keep <span> for translation string */
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action > i {
		display: none;
	}
	/* Plain cart SVG above the label */
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action::before {
		content: '';
		display: inline-block;
		width: 20px;
		height: 20px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
		background-size: contain;
		background-repeat: no-repeat;
		background-position: center;
		flex-shrink: 0;
	}
	/* <span> contains the translation string — style it small */
	div#LumiseDesign div#lumise-navigations ul[data-block="right"] > li#lumise-proceed button#lumise-cart-action > span {
		display: block;
		font-size: 9px;
		color: #ffffff;
		text-transform: uppercase;
		letter-spacing: .04em;
		font-weight: 500;
		line-height: 1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 110px;
	}
}

/* ============================================================
   NUDGE — v3.0.44
   ::after is now free on ALL viewports (+ moved to i::before).
   Shimmer works on desktop, tablet, and mobile uniformly.
   Glow: backlight style (diffuse outer + inset inner, no ring).
   ============================================================ */

@keyframes lumise-nudge-shimmer {
  0%   { left: -40%; }
  100% { left: 120%; }
}

@keyframes lumise-nudge-glow {
  0%, 100% {
    box-shadow:
      0 0 10px 3px  rgba(255, 255, 255, 0.18),
      inset 0 0 8px 2px rgba(255, 255, 255, 0.06);
  }
  50% {
    box-shadow:
      0 0 22px 9px  rgba(255, 255, 255, 0.45),
      inset 0 0 14px 4px rgba(255, 255, 255, 0.13);
  }
}

/* Shimmer + glow: all viewports. Button needs position:relative
   (not in stock CSS for lumise-btn-primary) and overflow:hidden. */
div#LumiseDesign button#lumise-cart-action.lumise-nudge-active {
  position: relative;
  overflow: hidden;
  animation: lumise-nudge-glow 1.6s ease-in-out 2.2s infinite;
}

/* Promote button content above the shimmer */
div#LumiseDesign button#lumise-cart-action.lumise-nudge-active > span,
div#LumiseDesign button#lumise-cart-action.lumise-nudge-active > i {
  position: relative;
  z-index: 1;
}

/* Shimmer pseudo-element: renders under content (z-index:0 < z-index:1 above) */
div#LumiseDesign button#lumise-cart-action.lumise-nudge-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  z-index: 0;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 80%
  );
  animation: lumise-nudge-shimmer 1.1s ease-in-out 0s 2;
}
