/* ──────────────────────────────────────────────────────────
   RASOOVA FLOATING MENU & CATEGORIES MODAL
────────────────────────────────────────────────────────── */

/* ── Floating Menu Button ── */
.rv-floating-menu-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2147483630;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #8f1738 0%, #6f0e26 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  padding: 12px 20px 12px 16px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(143, 23, 56, 0.38), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.22s ease, background 0.22s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  font-family: inherit;
}

.rv-floating-menu-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(143, 23, 56, 0.52), 0 4px 10px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #9d1b3f 0%, #7b102b 100%);
}

.rv-floating-menu-btn:active {
  transform: scale(0.97);
}

.rv-float-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
}

.rv-float-icon svg {
  display: block;
}

.rv-float-text {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1;
}

.rv-float-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* ── Modal Overlay ── */
.rv-menu-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.rv-menu-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rv-menu-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 10, 13, 0.56);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

/* ── Modal Dialog Sheet ── */
.rv-menu-modal-sheet {
  position: relative;
  width: 92%;
  max-width: 480px;
  max-height: 84vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(35, 10, 18, 0.28), 0 0 1px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94) translateY(14px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.rv-menu-modal.is-open .rv-menu-modal-sheet {
  transform: scale(1) translateY(0);
}

.rv-sheet-drag-handle {
  display: none;
  width: 42px;
  height: 4.5px;
  background: #e2e8f0;
  border-radius: 99px;
  margin: 10px auto 2px auto;
  flex-shrink: 0;
}

/* ── Modal Header ── */
.rv-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px 22px;
  border-bottom: 1px solid #f1f3f5;
  flex-shrink: 0;
}

.rv-sheet-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rv-sheet-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff0f3;
  color: #8f1738;
  flex-shrink: 0;
}

.rv-sheet-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rv-sheet-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  font-family: inherit;
  line-height: 1.25;
}

.rv-sheet-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.3;
}

.rv-sheet-close-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.rv-sheet-close-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

/* ── Quick Search Filter ── */
.rv-sheet-search-wrap {
  position: relative;
  padding: 12px 22px;
  background: #ffffff;
  border-bottom: 1px solid #f1f3f5;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.rv-sheet-search-icon {
  position: absolute;
  left: 34px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.rv-sheet-search-input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 38px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.rv-sheet-search-input:focus {
  background: #ffffff;
  border-color: #8f1738;
  box-shadow: 0 0 0 3px rgba(143, 23, 56, 0.1);
}

.rv-sheet-search-input::placeholder {
  color: #94a3b8;
}

.rv-sheet-search-clear {
  position: absolute;
  right: 32px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.rv-sheet-search-clear:hover {
  color: #1e293b;
}

/* ── Category List ── */
.rv-sheet-cat-list {
  padding: 14px 20px;
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scrollbar-width: thin;
  scrollbar-color: #f0ccd5 transparent;
}

.rv-sheet-cat-list::-webkit-scrollbar {
  width: 5px;
}

.rv-sheet-cat-list::-webkit-scrollbar-thumb {
  background-color: #f0ccd5;
  border-radius: 99px;
}

/* ── Category Item Card ── */
.rv-cat-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #edf0f3;
  border-radius: 12px;
  padding: 11px 15px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  outline: none;
  font-family: inherit;
  color: inherit;
}

.rv-cat-modal-item:hover {
  background: #fff8f9;
  border-color: #f7bec9;
  transform: translateX(3px);
}

.rv-cat-modal-item.is-active {
  background: #fff0f3;
  border-color: #8f1738;
  box-shadow: 0 4px 12px rgba(143, 23, 56, 0.12);
}

.rv-cat-modal-item.is-hidden {
  display: none !important;
}

.rv-cat-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rv-cat-emoji-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rv-cat-modal-item:hover .rv-cat-emoji-wrap {
  transform: scale(1.08);
  background: #fee7ec;
}

.rv-cat-modal-item.is-active .rv-cat-emoji-wrap {
  background: #ffe0e7;
}

.rv-cat-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rv-cat-name {
  font-size: 0.94rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-cat-modal-item.is-active .rv-cat-name {
  color: #8f1738;
  font-weight: 700;
}

.rv-cat-meta {
  font-size: 0.78rem;
  color: #64748b;
}

.rv-cat-item-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rv-cat-active-pill {
  background: #8f1738;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rv-cat-arrow-svg {
  color: #cbd5e1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.rv-cat-modal-item:hover .rv-cat-arrow-svg {
  color: #8f1738;
  transform: translateX(3px);
}

.rv-cat-modal-item.is-active .rv-cat-arrow-svg {
  color: #8f1738;
}

/* ── "View All" Special Item ── */
.rv-cat-item-all {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #fafafa;
}

.rv-cat-item-all:hover {
  background: #fff8f9;
  border-color: #8f1738;
}

/* ── Empty State ── */
.rv-cat-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
}

.rv-cat-empty-state .rv-empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 6px;
}

.rv-cat-empty-state p {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
}

/* ── Sheet Footer ── */
.rv-sheet-footer {
  padding: 12px 22px;
  background: #f8fafc;
  border-top: 1px solid #f1f3f5;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #64748b;
  flex-shrink: 0;
}

.rv-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* ──────────────────────────────────────────────────────────
   MOBILE VIEW (max-width: 768px)
────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Position above mobile bottom navigation bar on the right side as a circular button */
  .rv-floating-menu-btn {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    right: 16px !important;
    left: auto !important;
    transform: none !important;
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    box-shadow: 0 8px 24px rgba(111, 14, 38, 0.45), 0 3px 8px rgba(0, 0, 0, 0.22) !important;
    border: 2px solid rgba(255, 255, 255, 0.45) !important;
    background: linear-gradient(135deg, #8f1738 0%, #630c21 100%) !important;
    box-sizing: border-box !important;
  }

  .rv-floating-menu-btn:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 10px 28px rgba(111, 14, 38, 0.55), 0 4px 10px rgba(0, 0, 0, 0.25) !important;
  }

  .rv-floating-menu-btn:active {
    transform: scale(0.92) !important;
  }

  .rv-floating-menu-btn .rv-float-icon {
    width: 22px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  .rv-floating-menu-btn .rv-float-icon svg {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  }

  .rv-floating-menu-btn .rv-float-text {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    margin: 0 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  .rv-floating-menu-btn .rv-float-badge {
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 5px !important;
    border-radius: 9999px !important;
    background: #ffffff !important;
    color: #8f1738 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    border: 2px solid #8f1738 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Bottom-sheet on mobile */
  .rv-menu-modal {
    align-items: flex-end;
  }

  .rv-menu-modal-sheet {
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 22px 22px 0 0;
    margin-top: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .rv-menu-modal.is-open .rv-menu-modal-sheet {
    transform: translateY(0);
  }

  .rv-sheet-drag-handle {
    display: block;
  }

  .rv-sheet-header {
    padding: 14px 18px 12px 18px;
  }

  .rv-sheet-search-wrap {
    padding: 10px 18px;
  }

  .rv-sheet-cat-list {
    padding: 12px 16px;
    max-height: 52vh;
  }

  .rv-cat-modal-item {
    padding: 10px 13px;
  }
}
