/* Root Variables */
:root {
  --bg-color: #f7f7f7;
  --surface-color: #ffffff;
  --text-primary: #3c3c3c;
  --text-secondary: #666666;
  --border-color: #F0F0F0;
  --primary-accent: #fde047;
  --primary-accent-hover: #facc15;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 12px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 18px;
  --spacing-xl: 32px;
  --font-family: 'Galano Grotesque Alt', 'helvetica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Global Styles */
body {
  font-family: var(--font-family);
  font-weight: 500;
  /* background-color: #ffffff; */
  background-color: #000000; /* keynote demo */
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

.page-wrapper {
  position: relative;
}

@keyframes oscillate {

  0%,
  100% {
    transform: translateX(-8px);
  }

  50% {
    transform: translateX(0px);
  }
}

.arrow {
  position: absolute;
  right: 100%;
  margin-right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  /* background-color: white;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
  z-index: 10;
  pointer-events: auto;
  stroke: rgb(255, 27, 206);
  animation: oscillate 2.5s infinite ease-in-out;
  transition: opacity 0.15s linear;
  opacity: 1;
  /* display: none; */
  /* toggle arrow visibility */

}

.arrow-map {
  top: 300px;
}

.arrow-banner {
  top: 458px;
}

.arrow-button {
  top: 750px;
}



/* App Container */
.app-container {
  width: 402px;
  max-width: 402px;
  height: 874px;
  max-height: 874px;
  background-color: var(--surface-color);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

* {
  cursor: none !important;
}

.custom-cursor {
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(50, 50, 50, 0.05);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease-out;
}

.custom-cursor.clicking {
  transform: translate(-50%, -50%) scale(0.85);
}

@media (min-width: 450px) {
  .app-container {
    border-radius: 56px;
  }
}

/* Navigation Header */
.nav-header-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Content Area */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--spacing-md) 160px;
  /* Space for bottom bar */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Cart Item */
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  margin: 0 calc(-1 * var(--spacing-md));
  background-color: var(--surface-color);
  position: relative;
}

.cart-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background-color: var(--border-color);
}

.cart-item-image {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-weight: 700;
  font-size: 1rem;
  color: #3c3c3c;
  margin: 0;
  margin-bottom: 8px;
  /* Restored margin-bottom if needed but previous edit said margin:0 */
  /* Wait, the previous edit said margin: 0; but might have overwritten something. Let's stick to user specs */
}

.cart-item-price {
  color: #a3a3a3;
  font-size: 0.875rem;
}

/* Map Section */
.map-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.map-container {
  height: 150px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background-color: #ffffff;
}

.map-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  transition: background-color 0.1s;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}

.map-container:active::after {
  background-color: rgba(0, 0, 0, 0.15);
}

/* Hide Map Credits */
.map-container .gm-style-cc,
.map-container .gmnoprint {
  display: none !important;
}

/* Delivery Info Bar */
.delivery-info {
  display: flex !important;
  align-items: center !important;
  gap: var(--spacing-sm) !important;
  background-color: var(--bg-color) !important;
  /* height: 42px !important; */
  min-height: 48px !important;
  /* max-height: 42px !important; */
  padding: 0 var(--spacing-md) !important;
  border-radius: var(--border-radius-sm) !important;
  font-size: 12px !important;
  color: #3c3c3c !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
}

.delivery-info svg {
  color: #3c3c3c !important;
}

.delivery-info::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  transition: background-color 0.1s;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}

.delivery-info:active::after {
  background-color: rgba(0, 0, 0, 0.1);
}

.delivery-info:hover,
.map-container:hover {
  cursor: pointer;
}

/* List Container Table */
.list-container {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-color);
  margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-md)) 0;
  /* Negate parent padding and gap */
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) 20px;
  position: relative;
  /* cursor: pointer; */
}

.list-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background-color: var(--border-color);
}

.list-item:nth-child(2)::after,
.list-item:last-child::after {
  display: none;
}

.list-item-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.list-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apple-pay-label {
  font-weight: 700;
  font-size: 1rem;
  color: #3c3c3c;
}

.list-item-title {
  font-weight: 700;
  font-size: 1rem;
  color: #3c3c3c;
}

.list-item-subtitle {
  color: #a3a3a3;
  font-size: 0.875rem;
}


.apple-pay-badge {
  height: 24px;
  width: auto;
  display: block;
}

/* Totals */
.totals-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-xl);
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #a3a3a3;
}

.total-row.final {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-top: var(--spacing-sm);
}

.info-icon {
  vertical-align: middle;
  margin-left: 2px;
  transform: translateY(-1px);
}

/* Bottom Bar */
.bottom-bar {
  padding: var(--spacing-md) 30px 54px;
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 60%, rgba(255, 255, 255, 0) 100%);
  z-index: 10;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.place-order-button {
  width: 100%;
  height: 60px;
  background-color: var(--primary-accent);
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
}

.place-order-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  transition: background-color 0.1s;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}

.place-order-button:active::after {
  background-color: rgba(0, 0, 0, 0.15);
}

/* Fullscreen Map Panel */
.fullscreen-map-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.32, 0, 0, 1);
  transform: translateY(100%);
}

.fullscreen-map-wrapper.visible {
  transform: translateY(0);
}

.fullscreen-map-header {
  padding: var(--spacing-md);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: absolute;
  top: calc(54px);
  left: 0;
  z-index: 10;
}

.back-button {
  background: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.1s;
}

.back-button:active {
  background-color: #f5f5f5;
}

.fullscreen-map-content {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
}

/* Fullscreen Lottie wrapper */
.fullscreen-lottie-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #B8E8FC;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.32, 0, 0, 1);
  transform: translateY(100%);
}

.fullscreen-lottie-wrapper.visible {
  transform: translateY(0);
}

.lottie-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.lottie-animation {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.lottie-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 80px 30px 54px;
  z-index: 2;
}

.lottie-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #3c3c3c;
  margin-bottom: 12px;
  text-align: center;
}

.lottie-description {
  font-size: 1rem;
  font-weight: 500;
  color: #646464;
  line-height: 1.5;
  text-align: center;
}

.lottie-cta-button {
  width: 100%;
  height: 60px;
  background-color: #5D5076;
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  /* Fix tap feedback overlay */
}

.app-container {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  background-color: white;
  box-shadow: 0 0px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* iOS Status Bar */
.status-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  z-index: 1000;
  pointer-events: none;
  background-color: transparent;
  /* background-color: red; */
}

.status-bar-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.lottie-cta-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  transition: background-color 0.1s;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}

.lottie-cta-button:active::after {
  background-color: rgba(0, 0, 0, 0.15);
}

/* Payment Flow Screens */
.payment-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  /* Higher than map and lottie */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.32, 0, 0, 1);
  transform: translateY(100%);
}

.payment-screen.visible {
  transform: translateY(0);
}

.yellow-bg {
  background-color: var(--primary-accent);
  /* #fde047 */
}

.payment-screen-content {
  text-align: center;
  width: 280px;
}

.payment-screen-title {
  font-size: 24px;
  font-weight: 800;
  color: #3c3c3c;
  margin-bottom: 12px;
}

.payment-screen-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: #3c3c3c;
  line-height: 1.5;
}

/* Apple Pay Overlay */
.apple-pay-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.apple-pay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  /* backdrop-filter: blur(2px); */
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.apple-pay-overlay.visible .apple-pay-backdrop {
  opacity: 1;
}

.apple-pay-sheet {
  position: relative;
  background-color: #f2f2f6;
  /* iOS grouped background color */
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(calc(100% + 15px));
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.apple-pay-overlay.visible .apple-pay-sheet {
  transform: translateY(0);
}

.apple-pay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.apple-pay-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
}

.apple-pay-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.apple-pay-body {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.apple-pay-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e5ea;
}

.apple-pay-item:last-child {
  border-bottom: none;
}

.apple-pay-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apple-card-mock {
  width: 36px;
  height: 22px;
  background: linear-gradient(135deg, #e1e1e1 0%, #fff 50%, #f1f1f1 100%);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-chip {
  width: 6px;
  height: 8px;
  background-color: #d1b46a;
  border-radius: 1px;
  position: absolute;
  left: 4px;
}

.apple-pay-text-bold {
  font-weight: 600;
  color: #000;
  font-size: 0.95rem;
}

.apple-pay-text-secondary {
  color: #8e8e93;
  font-size: 0.9rem;
}

.apple-pay-link {
  color: #007aff;
  font-size: 0.95rem;
  font-weight: 500;
}

.apple-pay-amount-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apple-pay-amount {
  font-weight: 700;
  color: #000;
  font-size: 1.2rem;
}

.apple-pay-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #007aff;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #007aff;
}

.apple-pay-confirm-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #8e8e93;
}

/* Double Click to Pay Indicator */
.double-click-indicator {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  animation: slideLeftRight 2s infinite ease-in-out;
  cursor: pointer;
  z-index: 310;
}

.apple-pay-overlay:not(.visible) .double-click-indicator {
  animation: none !important;
  transform: translateX(150px) !important;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.double-click-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  text-align: right;
  line-height: 1.1;
}

.indicator-bar {
  width: 4px;
  height: 30px;
  background-color: #000;
  border-radius: 2px;
}

@keyframes slideLeftRight {

  0%,
  10%,
  20%,
  100% {
    transform: translateX(0);
  }

  5%,
  15% {
    transform: translateX(-8px);
  }
}

/* Checkmark Circle */
.checkmark-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: transparent;
  border: 4px solid #3c3c3c;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

/* Hidden helper */
.hidden {
  display: none !important;
}
