/* Shared UX: hamburger menu + feedback + action logger */

:root {
  --ux-menu-bg: rgba(20, 24, 32, 0.96);
  --ux-line: rgba(255, 255, 255, 0.12);
}

.ux-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
  z-index: 40;
}

.ux-topbar > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.ux-brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.ux-brand-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.65;
  margin-top: 2px;
}

.ux-top-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ux-cart,
.ux-burger {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  border: 1px solid var(--ux-line, rgba(255,255,255,.12));
  background: rgba(255,255,255,.04);
  color: inherit;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.ux-cart,
.ux-cart:link,
.ux-cart:visited,
.ux-cart:hover,
.ux-cart:active {
  color: inherit;
  text-decoration: none;
}

.ux-cart svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
}

.ux-burger {
  flex-direction: column;
  gap: 5px;
}

.ux-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.ux-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ux-burger.open span:nth-child(2) { opacity: 0; }
.ux-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ux-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.ux-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.ux-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--ux-menu-bg, #141820);
  border-left: 1px solid var(--ux-line, rgba(255,255,255,.12));
  z-index: 100;
  transform: translateX(105%);
  transition: transform .22s ease;
  padding: 18px 14px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ux-drawer.open { transform: translateX(0); }

.ux-drawer-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .6;
  margin: 4px 4px 10px;
}

.ux-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(255,255,255,.03);
  color: inherit;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.ux-menu-item:hover,
.ux-menu-item.active {
  border-color: rgba(61, 139, 253, .45);
  background: rgba(61, 139, 253, .12);
}

.ux-menu-item.danger {
  color: #ff8f8f;
}

.ux-feedback-fab {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 70;
  border: none;
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  background: #3d8bfd;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.ux-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.ux-modal-backdrop.open { display: flex; }

.ux-modal {
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #171b23;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px 16px 12px 12px;
  padding: 14px;
  color: #eef1f6;
}

.ux-modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.ux-modal p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #9aa3b2;
}

.ux-modal label {
  display: block;
  font-size: 12px;
  color: #9aa3b2;
  margin: 10px 0 6px;
}

.ux-modal textarea,
.ux-modal input,
.ux-modal select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #10141c;
  color: #eef1f6;
  padding: 11px 12px;
  font-size: 14px;
}

.ux-modal textarea { min-height: 110px; resize: vertical; }

.ux-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.ux-modal-actions button {
  flex: 1;
  min-width: 120px;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ux-btn-primary { background: #3d8bfd; color: #fff; }
.ux-btn-ghost { background: #242a35; color: #eef1f6; }

.ux-log-meta {
  font-size: 11px;
  color: #7f8a9b;
  margin-top: 8px;
}
