/**
 * Boutme Design System — Sheets & Modals (extended)
 * Clases para bottom-sheets nativos bm-sheet-*
 * Notificaciones, QR, FAQ, idiomas, profile cards
 */

/* ══════════════════════════════════════════════════════════
   BOTTOM SHEET BASE
══════════════════════════════════════════════════════════ */
.bm-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--bm-z-sheet);
  background: var(--bm-bg-elevated);
  border-top: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-radius-2xl) var(--bm-radius-2xl) 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 20px);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90dvh;
  overflow: hidden;
}

.bm-sheet.bm-sheet-active {
  transform: translateY(0);
}

/* Sheet handle (pill) */
.bm-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--bm-border-strong);
  border-radius: var(--bm-radius-full);
  margin: 12px auto 0;
  flex-shrink: 0;
}

/* Sheet header */
.bm-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--bm-space-4) var(--bm-space-5);
  border-bottom: 1px solid var(--bm-border-subtle);
  flex-shrink: 0;
}

/* Sheet title */
.bm-sheet-title {
  font-size: var(--bm-text-md);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

/* Sheet body — scrollable */
.bm-sheet-body {
  padding: var(--bm-space-4) var(--bm-space-5);
  overflow-y: auto;
  max-height: calc(85dvh - 80px);
  -webkit-overflow-scrolling: touch;
}

/* Sheet backdrop */
.bm-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: calc(var(--bm-z-sheet) - 1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}
.bm-sheet-backdrop.bm-sheet-backdrop-active {
  opacity: 1;
  pointer-events: auto;
}

/* ══════════════════════════════════════════════════════════
   NOTIFICATION ITEMS
══════════════════════════════════════════════════════════ */
.bm-noti-item {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  padding: var(--bm-space-3) 0;
}

.bm-noti-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--bm-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.bm-noti-info {
  flex: 1;
  min-width: 0;
}

.bm-noti-name {
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-noti-desc {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
  margin: 2px 0 0;
}

.bm-noti-action {
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   LANGUAGE SELECTOR
══════════════════════════════════════════════════════════ */
.bm-lang-option {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  width: 100%;
  padding: var(--bm-space-3) var(--bm-space-4);
  border-radius: var(--bm-radius-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--bm-font-sans);
  font-size: var(--bm-text-base);
  color: var(--bm-text-primary);
  transition: all var(--bm-dur-fast) var(--bm-ease-out);
  margin-bottom: var(--bm-space-1);
}

.bm-lang-option:hover {
  background: var(--bm-bg-hover);
  border-color: var(--bm-border-subtle);
}

.bm-lang-active {
  background: var(--bm-accent-dim) !important;
  border-color: rgba(0,122,255,0.2) !important;
}

.bm-lang-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.bm-lang-name {
  flex: 1;
  font-weight: var(--bm-weight-medium);
}

.bm-lang-check {
  color: var(--bm-accent);
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════
   QR CARD VISUAL
══════════════════════════════════════════════════════════ */
.bm-qr-visual-card {
  width: 100%;
  max-width: 320px;
  border-radius: var(--bm-radius-2xl);
  background: linear-gradient(135deg, #007aff 0%, #00b8d5 100%);
  padding: var(--bm-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-4);
  box-shadow: 0 8px 32px rgba(0,122,255,0.35);
  position: relative;
  overflow: hidden;
}

.bm-qr-visual-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.bm-qr-card-top {
  display: flex;
  align-items: center;
}

.bm-qr-card-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.bm-qr-card-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bm-qr-img {
  border-radius: var(--bm-radius-md);
  background: #fff;
  padding: 8px;
  display: block;
}

.bm-qr-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bm-qr-card-name {
  font-size: var(--bm-text-md);
  font-weight: var(--bm-weight-bold);
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}

.bm-qr-card-code {
  font-size: var(--bm-text-xs);
  color: rgba(255,255,255,0.7);
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
   PROFILE CARD ITEMS
══════════════════════════════════════════════════════════ */
.bm-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bm-space-3);
  padding: var(--bm-space-3) 0;
}

.bm-card-item-info {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  flex: 1;
  min-width: 0;
}

.bm-card-item-name {
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-card-item-code {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
  margin: 2px 0 0;
  font-family: var(--bm-font-mono);
  letter-spacing: 0.03em;
}

.bm-card-item-actions {
  display: flex;
  align-items: center;
  gap: var(--bm-space-2);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   FAQ ACCORDION
══════════════════════════════════════════════════════════ */
.bm-faq-item {
  padding: var(--bm-space-1) 0;
}

.bm-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bm-space-3);
  width: 100%;
  padding: var(--bm-space-3) 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--bm-font-sans);
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-primary);
  text-align: left;
  transition: color var(--bm-dur-fast);
}

.bm-faq-question:hover {
  color: var(--bm-accent);
}

.bm-faq-chevron {
  font-size: 12px;
  color: var(--bm-text-tertiary);
  flex-shrink: 0;
  transition: transform var(--bm-dur-base) var(--bm-ease-out);
}

.bm-faq-answer {
  padding-bottom: var(--bm-space-3);
  animation: bm-fade-in var(--bm-dur-base) var(--bm-ease-out);
}

/* ══════════════════════════════════════════════════════════
   LEFT SIDEBAR SHEET (unused, handled by bm-sidebar)
══════════════════════════════════════════════════════════ */
.bm-sheet-left {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════
   DESKTOP: sheets still work but centered
══════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .bm-sheet {
    left: var(--bm-sidebar-w);
    border-radius: var(--bm-radius-2xl) var(--bm-radius-2xl) 0 0;
    max-width: calc(100% - var(--bm-sidebar-w));
  }
  .bm-sheet-backdrop {
    left: var(--bm-sidebar-w);
  }
}

@media (max-width: 480px) {
  .bm-sheet-body {
    max-height: calc(80dvh - 80px);
  }
}
