/* Unicorn Beauty app — website side styles (popup, floating button, banner, sold-out marker). */

/* ====================================================================
   INSTALL POPUP  (bottom sheet on phones, centred card on desktop)
   ==================================================================== */
.ubp, .ubp * { box-sizing: border-box; }
.ubp {
  --ub-c: #7b3fe4;
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: flex-end; justify-content: center;
  direction: rtl; font-family: inherit; line-height: 1.6;
}
.ubp__backdrop {
  position: absolute; inset: 0; background: rgba(18, 8, 40, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: ubpFade .3s both;
}
.ubp__card {
  position: relative; width: 100%; max-width: 440px; overflow: hidden;
  background: #fff; color: #2a1f4d; text-align: center;
  border-radius: 32px 32px 0 0; padding: 0 22px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -24px 70px -20px rgba(18, 8, 40, .6);
  animation: ubpUp .45s cubic-bezier(.2, .9, .3, 1) both;
}
@media (min-width: 640px) {
  .ubp { align-items: center; }
  .ubp__card { border-radius: 32px; padding-bottom: 22px; animation-name: ubpPop; }
}
.ubp.is-out .ubp__backdrop { animation: ubpFadeOut .3s both; }
.ubp.is-out .ubp__card { animation: ubpDown .3s ease-in both; }

.ubp__x {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .25); color: #fff; font-size: 24px; line-height: 36px; padding: 0;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ubp__x:hover { background: rgba(255, 255, 255, .4); }

.ubp__hero {
  position: relative; margin: 0 -22px 16px; padding: 38px 0 30px; overflow: hidden;
  background: var(--ub-c);
  background:
    radial-gradient(90% 120% at 50% -10%, color-mix(in srgb, var(--ub-c) 45%, #fff) 0%, transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--ub-c) 85%, #fff), var(--ub-c) 50%, color-mix(in srgb, var(--ub-c) 68%, #000));
}
.ubp__ic { position: relative; display: inline-block; animation: ubpBounce .9s .15s cubic-bezier(.2, .9, .25, 1) both; }
.ubp__ic::before {
  content: ""; position: absolute; inset: -22px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  animation: ubpGlow 2.4s 1s ease-in-out infinite;
}
.ubp__icon {
  position: relative; display: block; width: 84px; height: 84px; border-radius: 26px; object-fit: cover;
  background: #fff; border: 4px solid rgba(255, 255, 255, .92);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .5);
}
.ubp__icon--emoji { line-height: 76px; font-size: 44px; }

.ubp__sp { position: absolute; width: 16px; height: 16px; color: #fff; opacity: 0; animation: ubpTw 2.2s ease-in-out infinite; }
.ubp__sp svg { width: 100%; height: 100%; display: block; }
.ubp__sp--1 { top: 22px; right: 17%; animation-delay: .5s; }
.ubp__sp--2 { top: 56px; left: 15%; width: 22px; height: 22px; animation-delay: 1s; }
.ubp__sp--3 { bottom: 22px; right: 26%; width: 11px; height: 11px; animation-delay: 1.4s; }
.ubp__sp--4 { bottom: 34px; left: 28%; width: 14px; height: 14px; animation-delay: .8s; }

.ubp__title { margin: 4px 0 6px; font-size: 21px; font-weight: 800; line-height: 1.5; color: #2a1f4d; }
.ubp__text { margin: 0 4px 14px; font-size: 13px; line-height: 1.9; color: #6a5f8a; }
.ubp__feat { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ubp__feat li {
  display: flex; align-items: center; gap: 10px; text-align: right;
  background: #f6f2fd; border-radius: 14px; padding: 8px 12px; font-size: 12.5px; color: #2a1f4d;
}
.ubp__feat b { font-size: 15px; font-weight: 400; }

.ubp__cta {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; border-radius: 999px; text-decoration: none !important; color: #fff !important;
  font-size: 15px; font-weight: 800;
  background: var(--ub-c);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ub-c) 82%, #ff5fc4), var(--ub-c));
  box-shadow: 0 18px 34px -14px var(--ub-c);
  transition: transform .15s;
}
.ubp__cta:active { transform: scale(.98); }
.ubp__cta::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-130%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
  animation: ubpShine 3s 1.2s infinite;
}
.ubp__later {
  display: block; width: 100%; margin-top: 8px; padding: 10px; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: #8a7fab;
}
.ubp__note { display: block; margin-top: 2px; font-size: 10.5px; color: #a79dc4; }

@keyframes ubpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ubpFadeOut { to { opacity: 0; } }
@keyframes ubpUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes ubpDown { to { transform: translateY(100%); opacity: .6; } }
@keyframes ubpPop { from { opacity: 0; transform: scale(.88) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes ubpBounce {
  0% { opacity: 0; transform: scale(.25) rotate(-14deg); }
  50% { opacity: 1; transform: scale(1.14) rotate(5deg); }
  72% { transform: scale(.95) rotate(-3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes ubpGlow { 0%, 100% { opacity: .4; transform: scale(.9); } 50% { opacity: .9; transform: scale(1.1); } }
@keyframes ubpTw { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes ubpShine { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(130%); } }

/* ====================================================================
   FLOATING "INSTALL APP" BUTTON
   ==================================================================== */
.ubf {
  --ub-c: #7b3fe4;
  position: fixed; z-index: 2147482000; direction: rtl; font-family: inherit;
  opacity: 0; transform: translateY(18px) scale(.9); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.ubf.is-in { opacity: 1; transform: none; pointer-events: auto; }
.ubf--right { right: 14px; }
.ubf--left { left: 14px; }
.ubf__a {
  position: relative; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px;
  border-radius: 999px; background: var(--ub-c); color: #fff !important; text-decoration: none !important;
  font-size: 13px; font-weight: 700; box-shadow: 0 14px 30px -10px rgba(18, 8, 40, .55);
}
.ubf__a::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 var(--ub-c);
  animation: ubfPulse 2.4s 2s infinite;
}
.ubf__x {
  position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: #5b4f7a; font-size: 15px; line-height: 22px; cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
@keyframes ubfPulse { 0% { box-shadow: 0 0 0 0 rgba(123, 63, 228, .45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(123, 63, 228, 0); } }

/* ====================================================================
   BANNER  ([unicorn_app_banner] + automatic one above the footer)
   ==================================================================== */
.ub-banner, .ub-banner * { box-sizing: border-box; }
.ub-banner {
  --ub-c: #7b3fe4;
  position: relative; overflow: hidden; direction: rtl; font-family: inherit;
  width: calc(100% - 24px); max-width: 1100px; margin: 24px auto; padding: 20px 20px 16px;
  border-radius: 28px; color: #fff;
  background: var(--ub-c);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ub-c) 78%, #fff), var(--ub-c) 45%, color-mix(in srgb, var(--ub-c) 62%, #000));
  box-shadow: 0 24px 50px -24px var(--ub-c);
}
.ub-banner__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .28), transparent 38%),
    radial-gradient(circle at 92% 90%, rgba(255, 140, 220, .35), transparent 40%);
}
.ub-banner__body { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ub-banner__icon img, .ub-banner__emoji {
  display: block; width: 64px; height: 64px; border-radius: 20px; object-fit: cover; background: #fff;
  border: 3px solid rgba(255, 255, 255, .88); box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .45);
}
.ub-banner__emoji { line-height: 58px; text-align: center; font-size: 34px; }
.ub-banner__txt { flex: 1 1 220px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ub-banner__txt strong { font-size: 18px; font-weight: 800; line-height: 1.6; color: #fff; }
.ub-banner__txt span { font-size: 12.5px; line-height: 1.9; color: rgba(255, 255, 255, .9); }
.ub-banner__cta {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px;
  background: #fff; color: var(--ub-c) !important; text-decoration: none !important; font-size: 13.5px; font-weight: 800;
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .45); transition: transform .15s;
}
.ub-banner__cta:hover { transform: translateY(-2px); }
.ub-banner__chips { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ub-banner__chips span {
  padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
}
@media (max-width: 520px) {
  .ub-banner__cta { width: 100%; justify-content: center; }
}

.ub-app-btn {
  --ub-c: #7b3fe4;
  display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 24px;
  border-radius: 999px; background: var(--ub-c); color: #fff !important; text-decoration: none !important;
  font-family: inherit; font-size: 14px; font-weight: 800; box-shadow: 0 14px 28px -12px var(--ub-c);
}
.ub-app-link { --ub-c: #7b3fe4; color: var(--ub-c) !important; font-weight: 700; text-decoration: none !important; border-bottom: 2px solid currentColor; }

/* ====================================================================
   SOLD-OUT MARKER for variable products (red ✕)
   ==================================================================== */
.ub-oos { position: relative !important; opacity: .62; cursor: not-allowed; }
.ub-oos::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 2; pointer-events: none;
  background: linear-gradient(to top left, transparent calc(50% - 1px), rgba(229, 51, 75, .85) 50%, transparent calc(50% + 1px));
}
.ub-oos::after {
  content: "✕"; position: absolute; top: -7px; left: -7px; z-index: 3; pointer-events: none;
  width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
  background: #e5334b; color: #fff; font-size: 10px; font-weight: 800; box-shadow: 0 2px 6px rgba(229, 51, 75, .5);
}

/* own chips (only used when the theme shows no visible variation picker) */
.ub-vchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; direction: rtl; }
.ub-vchip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid #ddd6ee; background: #fff; color: #2a1f4d; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ub-vchip.is-active { background: #2a1f4d; border-color: #2a1f4d; color: #fff; }
.ub-vchip.is-na { opacity: .35; text-decoration: line-through; }
.ub-vchip.is-oos {
  border-color: rgba(229, 51, 75, .6); color: #8a7fab; text-decoration: line-through; overflow: visible;
  background-image: linear-gradient(to top left, transparent calc(50% - 1px), rgba(229, 51, 75, .8) 50%, transparent calc(50% + 1px));
}
.ub-vchip.is-oos em { font-style: normal; font-size: 10px; font-weight: 800; color: #e5334b; text-decoration: none; }
.ub-vchip.is-oos::after {
  content: "✕"; position: absolute; top: -7px; left: -7px; width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: #e5334b; color: #fff; font-size: 10px; font-weight: 800; text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .ubp *, .ubf, .ubf * { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
