/**
 * Sepete eklendi — tamamen tema dışı overlay (Ctrl+F: myt-cart-added-root)
 * Mobil: alt sheet | Masaüstü: ortalanmış kart
 */

.myt-cart-added-root {
  box-sizing: border-box;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  /* Bazı WebView’larda çok büyük z-index taşması — güvenli aralık */
  z-index: 999999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  pointer-events: auto;
  opacity: 1;
  isolation: isolate;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.myt-cart-added-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(15, 23, 42, 0.48);
  cursor: pointer;
  pointer-events: auto;
}

.myt-cart-added-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: min(88vh, 32rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 48px rgba(15, 23, 42, 0.22);
  transform: translateY(0);
  pointer-events: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Üst çekme çubuğu — mobil */
.myt-cart-added-handle {
  width: 2.25rem;
  height: 4px;
  margin: 0.5rem auto 0.35rem;
  border-radius: 99px;
  background: #cbd5e1;
}

@media (min-width: 576px) {
  .myt-cart-added-root {
    align-items: center;
    padding: 1rem;
  }

  .myt-cart-added-sheet {
    border-radius: 16px;
    max-height: min(90vh, 34rem);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
  }

  .myt-cart-added-handle {
    display: none;
  }
}

.myt-cart-added {
  box-sizing: border-box;
  margin: 0;
  padding: 0.65rem 1rem 1rem;
  border-radius: 0;
  background: #f1f5f9;
  border: none;
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
}

@media (min-width: 576px) {
  .myt-cart-added {
    margin: 0.5rem;
    padding: 0.85rem 1rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.06);
  }
}

.myt-cart-added *,
.myt-cart-added *::before,
.myt-cart-added *::after {
  box-sizing: border-box;
}

.myt-cart-added__msg {
  margin: 0 0 0.65rem;
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
}

.myt-cart-added__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.myt-cart-added__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 calc(50% - 0.25rem);
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.myt-cart-added__btn--primary {
  background: #005bd1;
  color: #fff !important;
}

.myt-cart-added__btn--primary:hover {
  background: #0047a8;
  color: #fff !important;
}

.myt-cart-added__btn--dark {
  background: #0f172a;
  color: #fff !important;
}

.myt-cart-added__btn--dark:hover {
  background: #1e293b;
  color: #fff !important;
}

.myt-cart-added__continue {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0;
  border: none;
  background: transparent;
  color: #005bd1 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-family: inherit;
}

.myt-cart-added__continue:hover {
  color: #0047a8 !important;
}

@media (max-width: 480px) {
  .myt-cart-added__btn {
    flex: 1 1 100%;
  }
}

/* Sepet AJAX hatası — üst toast */
.myt-sepet-toast {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000000;
  max-width: min(92vw, 28rem);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
}

.myt-sepet-toast--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.35);
}
