/* VivaHome v2.1.1: Cart-only mobile coupon panel.
   Matches the Checkout "Kuponlarım / Fırsatlar Ve Kupon Kodu" collapsed row.
   Desktop remains governed by v2.1.0. */
.vh-mobile-coupon-title,
.vh-mobile-coupon-subtitle { display: none; }

@media (max-width: 767px) {
  #q-checkout.vh-mobile-cart-coupon-v211 .right-cart,
  #q-checkout.vh-mobile-cart-coupon-v211 .right-cart #product-total {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .right-cart #product-total > .vh-coupon-card.vhcc-coupon-ready,
  #q-checkout.vh-mobile-cart-coupon-v211 .right-cart .vh-coupon-card.vhcc-coupon-ready {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 100% !important;
    grid-column: 1 / -1 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 10px 0 14px !important;
    background: #fff !important;
    border: 1px solid #d8e0e8 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    align-self: stretch !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready > .vhcc-coupon-toggle {
    width: 100% !important;
    min-height: 44px !important;
    padding: 9px 16px !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #1e3347 !important;
    text-align: left !important;
    cursor: pointer !important;
  }

  /* v2.1.0's original text still updates internally. Hide it ONLY on mobile;
     its MutationObserver never competes with our static presentation label. */
  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready > .vhcc-coupon-toggle .vhcc-coupon-label {
    display: none !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vhcc-coupon-toggle .vh-mobile-coupon-title {
    display: inline-block !important;
    flex: 0 0 auto;
    white-space: nowrap;
    color: #20354a !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vhcc-coupon-toggle .vh-mobile-coupon-subtitle {
    display: block !important;
    min-width: 0 !important;
    flex: 1 1 auto;
    text-align: right !important;
    color: #516371 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready > .vhcc-coupon-toggle .vhcc-coupon-arrow {
    display: inline-block !important;
    flex: 0 0 8px !important;
    width: 8px !important;
    height: 8px !important;
    margin: -4px 2px 0 2px !important;
    border-right: 1.7px solid #233b50 !important;
    border-bottom: 1.7px solid #233b50 !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready:not(.vhcc-coupon-closed) > .vhcc-coupon-toggle {
    border-radius: 8px 8px 0 0 !important;
    border-bottom: 1px solid #edf1f5 !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready > #vh-coupon-offers-host {
    display: block;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    overflow: hidden !important;
    margin: 12px 14px 10px !important;
  }

  /* The original accordion's closed state remains the source of truth. */
  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready.vhcc-coupon-closed > #vh-coupon-offers-host {
    display: none !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card #vh-coupon-offers-host .vh-coupon-offers {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
    border-radius: 9px !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card #vh-coupon-offers-host .vh-coupon-offers__track {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready:not(.vhcc-coupon-closed) > :not(.vhcc-coupon-toggle):not(h6):not(#vh-coupon-offers-host) {
    box-sizing: border-box !important;
    max-width: calc(100% - 28px) !important;
    margin: 9px 14px 14px !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready:not(.vhcc-coupon-closed) .input-group {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #q-checkout.vh-mobile-cart-coupon-v211 .vh-coupon-card.vhcc-coupon-ready:not(.vhcc-coupon-closed) input[name="coupon"] {
    min-width: 0 !important;
  }
}
