/* =========================================
   EXPRESS CHECKOUT – FINAL STABLE VERSION 🔥
   ========================================= */

.express-checkout {
  padding-top: 12px;
}

/* ========================
   BASE CARDS – PREMIUM GLASS 🔥
   ======================== */

.express-checkout .delivery-option,
.express-checkout .payment-option {

  border: 1px solid rgba(80,120,255,0.18);
  border-radius: 16px;

  padding: 14px 14px 14px 4px;

  margin-bottom: 10px;

  background: rgba(80,120,255,0.06);

  box-shadow: 0 4px 12px rgba(80,120,255,0.10);

  box-sizing: border-box;
  width: 100%;
  max-width: 100%;

  cursor: pointer;
  overflow: hidden;

  transition: all 0.25s ease;
}

/* Hover */
.express-checkout .delivery-option:hover,
.express-checkout .payment-option:hover {

  transform: translateY(-2px);

  box-shadow: 0 8px 22px rgba(80,120,255,0.22);
}

/* ========================
   RADIO REMOVAL
   ======================== */

.express-checkout input[type="radio"],
.express-checkout .custom-radio,
.express-checkout .radio,
.express-checkout .checker,
.express-checkout .form-check-input {
  display: none !important;
}

/* ========================
   SAFE DELIVERY STRUCTURE
   ======================== */

.express-checkout .delivery-option {
  display: block;
}

/* ========================
   CORE ALIGNMENT FIX 🔥
   ======================== */

.express-checkout .delivery-option .row {

    display: flex !important;
    align-items: center;

    gap: 1px;

    width: 100%;
}

/* Logo */
.express-checkout .delivery-option img {

    width: 60px;
    flex-shrink: 0;
}

/* Name block */
.express-checkout .delivery-option strong,
.express-checkout .delivery-option .carrier-name {

    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;

    display: block;

    color: #000;
}

/* Price */
.express-checkout .carrier-price {

    flex-shrink: 0;
    margin-left: auto;

    white-space: nowrap;
    font-weight: 600;
}

/* Hide delivery delay */
.express-checkout .carrier-delay {
  display: none !important;
}

/* ========================
   SELECTED STATE – PREMIUM 🔥
   ======================== */

.express-checkout .delivery-option.is-selected,
.express-checkout .payment-option.is-selected,
.express-checkout .delivery-option:has(input:checked),
.express-checkout .payment-option:has(input:checked) {

  border-color: rgba(80,120,255,0.45);

  background: rgba(80,120,255,0.14);

  box-shadow:
    0 0 0 1px rgba(80,120,255,0.35),
    0 10px 26px rgba(80,120,255,0.30);
}

/* ========================
   SAFETY RULES
   ======================== */

.express-checkout table {
  width: 100%;
  max-width: 100%;
}

.express-checkout .row {
  margin-left: 0;
  margin-right: 0;
}

.express-checkout .delivery-option *,
.express-checkout .payment-option * {
  max-width: 100%;
}

.express-checkout .delivery-option select,
.express-checkout .delivery-option .form-control {
  width: 100%;
  max-width: 100%;
}

/* ========================
   PAYMENT LAYOUT
   ======================== */

.express-checkout .payment-option {

    display: flex;
    align-items: center;
}

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

@media (max-width: 768px) {

  .express-checkout .delivery-option img {
      width: 50px;
  }

  .express-checkout .carrier-price {
      font-size: 13px;
  }
}

/* =====================================
   FORCE CARRIER NAME WIDTH 🔥 (FIXED)
   ===================================== */

.express-checkout .delivery-option strong,
.express-checkout .delivery-option .carrier-name {

    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;

    display: block;
}

/* =====================================
   REAL LOGO SPACING FIX 🔥
   ===================================== */

.express-checkout .delivery-option img {

    margin-right: 6px !important;
}

/* =========================================
   MOBILE FLOATING CHECKOUT UI
   ========================================= */

.mobile-checkout-ui {
  display: none;
}

@media (max-width: 992px) {
  .mobile-checkout-ui {
    display: block;
  }

  .checkout-sidebar {
    display: none !important;
  }

  .checkout-step.mc-step-hidden .content {
    display: none !important;
  }

  .checkout-step.mc-step-hidden {
    opacity: 0.85;
  }

  .checkout-step.mc-step-visible {
    scroll-margin-top: 70px;
  }

  .mobile-checkout-ui .mc-steps {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    padding: 10px 10px 6px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .mobile-checkout-ui .mc-step-chip {
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .mobile-checkout-ui .mc-step-chip.is-current {
    border-color: #000;
    font-weight: 700;
  }

  .mobile-checkout-ui .mc-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
  }

  .mobile-checkout-ui .mc-primary-btn {

    background: linear-gradient(
      135deg,
      rgba(50, 90, 255, 0.95),
      rgba(80, 120, 255, 0.95)
    ) !important;

    border: 0 !important;
    color: #fff !important;

    box-shadow: 0 6px 18px rgba(50, 90, 255, 0.35);
  }

  #main {
    padding-bottom: 92px;
  }
}

/* ===== MOBILE BAR VISIBILITY GUARANTEE ===== */

@media (max-width: 992px) {

  .mobile-checkout-ui .mc-bar {
    z-index: 99999 !important;
  }

  #main {
    padding-bottom: 140px !important;
  }
}

/* =========================================
   MOBILE – HIDE DEFAULT PRESTASHOP BUTTONS
   ========================================= */

@media (max-width: 992px) {

  .checkout-step button[type="submit"],
  .checkout-step .btn-primary,
  .checkout-step .continue,
  .checkout-step .btn {

    display: none !important;
  }

  .checkout-step-footer,
  .checkout-step .step-footer {

    display: none !important;
  }
}

/* =========================================
   MOBILE – FULL SCREEN FEEL
   ========================================= */

@media (max-width: 992px) {

  .checkout-step.mc-step-visible {

    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;

    animation: mcStepFade 0.25s ease;
  }

  .checkout-step.mc-step-visible .content {
    flex: 1 1 auto;
  }

  @keyframes mcStepFade {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* =========================================
   MOBILE – REMOVE LAYOUT GAP
   ========================================= */

@media (max-width: 992px) {

  #main-wrapper,
  #content-wrapper,
  .page-content,
  main {

    min-height: auto !important;
    height: auto !important;
  }

  #main-wrapper,
  #content-wrapper {

    display: block !important;
  }

  .page-content {

    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  footer {

    margin-top: 0 !important;
  }
}

/* =========================================
   MOBILE – FINAL SPACING FIX
   ========================================= */

@media (max-width: 992px) {

  #main {
    padding-bottom: 10px !important;
  }
}

/* =========================================
   FLOATING BAR – PREMIUM SOFT DESIGN
   ========================================= */

@media (max-width: 992px) {

  .mobile-checkout-ui .mc-bar {

    border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 35px rgba(0,0,0,0.12);

    margin: 0 4px 0px;
    overflow: hidden;
  }
}

/* =========================================
   FLOATING BAR – GLASS BLUE BUTTONS
   ========================================= */

@media (max-width: 992px) {

  .mobile-checkout-ui .mc-bar button {

    border-radius: 999px !important;

    color: #2c3cff;
    font-weight: 600;
  }
}

/* =========================================
   CARRIER NAME – FIX LETTER BREAK BUG
   ========================================= */

.express-checkout .delivery-option strong,
.express-checkout .delivery-option .carrier-name {

    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

/* =========================================
   CARRIER – REMOVE BOOTSTRAP COLUMN OFFSET
   ========================================= */

.express-checkout .delivery-option [class*="col-"] {

    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* =========================================
   CARRIER PRICE – BADGE STYLE 🔥
   ========================================= */

.express-checkout .carrier-price {

    background: rgba(80, 120, 255, 0.18);
    color: #2c3cff;

    padding: 4px 10px;
    border-radius: 999px;

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

/* =========================================
   ALWAYS SHOW DISCOUNT FIELD 🔥
   ========================================= */

.cart-summary .cart-discount,
.cart-summary .promo-code,
.cart-summary [data-link-action="add-voucher"] {

    display: block !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
}

/* =========================================
   FIX CHECKOUT LAYOUT GLITCH 🔥
   ========================================= */

.express-checkout .delivery-option:hover,
.express-checkout .payment-option:hover {

  transform: none !important;
}

.express-checkout .delivery-option.is-selected,
.express-checkout .payment-option.is-selected,
.express-checkout .delivery-option:has(input:checked),
.express-checkout .payment-option:has(input:checked) {

  transform: none !important;
}

/* =========================================
   FLOATING BAR HARD FIX 🔥
   ========================================= */

@media (max-width: 992px) {

  .mobile-checkout-ui .mc-bar {

    padding: 8px 10px !important;
  }

  .mobile-checkout-ui .mc-bar-row {

    display: grid !important;

    grid-template-columns: 1fr auto auto auto !important;

    align-items: center !important;

    gap: 10px !important;
  }

  .mobile-checkout-ui .mc-bar button {

    height: 38px !important;
    padding: 0 14px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-checkout-ui .mc-total {

    align-items: center !important;
  }
}

/* =========================================
   FLOATING BAR – HARD HIDE COUPON 🔥
   ========================================= */

.mobile-checkout-ui .mc-coupon-link,
.mobile-checkout-ui .mc-coupon-link * {

  display: none !important;
}


/* =========================================
   FLOATING BAR – REBALANCE LAYOUT 🔥
   ========================================= */

@media (max-width: 992px) {

  .mobile-checkout-ui .mc-bar-row {

    grid-template-columns: 1fr auto auto !important;
  }
}
/* =========================================
   FLOATING BAR – FINAL GRID FIX 🔥
   ========================================= */

@media (max-width: 992px) {

  .mobile-checkout-ui .mc-bar-row {

    display: grid !important;

    grid-template-columns: 1fr auto auto !important;
  }
}

/* =========================================
   FLOATING BAR – FORCE LAYOUT RESET 🔥
   ========================================= */

@media (max-width: 992px) {

  .mobile-checkout-ui .mc-bar-row {

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .mobile-checkout-ui .mc-total {

    margin-right: auto !important;
  }
}

/* =========================================
   FLOATING BAR – HIDE EMPTY BUTTONS 🔥
   ========================================= */

.mobile-checkout-ui .mc-bar button:empty {
  display: none !important;
}
/* =========================================
   FIX: remove empty left "badge" in floating bar
   (mc-coupon-link button placeholder)
   ========================================= */

@media (max-width: 992px) {

  /* Kill the coupon button completely (button itself, not only text) */
  #mobile-floating-bar .mc-coupon-link {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* Extra safety: if theme injects pseudo elements */
  #mobile-floating-bar .mc-coupon-link::before,
  #mobile-floating-bar .mc-coupon-link::after {
    content: none !important;
    display: none !important;
  }

  /* Ensure layout doesn't reserve space for the hidden item */
  #mobile-floating-bar .mc-bar-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  #mobile-floating-bar .mc-total {
    margin-right: auto !important; /* "Viso" stays left */
  }
}

/* If old floating-total-bar.js is still being loaded somewhere, hide it too */
@media (max-width: 992px) {
  .floating-total-bar {
    display: none !important;
  }
}

/* =========================================
   FLOATING BAR – RED TOTAL 🔥
   ========================================= */

#mobile-floating-bar .mc-total-value {

    color: #e53935 !important;   /* graži premium raudona */
    font-weight: 700;
}
