/* ===================================================================
   MenuFresh - Quick Access Navigation v2
   汎用設計: Home + Menu(ボトムシート展開)の2ボタン
   将来: スタッフコール等を追加可能
   =================================================================== */

/* ===== Quick Nav Container ===== */
.quick-nav {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
}

.quick-nav__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(20, 17, 13, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 4px 16px rgba(232, 155, 59, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: floatBob 6s ease-in-out infinite;
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== Quick Nav Button ===== */
.quick-nav__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: 100px;
  transition: all var(--duration-fast) var(--ease-bounce);
  overflow: hidden;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.quick-nav__btn:hover {
  color: var(--color-text-primary);
  transform: translateY(-3px);
}

.quick-nav__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: radial-gradient(
    circle at center,
    rgba(232, 155, 59, 0.25) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.quick-nav__btn:hover::before {
  opacity: 1;
}

.quick-nav__btn:active {
  transform: translateY(-1px) scale(0.97);
}

/* Active state (HOME when at top) */
.quick-nav__btn.is-active {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Primary CTA button (Menu) - more prominent */
.quick-nav__btn.is-primary {
  background: linear-gradient(
    135deg,
    var(--color-accent-primary) 0%,
    var(--color-accent-warm) 100%
  );
  color: var(--color-bg-base);
  padding: 0 28px;
  height: 52px;
  box-shadow:
    0 4px 16px rgba(232, 155, 59, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.quick-nav__btn.is-primary.is-active {
  /* Even when scrolled menu stays primary */
  background: linear-gradient(
    135deg,
    var(--color-accent-primary) 0%,
    var(--color-accent-warm) 100%
  );
  color: var(--color-bg-base);
}

.quick-nav__btn.is-primary:hover {
  background: linear-gradient(
    135deg,
    var(--color-accent-warm) 0%,
    var(--color-accent-primary) 100%
  );
  box-shadow:
    0 8px 24px rgba(232, 155, 59, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Pulsing ring on primary button */
.quick-nav__btn.is-primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 100px;
  border: 2px solid rgba(232, 155, 59, 0.6);
  animation: pulseRing 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0% { transform: scale(0.96); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Icon */
.quick-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.quick-nav__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Mobile responsive ===== */
@media (max-width: 480px) {
  .quick-nav__btn {
    padding: 0 16px;
    font-size: 0.85rem;
  }
  .quick-nav__btn.is-primary {
    padding: 0 22px;
  }
}

/* ===== Hide on print ===== */
@media print {
  .quick-nav, .bottom-sheet { display: none !important; }
}

/* ===================================================================
   Bottom Sheet — Menu Popup
   =================================================================== */

.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet.is-open {
  pointer-events: auto;
}

/* Backdrop */
.bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: all var(--duration-normal) var(--ease-out);
}

.bottom-sheet.is-open .bottom-sheet__backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Sheet Content */
.bottom-sheet__content {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: linear-gradient(
    180deg,
    var(--color-bg-elevated) 0%,
    var(--color-bg-surface) 100%
  );
  border-radius: 24px 24px 0 0;
  padding: 12px 0 32px;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow:
    0 -16px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  max-height: 80vh;
  overflow-y: auto;
}

.bottom-sheet.is-open .bottom-sheet__content {
  transform: translateY(0);
}

/* Drag Handle */
.bottom-sheet__handle {
  width: 40px;
  height: 5px;
  background: var(--color-text-tertiary);
  border-radius: 100px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

/* Header */
.bottom-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--color-divider);
}

.bottom-sheet__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
}

.bottom-sheet__title-eyebrow {
  display: block;
  color: var(--color-accent-secondary);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 2px;
}

.bottom-sheet__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
}

.bottom-sheet__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-primary);
  transform: rotate(90deg);
}

.bottom-sheet__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}

/* Items List */
.bottom-sheet__items {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bottom-sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  border-radius: var(--radius-card);
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
}

.bottom-sheet__item:hover {
  background: rgba(232, 155, 59, 0.08);
  transform: translateX(4px);
}

.bottom-sheet__item:active {
  background: rgba(232, 155, 59, 0.15);
  transform: translateX(4px) scale(0.99);
}

/* Stagger animation for items */
.bottom-sheet.is-open .bottom-sheet__item {
  animation: slideInLeft 0.5s cubic-bezier(0.32, 0.72, 0, 1) backwards;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Item Icon */
.bottom-sheet__item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(232, 155, 59, 0.2) 0%,
    rgba(220, 107, 47, 0.15) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent-secondary);
}

.bottom-sheet__item-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Item Text */
.bottom-sheet__item-text {
  flex: 1;
}

.bottom-sheet__item-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 2px;
  color: var(--color-text-primary);
}

.bottom-sheet__item-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--color-accent-secondary);
  font-weight: 600;
  margin: 0;
}

/* Item Arrow */
.bottom-sheet__item-arrow {
  color: var(--color-text-tertiary);
  font-size: 1.2rem;
  transition: transform var(--duration-fast);
}

.bottom-sheet__item:hover .bottom-sheet__item-arrow {
  color: var(--color-accent-primary);
  transform: translateX(4px);
}

/* External Links Section (in bottom sheet, Phase 2 ready) */
.bottom-sheet__external {
  padding: 16px 22px 8px;
  margin-top: 8px;
  border-top: 1px solid var(--color-divider);
}

.bottom-sheet__external-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--color-text-tertiary);
  margin: 0 0 12px;
}

.bottom-sheet__external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bottom-sheet__external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--duration-fast);
}

.bottom-sheet__external-link:hover {
  background: rgba(232, 155, 59, 0.12);
  border-color: var(--color-accent-primary);
  color: var(--color-accent-secondary);
}

.bottom-sheet__external-link span {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Bottom safe area for iPhone */
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-sheet__content,
  .order-list-modal__content {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
  .quick-nav {
    bottom: max(20px, env(safe-area-inset-bottom));
  }
}

/* ===================================================================
   Order Button Badge
   =================================================================== */

.quick-nav__btn--order {
  position: relative;
  /* Override .quick-nav__btn's overflow:hidden so the badge can pop
     out above the corner without being clipped */
  overflow: visible;
}

.quick-nav__btn.is-hidden {
  display: none !important;
}

.quick-nav__btn.has-orders {
  color: var(--color-text-primary);
  background: rgba(232, 155, 59, 0.15);
}

.quick-nav__badge {
  position: absolute;
  /* Lift slightly outside the button corner — classic notification-badge
     look. Previously sat inside (top:4px right:4px) and felt clipped. */
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: linear-gradient(135deg, var(--color-accent-warm), var(--color-accent-primary));
  color: var(--color-bg-base);
  border: 2px solid var(--color-bg-base);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-number);
  line-height: 1;
  box-shadow: 0 4px 10px rgba(232, 155, 59, 0.55);
  animation: badgePop 0.4s var(--ease-bounce);
  pointer-events: none;
  z-index: 3;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===================================================================
   Order List Modal
   =================================================================== */

.order-list-modal {
  position: fixed;
  inset: 0;
  z-index: 105;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.order-list-modal.is-open {
  pointer-events: auto;
}

.order-list-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: all var(--duration-normal) var(--ease-out);
}

.order-list-modal.is-open .order-list-modal__backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.order-list-modal__content {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: linear-gradient(180deg, var(--color-bg-elevated), var(--color-bg-surface));
  border-radius: 24px 24px 0 0;
  padding: 12px 0 24px;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -16px 48px rgba(0,0,0,0.4);
  max-height: 88vh;
  overflow-y: auto;
}

.order-list-modal.is-open .order-list-modal__content {
  transform: translateY(0);
}

.order-list-modal__handle {
  width: 40px;
  height: 5px;
  background: var(--color-text-tertiary);
  border-radius: 100px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.order-list-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 18px;
  border-bottom: 1px solid var(--color-divider);
}

.order-list-modal__eyebrow {
  display: block;
  color: var(--color-accent-secondary);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 4px;
}

.order-list-modal__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-list-modal__count {
  background: var(--color-accent-primary);
  color: var(--color-bg-base);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-body);
}

/* Empty state */
.order-list-modal__empty {
  padding: 48px 24px;
  text-align: center;
}

.order-list-modal__empty-icon {
  font-size: 3rem;
  margin: 0 0 12px;
  opacity: 0.5;
}

.order-list-modal__empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin: 0 0 8px;
}

.order-list-modal__empty-desc {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin: 0;
}

/* Items list */
.order-list-modal__items {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--duration-fast);
  position: relative;
}

.order-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.order-card__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  color: var(--color-bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-number);
  font-weight: 700;
  font-size: 1rem;
}

.order-card__body {
  flex: 1;
  min-width: 0;
}

.order-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.order-card__main {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.order-card__size {
  font-size: 0.85rem;
  color: var(--color-accent-secondary);
  font-weight: 600;
}

.order-card__total {
  font-family: var(--font-number);
  font-size: 1.2rem;
  color: var(--color-accent-secondary);
  font-weight: 700;
  white-space: nowrap;
}

.order-card__detail {
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
  margin: 2px 0;
  line-height: 1.5;
}

.order-card__detail-label {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.order-card__delete {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
  opacity: 0;
}

.order-card:hover .order-card__delete {
  opacity: 1;
}

.order-card__delete:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #DC2626;
}

.order-card__delete svg {
  width: 16px;
  height: 16px;
}

/* Footer with total + clear button */
.order-list-modal__footer {
  padding: 18px 24px 8px;
  border-top: 1px solid var(--color-divider);
  margin-top: 6px;
}

.order-list-modal__total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.order-list-modal__total-label {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  font-weight: 700;
}

.order-list-modal__total-value {
  font-family: var(--font-number);
  font-size: 2rem;
  color: var(--color-accent-secondary);
  font-weight: 700;
}

.order-list-modal__hint {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  text-align: center;
  margin: 0 0 14px;
  padding: 12px;
  background: rgba(232, 155, 59, 0.08);
  border: 1px solid rgba(232, 155, 59, 0.2);
  border-radius: 12px;
}

.order-list-modal__clear {
  width: 100%;
  justify-content: center;
  color: #DC2626 !important;
}

.order-list-modal__clear:hover {
  background: rgba(220, 38, 38, 0.15) !important;
}

/* Mobile: show delete always */
@media (max-width: 640px) {
  .order-card__delete { opacity: 0.5; }
}

/* ===================================================================
   Toast Notification
   =================================================================== */

.mf-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-warm));
  color: var(--color-bg-base);
  padding: 12px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(232, 155, 59, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s var(--ease-bounce);
  white-space: nowrap;
}

.mf-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .mf-toast {
    bottom: 90px;
    font-size: 0.85rem;
    padding: 10px 18px;
  }
}

/* ===== Drinks Section ===== */
.drinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
  gap: var(--space-lg);
  justify-content: center;
}

.drink-card {
  position: relative;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.drink-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elevated);
}

.drink-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.drink-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.drink-card:hover .drink-card__image {
  transform: scale(1.06);
}

.drink-card__category {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 0.3rem 0.8rem;
  background: rgba(20, 17, 13, 0.7);
  backdrop-filter: blur(8px);
  color: var(--color-accent-secondary);
  border: 1px solid rgba(252, 211, 77, 0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  z-index: 2;
}

.drink-card__content {
  padding: var(--space-lg);
}

.drink-card__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  color: var(--color-text-primary);
}

.drink-card__tagline {
  color: var(--color-accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.drink-card__description {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.drink-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  font-family: var(--font-number);
  font-size: 2.2rem;
  color: var(--color-accent-secondary);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.drink-card__price-currency {
  font-size: 0.7em;
  opacity: 0.8;
}

.drink-card__price-suffix {
  font-size: 0.4em;
  color: var(--color-text-tertiary);
  font-family: var(--font-body);
  font-weight: 400;
  margin-left: 0.5em;
}
