/* SM Laundry - CleanCloud UI overrides
   Loaded after CleanCloud's stylesheet so these rules take precedence. */

/* Hide CleanCloud desktop footer on the embedded order page. */
#__cc_dummy__ { display: none; }
.__cc_desktopFooter.__cc_desktopFooter--center {
  display: none !important;
}

/* Header logo/profile overlap fix. */
#myStoreContainer .__cc_order-flow-wrapper__nav-logo {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 44px !important;
  max-height: 44px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 64px !important;
  margin: 0 14px !important;
  padding: 0 !important;
  z-index: 1 !important;
}

#myStoreContainer .__cc_order-flow-wrapper__nav-logo img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 60px !important;
  max-height: 40px !important;
  object-fit: contain !important;
}

#myStoreContainer .__cc_order-flow-wrapper__right {
  position: relative !important;
  z-index: 5 !important;
  min-width: 110px !important;
  flex-shrink: 0 !important;
}

/* ------------------------------------------------------------------
   Arabic / RTL CleanCloud item alignment
   We intentionally do NOT depend on Vue's generated data-v-* value,
   because CleanCloud can change that value on future releases.
   ------------------------------------------------------------------ */
html[lang="ar"] #myStoreContainer .__cc_items,
html[lang="ar"] #myStoreContainer .__cc_items__item,
html[lang="ar"] #myStoreContainer .__cc_items__item-list {
  direction: rtl !important;
}

/* The three selectors requested for Arabic mode. */
html[lang="ar"] #myStoreContainer .__cc_items__item h3,
html[lang="ar"] #myStoreContainer .__cc_items__item-list,
html[lang="ar"] #myStoreContainer .__cc_items strong {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext !important;
}

/* Give the text block real width so text-align:right is visible. */
html[lang="ar"] #myStoreContainer .__cc_items__item-list {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

html[lang="ar"] #myStoreContainer .__cc_items__item h3,
html[lang="ar"] #myStoreContainer .__cc_items strong,
html[lang="ar"] #myStoreContainer .__cc_items__item-list h3,
html[lang="ar"] #myStoreContainer .__cc_items__item-list strong,
html[lang="ar"] #myStoreContainer .__cc_items__item-list p,
html[lang="ar"] #myStoreContainer .__cc_items__item-list span {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* English mode restores CleanCloud's normal LTR behavior. */
html[lang="en"] #myStoreContainer .__cc_items,
html[lang="en"] #myStoreContainer .__cc_items__item,
html[lang="en"] #myStoreContainer .__cc_items__item-list {
  direction: ltr !important;
}

html[lang="en"] #myStoreContainer .__cc_items__item h3,
html[lang="en"] #myStoreContainer .__cc_items__item-list,
html[lang="en"] #myStoreContainer .__cc_items strong,
html[lang="en"] #myStoreContainer .__cc_items__item-list h3,
html[lang="en"] #myStoreContainer .__cc_items__item-list strong,
html[lang="en"] #myStoreContainer .__cc_items__item-list p,
html[lang="en"] #myStoreContainer .__cc_items__item-list span {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: normal !important;
}

html[lang="en"] #myStoreContainer .__cc_items__item-list {
  align-items: flex-start !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

@media (max-width: 700px) {
  #myStoreContainer .__cc_order-flow-wrapper__nav-logo {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    flex-basis: 52px !important;
    margin: 0 8px !important;
  }

  #myStoreContainer .__cc_order-flow-wrapper__nav-logo img {
    max-width: 48px !important;
    max-height: 36px !important;
  }

  #myStoreContainer .__cc_order-flow-wrapper__right {
    min-width: 96px !important;
  }
}
