/* Hesap + Mesaj offcanvas — bildirim paneli ile uyumlu */
.user-offcanvas-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.user-offcanvas-overlay.open {
  opacity: 1;
  visibility: visible;
}

.user-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483003;
  width: min(100%, 480px);
  display: flex;
  flex-direction: column;
  background: var(--page-bg, #0b0b0f);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  transform: translateX(100%);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.user-offcanvas.open {
  transform: translateX(0);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

.user-offcanvas .offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  background: rgba(14, 14, 22, 0.98);
}

.user-offcanvas .offcanvas-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text, #f0f0f8);
}

.user-oc-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-size: 16px;
}

.user-offcanvas .offcanvas-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Hesap menüsü — scroll düzeltmesi */
#userMenuOffcanvas .offcanvas-body.user-menu-offcanvas-body {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#userMenuOffcanvas .bs-acc-scroll {
  flex: none;
  overflow: visible;
  max-height: none;
}

.um-menu-scroll {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.um-user-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.um-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.um-user-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #f0f0f8);
}

.um-balance-block {
  margin: 14px 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.um-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.um-balance-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.um-balance-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--orange, #f59e0b);
}

.um-balance-sub strong {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.um-deposit-btn {
  width: 100%;
  margin-top: 10px;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--orange, #f59e0b);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.um-menu-scroll {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* ── Sepet offcanvas ── */
.cart-offcanvas-wrap,
.cart-offcanvas-content,
.cart-offcanvas-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cart-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 16px;
}

.cart-empty-block {
  text-align: center;
  padding: 28px 20px 20px;
}

.cart-empty-block i {
  font-size: 44px;
  color: rgba(255, 255, 255, 0.15);
  margin-bottom: 12px;
}

.cart-empty-block h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #f0f0f8);
}

.cart-empty-block p {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.cart-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #f0f0f8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.cart-suggest-section {
  padding: 8px 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-suggest-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text, #f0f0f8);
}

.cart-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.cart-suggest-item:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

.cart-suggest-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.cart-suggest-info {
  flex: 1;
  min-width: 0;
}

.cart-suggest-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #f0f0f8);
  line-height: 1.35;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-suggest-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange, #f59e0b);
}

.cart-items-wrap {
  padding: 12px 16px 0;
}

.cart-items-wrap .bs-cart-list {
  max-height: none;
  padding: 0;
}

.cart-items-wrap .bs-cart-footer {
  position: sticky;
  bottom: 0;
  background: var(--page-bg, #0b0b0f);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

#userMenuOffcanvas .bs-acc-scroll {
  flex: none;
  overflow: visible;
  max-height: none;
}

@media (max-width: 768px) {
  #bs-messages,
  #bs-cart {
    display: none !important;
  }
}

.um-guest-body {
  padding: 16px;
}

.um-guest-reg {
  width: 100%;
  margin-top: 10px;
}

/* ── Mesajlar offcanvas ── */
#messagesOffcanvas .offcanvas-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.msg-oc-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.msg-oc-list-panel,
.msg-oc-chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.msg-oc-chat-panel {
  position: absolute;
  inset: 0;
  background: var(--page-bg, #0b0b0f);
  z-index: 2;
}

#msgListScroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#msgShList.msg-sh-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.msg-list-footer {
  flex-shrink: 0;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 22, 0.98);
}

.msg-new-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent, #8b5cf6), #6d28d9);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.msg-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: rgba(255, 255, 255, 0.35);
}

.msg-empty-state i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.2;
}

.msg-empty-state strong {
  display: block;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}

.msg-empty-state p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.msg-filter-btn.active {
  color: var(--orange, #f59e0b);
}

body.user-panel-open {
  overflow: hidden;
}

@media (min-width: 769px) {
  .user-offcanvas {
    width: min(100%, 420px);
  }
}
