/**
 * Place Order form — shared field styles, popup modal, page card container,
 * and product search dropdown.
 */

/* ==========================================================================
   FORM FIELDS (shared across all three contexts)
   ========================================================================== */

.place-order-form {
  display: flex;
  flex-direction: column;
  gap: 14px; /* Balanced field layout grouping separation gap */
}

.place-order-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  width: 100%;
}

/* Structural wrapper container forcing icon & text alignment layers */
.place-order-form__input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

/* Absolute position layer for new SVG elements */
.place-order-form__input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #9ca3af);
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s ease;
}

/* Sleek Balanced Input Fields */
.place-order-form__input {
  width: 100% !important;
  height: 44px !important; /* Increased for premium structural clarity */
  border: 1px solid var(--color-border-strong) !important;
  border-radius: var(--radius) !important;
  padding: 0 16px 0 40px !important; /* Left space carved out for SVGs */
  font-family: var(--font-base) !important;
  font-size: 14px !important;
  color: var(--color-text) !important;
  background: var(--color-white) !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Native Placeholder color correction */
.place-order-form__input::placeholder {
  color: var(--color-text-muted, #9ca3af);
  opacity: 1;
}

/* Dynamic Interactive focus handling */
.place-order-form__input-wrapper:focus-within .place-order-form__input-icon {
  color: var(--color-primary);
}

.place-order-form__input:focus {
  outline: none !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04) !important;
}

/* Form Submit Wrap actions layout module */
.place-order-form__action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}

/* Action button profile overrides with share implementation settings */
.place-order-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 600;
  height: 44px; /* Matching increased input vertical metrics */
  padding: 0 24px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.place-order-form__submit:hover {
  background: var(--color-primary-hover);
}

.place-order-form__submit:active {
  transform: scale(0.99);
}

.place-order-form__submit-icon {
  flex-shrink: 0;
  display: inline-block;
}

.place-order-form__submit:disabled {
  background: var(--color-border-strong);
  cursor: not-allowed;
}

/* Clean WhatsApp info tag typography beneath the submission loop */
.place-order-form__whatsapp-notice {
  font-family: var(--font-base);
  font-size: 12px;
  color: var(--color-text-muted, #6b7280);
  text-align: center;
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
}

.place-order-form__message {
  font-family: var(--font-base);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius);
  display: none;
}

.place-order-form__message--info {
  display: block;
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.place-order-form__message--success {
  display: block;
  background: rgba(4, 161, 43, 0.1);
  color: var(--color-success);
}

.place-order-form__message--error {
  display: block;
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
}

/* ==========================================================================
   PRE-FILLED PRODUCT (product page popup context)
   ========================================================================== */

.place-order-form__prefilled-product {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 10px;
}

.place-order-form__prefilled-product img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.place-order-form__prefilled-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.place-order-form__prefilled-name {
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.place-order-form__prefilled-price {
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 700;
}

/* ==========================================================================
   PRODUCT SEARCH (searchable mode — homepage popup + Place Order page)
   ========================================================================== */

.place-order-form__product-search {
  position: relative;
  width: 100%;
}

.place-order-form__search-input {
  width: 100% !important;
  height: 44px !important; /* Unified expanded footprint metrics */
  border: 1px solid var(--color-border-strong) !important;
  border-radius: var(--radius) !important;
  padding: 0 16px 0 40px !important; /* Left space carved out for SVGs */
  font-family: var(--font-base) !important;
  font-size: 14px !important;
  color: var(--color-text) !important;
  background: var(--color-white) !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.place-order-form__search-input::placeholder {
  color: var(--color-text-muted, #9ca3af);
  opacity: 1;
}

.place-order-form__search-input:focus {
  outline: none !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04) !important;
}

.place-order-form__search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset -8px 0 0 var(--color-white);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  padding: 8px 14px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-bg);
  scrollbar-gutter: stable;
  box-sizing: border-box;
}

.place-order-form__search-results::-webkit-scrollbar {
  width: 6px;
}

.place-order-form__search-results::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 999px;
}

.place-order-form__search-results::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 999px;
}

.place-order-form__search-results::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-primary-hover);
}

.place-order-form__search-results[hidden] {
  display: none !important;
}

.place-order-form__search-loading {
  width: 100%;
  padding: 18px 12px;
  text-align: center;
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--color-text-muted);
}

.place-order-form__search-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: place-order-spinner 0.8s linear infinite;
}

@keyframes place-order-spinner {
  to { transform: rotate(360deg); }
}

.place-order-form__search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.place-order-form__search-item:hover {
  background: var(--color-bg);
}

.place-order-form__search-item img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.place-order-form__search-item-name {
  flex: 1 1 auto;
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--color-text);
}

.place-order-form__search-item-price {
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.place-order-form__search-empty {
  padding: 16px;
  text-align: center;
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--color-text-muted);
}

.place-order-form__selected-product {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 8px;
  margin-top: 4px;
}

.place-order-form__selected-product[hidden] {
  display: none !important;
}

.place-order-form__selected-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.place-order-form__selected-name {
  flex: 1 1 auto;
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--color-text);
}

.place-order-form__selected-clear {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

.place-order-form__selected-clear:hover {
  color: var(--color-text);
}

/* ==========================================================================
   POPUP MODAL (with Reveal Smooth CSS Entrance Animation Keyframe)
   ========================================================================== */

.place-order-popup[hidden] {
  display: none;
}

.place-order-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.place-order-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px); /* Premium background structural smoothing */
  animation: sleekFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.place-order-popup__panel {
  position: relative;
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  width: min(92vw, 460px);
  max-width: 100%;
  max-height: 90vh;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  z-index: 1;
  pointer-events: auto;
  
  /* Reveal Animation execution handles */
  opacity: 0;
  transform: scale(0.95) translateY(8px);
  animation: sleekPanelReveal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.05s;
}

/* Entry Animation Blueprints */
@keyframes sleekFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sleekPanelReveal {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.place-order-popup__content {
  position: relative;
  height: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px 24px 24px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(193, 191, 191, 0.25) var(--color-bg);
  scrollbar-gutter: stable;
}

.place-order-popup__content::-webkit-scrollbar {
  width: 8px;
}

.place-order-popup__content::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 999px;
}

.place-order-popup__content::-webkit-scrollbar-thumb {
  background-color: rgba(128, 128, 128, 0.25);
  border-radius: 999px;
}

.place-order-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border: 1px solid var(--color-border-strong);
  background: var(--color-white);
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.place-order-popup__close:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-text);
}

.place-order-form__category-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.place-order-form__category-badges::-webkit-scrollbar {
  height: 4px;
}

.place-order-form__category-badges::-webkit-scrollbar-track {
  background: transparent;
}

.place-order-form__category-badges::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
}

.place-order-form__category-badge {
  border: 1px solid var(--color-border-strong);
  background: var(--color-white);
  color: var(--color-text);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-base);
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.place-order-form__category-badge:hover,
.place-order-form__category-badge--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.place-order-popup__title {
  font-family: var(--font-base);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
  padding-right: 32px;
}

body.place-order-popup-open {
  overflow: hidden;
}

/* ==========================================================================
   PLACE ORDER PAGE — card container around the embedded form
   ========================================================================== */

.place-order-page-wrapper {
  max-width: 460px;
  margin: 40px auto;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 24px;
}

@media (max-width: 600px) {
  .place-order-page-wrapper {
    margin: 20px auto;
    padding: 20px;
    border-radius: 12px;
  }

  .place-order-popup__panel {
    padding: 0;
  }
}


/* ==========================================================================
   NEW ADDITIONS: Readonly Input & Checkbox Styles
   ========================================================================== */

/* Visual cue for the locked email field */
.place-order-form__input[readonly] {
  background-color: rgba(0, 0, 0, 0.04) !important;
  color: var(--color-text-muted, #9ca3af) !important;
  cursor: not-allowed;
}

.place-order-form__input[readonly]:focus {
  border-color: var(--color-border-strong) !important;
  box-shadow: none !important;
}

/* Layout for the Terms of Service Checkbox */
.place-order-form__field--checkbox {
  flex-direction: row;
  align-items: center;
  margin-top: 4px;
}

.place-order-form__checkbox-label {
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  line-height: 1.4;
}

.place-order-form__checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary); /* Uses your theme's primary color */
}

.place-order-form__checkbox-label a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.place-order-form__checkbox-label a:hover {
  color: var(--color-text);
}


/* =========================================================
   PRODUCT + QUANTITY ROW
   ========================================================= */

.place-order-form__product-selection-row,
.place-order-form__product-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}


/* Product selector */

.place-order-form__product-selector {
    flex: 1 1 auto;
    min-width: 0;
}


/* =========================================================
   GENERIC FORM QUANTITY CONTROL
   ========================================================= */

.place-order-form__quantity-control {
    flex: 0 0 auto;

    display: flex;
    align-items: center;

    height: 48px;

    border: 1px solid #ded9e7;
    border-radius: 10px;

    background: #fff;

    overflow: hidden;
}


.place-order-form__quantity-btn {
    width: 36px;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    background: transparent;

    color: #5f526d;

    font-size: 18px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;
}


.place-order-form__quantity-btn:hover {
    background: #f3eef9;
    color: #69449b;
}


.place-order-form__quantity-input {
    width: 42px !important;
    height: 100% !important;

    padding: 0 !important;

    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;

    background: transparent !important;

    color: #242027 !important;

    font-size: 14px !important;
    font-weight: 700 !important;

    text-align: center !important;
}


/* Remove browser spinner */
.place-order-form__quantity-input::-webkit-inner-spin-button,
.place-order-form__quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.place-order-form__quantity-input {
    -moz-appearance: textfield;
}


/* =========================================================
   PRODUCT DETAIL PAGE QUANTITY DISPLAY
   ========================================================= */

.place-order-form__product-quantity-display {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 52px;
    padding: 0 10px;

    color: #2b2332;

    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}


.place-order-form__quantity-x {
    font-weight: 800;
}


.place-order-form__quantity-value {
    font-weight: 800;
}


/* Product detail product row */
.place-order-form__product-row {
    align-items: center;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .place-order-form__product-selection-row {
        gap: 7px;
    }

    .place-order-form__quantity-control {
        height: 46px;
    }

    .place-order-form__quantity-btn {
        width: 32px;
    }

    .place-order-form__quantity-input {
        width: 36px !important;
        font-size: 13px !important;
    }

    .place-order-form__product-quantity-display {
        min-width: 46px;
        padding: 0 7px;
        font-size: 15px;
    }

}




/* ==========================================================
   PLACE ORDER — SUCCESS / THANK YOU SCREEN
   ========================================================== */

.place-order-form__success {
    position: relative;
    width: 100%;
    min-height: 360px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 45px 25px;

    box-sizing: border-box;
    overflow: hidden;

    text-align: center;

    background: #ffffff;

    opacity: 0;
    transform: translateY(10px) scale(0.98);

    animation:
        placeOrderSuccessIn 0.45s
        cubic-bezier(.22, 1, .36, 1)
        forwards;
}


/*
 * ==========================================================
 * SUCCESS CHECKMARK
 * ==========================================================
 */

.place-order-form__success-icon {
    position: relative;
    z-index: 3;

    width: 78px;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 22px;

    border-radius: 50%;

    background: #25D366;

    box-shadow:
        0 12px 30px rgba(37, 211, 102, 0.22);

    animation:
        placeOrderSuccessIcon
        0.65s
        cubic-bezier(.22, 1, .36, 1)
        0.15s
        both;
}


.place-order-form__success-icon svg {
    width: 45px;
    height: 45px;

    overflow: visible;
}


.place-order-form__success-icon circle {
    stroke: #ffffff;
    stroke-width: 2;

    opacity: 0.95;
}


.place-order-form__success-icon path {
    stroke: #ffffff;
    stroke-width: 4;

    stroke-linecap: round;
    stroke-linejoin: round;

    stroke-dasharray: 40;
    stroke-dashoffset: 40;

    animation:
        placeOrderCheckmark
        0.6s
        ease
        0.55s
        forwards;
}


/*
 * ==========================================================
 * SUCCESS TITLE
 * ==========================================================
 */

.place-order-form__success-title {
    position: relative;
    z-index: 3;

    margin: 0 0 9px;

    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;

    letter-spacing: -0.4px;

    color: #222222;

    animation:
        placeOrderSuccessText
        0.5s
        ease
        0.25s
        both;
}


/*
 * ==========================================================
 * SUCCESS DESCRIPTION
 * ==========================================================
 */

.place-order-form__success-text {
    position: relative;
    z-index: 3;

    max-width: 420px;

    margin: 0;

    font-size: 15px;
    line-height: 1.6;

    color: #666666;

    animation:
        placeOrderSuccessText
        0.5s
        ease
        0.35s
        both;
}


/*
 * ==========================================================
 * ORDER NUMBER
 * ==========================================================
 */

.place-order-form__success-order {
    position: relative;
    z-index: 3;

    margin: 12px 0 20px;

    padding: 7px 13px;

    border-radius: 999px;

    background: #f5f5f5;

    color: #333333;

    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;

    animation:
        placeOrderSuccessText
        0.5s
        ease
        0.45s
        both;
}


/*
 * ==========================================================
 * WHATSAPP REDIRECT MESSAGE
 * ==========================================================
 */

.place-order-form__success-whatsapp {
    position: relative;
    z-index: 3;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 42px;

    padding: 9px 17px;

    border-radius: 999px;

    background: rgba(37, 211, 102, 0.08);

    color: #168f43;

    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;

    animation:
        placeOrderSuccessText
        0.5s
        ease
        0.55s
        both;
}


.place-order-form__success-whatsapp-icon {
    width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 22px;

    border-radius: 50%;

    background: #25D366;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;
}


/*
 * ==========================================================
 * CONFETTI CONTAINER
 * ==========================================================
 */

.place-order-form__success-confetti {
    position: absolute;
    inset: 0;

    z-index: 1;

    pointer-events: none;

    overflow: hidden;
}


/*
 * ==========================================================
 * CONFETTI PIECES
 * ==========================================================
 */

.place-order-form__confetti-piece {
    position: absolute;

    top: -25px;

    display: block;

    width: 8px;
    height: 14px;

    opacity: 0;

    background: #25D366;

    transform:
        translate3d(0, 0, 0)
        rotate(0deg);

    animation-name:
        placeOrderConfettiFall;

    animation-timing-function:
        cubic-bezier(.15, .75, .35, 1);

    animation-fill-mode:
        forwards;

    will-change:
        transform,
        opacity;
}


/*
 * Different confetti shapes.
 *
 * The colours intentionally stay within the site's
 * celebratory green / neutral visual language.
 */

.place-order-form__confetti-piece:nth-child(4n + 1) {
    background: #25D366;
}

.place-order-form__confetti-piece:nth-child(4n + 2) {
    background: #128C7E;
}

.place-order-form__confetti-piece:nth-child(4n + 3) {
    background: #F4B942;
}

.place-order-form__confetti-piece:nth-child(4n + 4) {
    background: #222222;
}


.place-order-form__confetti-piece--circle {
    border-radius: 50%;
}


.place-order-form__confetti-piece--square {
    width: 9px;
    height: 9px;

    border-radius: 2px;
}


.place-order-form__confetti-piece--rectangle {
    width: 6px;
    height: 16px;

    border-radius: 2px;
}


/*
 * ==========================================================
 * SUCCESS ANIMATIONS
 * ==========================================================
 */

@keyframes placeOrderSuccessIn {

    from {
        opacity: 0;
        transform:
            translateY(10px)
            scale(0.98);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }

}


@keyframes placeOrderSuccessIcon {

    0% {
        opacity: 0;
        transform:
            scale(0.45)
            rotate(-12deg);
    }

    65% {
        opacity: 1;
        transform:
            scale(1.08)
            rotate(2deg);
    }

    100% {
        opacity: 1;
        transform:
            scale(1)
            rotate(0);
    }

}


@keyframes placeOrderCheckmark {

    from {
        stroke-dashoffset: 40;
    }

    to {
        stroke-dashoffset: 0;
    }

}


@keyframes placeOrderSuccessText {

    from {
        opacity: 0;
        transform:
            translateY(7px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }

}


@keyframes placeOrderConfettiFall {

    0% {
        opacity: 0;
        transform:
            translate3d(0, -20px, 0)
            rotate(0deg);
    }

    8% {
        opacity: 1;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;

        transform:
            translate3d(
                var(--confetti-x),
                390px,
                0
            )
            rotate(
                var(--confetti-rotate)
            );
    }

}


/*
 * ==========================================================
 * SUCCESS STATE
 * ==========================================================
 */

.place-order-form.place-order-form--success {
    position: relative;
}


/*
 * The normal form elements are hidden by JS.
 * This makes sure the success screen remains the only
 * visible content.
 */

.place-order-form.place-order-form--success
.place-order-form__success:not([hidden]) {
    display: flex;
}


/*
 * ==========================================================
 * POPUP SUCCESS STATE
 * ==========================================================
 *
 * The popup remains open. We simply allow the success
 * content to occupy the popup's existing form area.
 */

.place-order-popup
.place-order-form.place-order-form--success {
    min-height: 100%;
}


/*
 * ==========================================================
 * MOBILE
 * ==========================================================
 */

@media (max-width: 767px) {

    .place-order-form__success {
        min-height: 330px;

        padding:
            38px
            18px;
    }


    .place-order-form__success-icon {
        width: 70px;
        height: 70px;

        margin-bottom: 19px;
    }


    .place-order-form__success-icon svg {
        width: 41px;
        height: 41px;
    }


    .place-order-form__success-title {
        font-size: 23px;
    }


    .place-order-form__success-text {
        max-width: 300px;

        font-size: 14px;
    }


    .place-order-form__success-whatsapp {
        max-width: calc(100% - 10px);

        font-size: 12px;
    }

}


/*
 * ==========================================================
 * SMALL MOBILE
 * ==========================================================
 */

@media (max-width: 479px) {

    .place-order-form__success {
        min-height: 310px;

        padding:
            32px
            14px;
    }


    .place-order-form__success-icon {
        width: 64px;
        height: 64px;
    }


    .place-order-form__success-icon svg {
        width: 38px;
        height: 38px;
    }


    .place-order-form__success-title {
        font-size: 21px;
    }


    .place-order-form__success-text {
        font-size: 13px;
    }

}


/* ==========================================================
   IMPORTANT: KEEP SUCCESS SCREEN HIDDEN UNTIL ORDER SUCCEEDS
   ========================================================== */

.place-order-form__success[hidden] {
    display: none !important;
}






/* =========================================
   ORDER SUCCESS - WHATSAPP ACTION
   ========================================= */

.place-order-form__success-whatsapp {
    width: 100%;
    margin-top: 24px;
    text-align: center;
}

.place-order-form__success-whatsapp-text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.place-order-form__success-whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 8px;
    background: #25d366;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.place-order-form__success-whatsapp-button:hover {
    background: #20bd5a;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.25);
}

.place-order-form__success-whatsapp-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.place-order-form__success-whatsapp-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.place-order-form__success-whatsapp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.place-order-form__success-whatsapp-button[hidden] {
    display: none !important;
}

.place-order-form__success-whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.place-order-form__success-whatsapp-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}