/* =============================================================================
   MAGENTO OVERRIDES FOR SHARED COMPONENTS
   Minimal overrides to integrate shared header/footer in Magento Luma theme
   ============================================================================= */

/* -----------------------------------------------------------------------------
   CSS variable overrides — shared-base.css (loaded in <body>) overrides the
   theme variables from _variables.less (loaded in <head>). Re-apply the correct
   values here since magento-overrides.css loads AFTER shared-base.css.
   Only the 10 variables that actually diverge between the two sources are listed.
   ----------------------------------------------------------------------------- */
:root {
    /* Typography */
    --font-font-family-primary: 'Inter', sans-serif;
    --font-font-family-secondary: Windsor Pro;
    --font-font-family-tertiary: acumin-pro-condensed;
    /* Note: --font-title-title-4-weight intentionally left at 750 (shared-base.css value).
       With 750, Windsor Pro resolves to WindsorStdUltraHeavyD (WindsorD-UltHea) via
       _typography_extend.less, matching the Fractal mockup. Setting 800 would instead
       pick WindsorProXBoldCn.TTF from fonts.css (loaded in shared-header), which diverges. */

    /* Colors */
    --color-red-600: #eb1b17;
    --primary-brand-600: #E4032F;

    /* Button ghost primary hover */
    --button-color-primary-ghost-background-hover: var(--secondary-brand-600);
    --button-color-primary-ghost-border-hover: var(--secondary-brand-600);
    --button-color-primary-ghost-text-hover: var(--neutral-0);

    /* Z-index */
    --zindex-sticky: 600;
}

/* -----------------------------------------------------------------------------
   Page Header Layout
   ----------------------------------------------------------------------------- */
.page-header {
  margin: 0;
  padding: 0;
  border: none;
}

/* -----------------------------------------------------------------------------
   Page Footer Layout
   ----------------------------------------------------------------------------- */
.page-footer {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.footer-container,
.footer.content {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

shared-footer {
  display: block;
  margin: 0;
  padding: 0;
}

/* -----------------------------------------------------------------------------
   Reset Magento link styles inside shared components
   ----------------------------------------------------------------------------- */
shared-header a,
shared-footer a {
  color: inherit;
  text-decoration: none;
}

shared-header a:hover,
shared-footer a:hover {
  color: inherit;
  text-decoration: none;
}

/* -----------------------------------------------------------------------------
   Reset Magento .block margin inside shared components
   ----------------------------------------------------------------------------- */
shared-header .block,
shared-footer .block {
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Reset Magento button styles inside shared components
   ----------------------------------------------------------------------------- */
shared-header button,
shared-footer button {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

shared-header button:hover,
shared-footer button:hover,
shared-header button:focus,
shared-header button:active,
shared-footer button:focus,
shared-footer button:active {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

shared-header a.c-button--secondary.c-button--outlined {
  color: var(--secondary-brand-700);
}
shared-header a.c-button--primary.c-button--solid {
  color: var(--button-color-primary-solid-text-base);
}

/* -----------------------------------------------------------------------------
   Fix: a:visited:not(:hover) (specificity 0,2,1) overrides .c-button (0,2,0)
   Scoped to pages where visited order links appear as buttons
   ----------------------------------------------------------------------------- */
.sales-order-history a.c-button--primary.c-button--solid:visited:not(:hover) {
  color: var(--button-color-primary-solid-text-base);
}

/* -----------------------------------------------------------------------------
   Hamburger menu icon - Fix iOS Safari blue color (DEL-524)
   iOS Safari defaults <button> color to system accent (blue).
   Explicit color ensures dark icon on all platforms.
   ----------------------------------------------------------------------------- */
.header-hamburger {
  color: var(--header-text, #1d1d1d) !important;
}

/* -----------------------------------------------------------------------------
   Store locator icon - Force hidden on mobile (DEL-524)
   Prevents .c-button display:inline-flex from overriding display:none
   ----------------------------------------------------------------------------- */
.header-tool--location {
  display: none !important;
}
@media only screen and (min-width: 1280.2px) {
  .header-tool--location {
    display: flex !important;
  }
}

/* -----------------------------------------------------------------------------
   User connected icon — iOS workaround (DEL-524)
   Injected <img> replaces ::after which doesn't render on iOS WebKit buttons
   ----------------------------------------------------------------------------- */
.header-tool--user-connected-img {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  pointer-events: none;
  z-index: 1;
}

/* -----------------------------------------------------------------------------
   Cart badge - Hide when empty (DEL-524)
   ----------------------------------------------------------------------------- */
shared-header .header-tool__badge:empty,
shared-header .header-tool__badge[hidden],
shared-header .header-cta__badge[hidden] {
  display: none;
}

/* -----------------------------------------------------------------------------
   Hamburger menu icon toggle (menu/close)
   ----------------------------------------------------------------------------- */
.header-hamburger .icon {
  width: 2.4rem;
  height: 2.4rem;
}

/* When menu is open: hide menu icon, show close icon via ::before */
.header-wrapper.is-menu-open .header-hamburger .icon {
  display: none;
}

.header-wrapper.is-menu-open .header-hamburger::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  background-color: currentcolor;
  mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.6465 5.64648C17.8417 5.45122 18.1583 5.45122 18.3535 5.64648C18.5488 5.84175 18.5488 6.15825 18.3535 6.35352L12.707 12L18.3535 17.6465C18.5488 17.8417 18.5488 18.1583 18.3535 18.3535C18.1583 18.5488 17.8417 18.5488 17.6465 18.3535L12 12.707L6.35352 18.3535C6.15825 18.5488 5.84175 18.5488 5.64648 18.3535C5.45122 18.1583 5.45122 17.8417 5.64648 17.6465L11.293 12L5.64648 6.35352C5.45122 6.15825 5.45122 5.84175 5.64648 5.64648C5.84175 5.45122 6.15825 5.45122 6.35352 5.64648L12 11.293L17.6465 5.64648Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.6465 5.64648C17.8417 5.45122 18.1583 5.45122 18.3535 5.64648C18.5488 5.84175 18.5488 6.15825 18.3535 6.35352L12.707 12L18.3535 17.6465C18.5488 17.8417 18.5488 18.1583 18.3535 18.3535C18.1583 18.5488 17.8417 18.5488 17.6465 18.3535L12 12.707L6.35352 18.3535C6.15825 18.5488 5.84175 18.5488 5.64648 18.3535C5.45122 18.1583 5.45122 17.8417 5.64648 17.6465L11.293 12L5.64648 6.35352C5.45122 6.15825 5.45122 5.84175 5.64648 5.64648C5.84175 5.45122 6.15825 5.45122 6.35352 5.64648L12 11.293L17.6465 5.64648Z' fill='black'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}

/* -----------------------------------------------------------------------------
   User authenticated status indicator - user-connected icon with green badge
   Same as storefront: hide user icon and show user-connected.svg
   ----------------------------------------------------------------------------- */
.header-tool--user {
  position: relative;
  border-radius: 50%;
  overflow: visible !important;
  appearance: none;
  -webkit-appearance: none;
  /* Force 48px dimension to match storefront */
  width: 4.8rem !important;
  height: 4.8rem !important;
  min-width: 4.8rem !important;
  min-height: 4.8rem !important;
}

/* Hide status indicator since we use user-connected icon */
.header-tool__status-indicator {
  display: none !important;
}

/* When authenticated: hide normal user icon */
.header-tool--user.is-authenticated .icon {
  display: none !important;
}

/* When authenticated: show user-connected icon with integrated green badge */
.header-tool--user.is-authenticated::after {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  background-image: url("../icons/user-connected.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

/* -----------------------------------------------------------------------------
   Footer desktop border fixes
   ----------------------------------------------------------------------------- */
@media only screen and (min-width: 1024.2px) {
  .footer__main {
    justify-content: space-around !important;
    gap: 2.4rem !important;
  }

  .footer__social {
      border-bottom: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .footer__aside {
    border-bottom: none !important;
  }
}

@media only screen and (min-width: 1440px) {
  .footer__main {
    gap: 11.2rem !important;
  }
}

/* -----------------------------------------------------------------------------
   Ghost button hover state (override Magento)
   ----------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  shared-header .c-button--primary.c-button--ghost:hover:not(:disabled),
  shared-header .header-tool:hover:not(:disabled),
  shared-header .header-tool--user:hover:not(:disabled),
  shared-header .header-tool--location:hover:not(:disabled) {
      background: var(--neutral-pasta-100) !important;
      border-color: var(--neutral-pasta-100) !important;
      color: var(--neutral-950) !important;
  }
}

/* -----------------------------------------------------------------------------
   User Account Drawer - Override Magento button styles
   Exclude .user-account-drawer__card--loyalty which has its own background (#C0EBA6)
   ----------------------------------------------------------------------------- */
.user-account-drawer button:not(.user-account-drawer__card--loyalty),
.user-account-drawer button:not(.user-account-drawer__card--loyalty):hover,
.user-account-drawer button:not(.user-account-drawer__card--loyalty):focus,
.user-account-drawer button:not(.user-account-drawer__card--loyalty):active {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.user-account-drawer__card--loyalty {
  background: #C0EBA6 !important;
}

.user-account-drawer__logout:hover {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  color: inherit !important;
}

/* -----------------------------------------------------------------------------
   Mobile menu - Order and Reserve a table buttons
   Force large size (48px) to match storefront
   ----------------------------------------------------------------------------- */
.header-nav-panel-cta .dropin-button {
  min-height: 4.8rem !important;
  padding: 1rem 2.4rem !important;
  font-size: 1.6rem !important;
  line-height: 1.5 !important;
}

.header-nav-panel-cta .dropin-button--large,
.header-nav-panel-cta .dropin-button--full {
  width: 100% !important;
  min-height: 4.8rem !important;
  padding: 1rem 2.4rem !important;
  font-size: 1.6rem !important;
}

.header-nav-panel-cta .dropin-button .icon,
.header-nav-panel-cta .dropin-button svg {
  width: 2.4rem !important;
  height: 2.4rem !important;
}

.header-nav-panel-cta .dropin-button span {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
}

.partoo-page-view .header-mobile-cta,
.clubspaghetto-kids-register .header-mobile-cta,
.clubspaghetto-index-index .header-mobile-cta,
.customer-account-forgotpasswordconfirmation .header-mobile-cta,
.customer-auth-passwordresetnotification .header-mobile-cta,
.customer-account-loginpassword .header-mobile-cta,
.customer-account-createpassword .header-mobile-cta,
.customer-account-verifycode .header-mobile-cta,
.customer-account-login .header-mobile-cta,
.customer-account-create .header-mobile-cta {
  display: none !important;
}

body.account .c-breadcrumbs a {
  color: var(--color-text-alt-default);
}


/* -----------------------------------------------------------------------------
   Body font size - Override Magento default to match storefront (16px)
    Note: this is needed because Magento's default body font size is 14px, while storefront uses 16px
   ----------------------------------------------------------------------------- */

body {
  font-size: var(--font-body-text-size-md);
}
