/* components.css - Component specific styles */

/* Guest slider & stack animation */
.guest-control {
  text-align: center;
  margin-top: 1rem;
}

.guest-control input[type="range"] {
  -webkit-appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #ffcc80);
  outline: none;
}

.guest-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--primary);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  cursor: pointer;
}

#guestPreview, #guestPreview {
  font-family: inherit;
}

/* box stack */
#boxStack {
  position: relative;
  perspective: 600px;
}

.box-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fff8e6);
  border: 3px solid var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  transform-origin: center bottom;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
}

.box-thumb.pop {
  animation: popUp .45s cubic-bezier(.2,.9,.3,1) forwards;
}

@keyframes popUp {
  0% { opacity: 0; transform: translateY(22px) scale(.86) rotate(-6deg); }
  60% { opacity: 1; transform: translateY(-6px) scale(1.02) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.box-more {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 3px dashed rgba(0,0,0,.06);
  width: 46px;
  height: 46px;
  font-weight: 700;
  color: #666;
  background: #fff7;
  box-shadow: 0 6px 12px rgba(0,0,0,.04);
}

/* Snacks */
.snacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
  gap: .9rem;
  margin-bottom: 1rem;
}

@media(min-width:768px){
  .snacks-grid {
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap: 1.25rem;
  }
}

.snack-card {
  background: #fff;
  border-radius: 12px;
  padding: .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
  transition: all 0.3s ease;
}

.snack-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,.1);
}

.snack-emoji {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .25rem;
  font-size: 1.5rem;
}

.snack-name {
  font-weight: 600;
}

.snack-meta {
  color: #666;
  font-size: .84rem;
}

.snack-price {
  color: var(--secondary);
  font-weight: 700;
  margin-top: .35rem;
}

/* Snack box display */
.snack-box-display {
  background: #fff;
  border-radius: 14px;
  padding: .9rem;
  margin: 1rem auto;
  max-width: 520px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  position: relative;
}

.box-visual {
  width: 100%;
  max-width: 340px;
  height: 200px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg,#ffe0e6 0%,#fff0f5 100%);
  border-radius: 12px;
  border: 3px solid #ff6f61;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.06);
}

@media(min-width:768px){
  .box-visual { height: 240px; }
}

.box-ribbon {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 52px;
  background: #ff6f61;
  clip-path: polygon(0 0,100% 0,100% 70%,50% 100%,0 70%);
  box-shadow: 0 2px 4px rgba(0,0,0,.12);
}

.box-weight-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255,255,255,.95);
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 4px 8px rgba(0,0,0,.07);
  z-index: 2;
}

.box-contents {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  min-height: 110px;
  z-index: 1;
}

.box-item {
  position: relative;
  cursor: default;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  font-size: 1.1rem;
}

/* add remove button to snack items inside box */
.box-item .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:#333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer;
  line-height: 1;
}

.box-item .remove-btn:hover {
  transform: scale(1.06);
}

.box-info {
  text-align: center;
  margin-top: .25rem;
  font-size: .95rem;
}

/* Gifts grid */
.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(130px,1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

@media(min-width:768px){
  .gifts-grid {
    grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
    gap: 1.25rem;
  }
}

.gift-card {
  background: #fff;
  border-radius: 12px;
  padding: .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.gift-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,.1);
}

.gift-card.selected {
  border-color: var(--primary);
  background: #fffaf0;
}

.gift-icon {
  font-size: 1.6rem;
  margin-bottom: .4rem;
}

.gift-name {
  font-weight: 600;
}

.gift-price {
  color: var(--secondary);
  font-weight: 700;
  margin-top: .25rem;
}

/* Addons */
.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(140px,1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

@media(min-width:768px){
  .addons-grid {
    grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
    gap: 1.25rem;
  }
}

.addon-card {
  background: #fff;
  border-radius: 12px;
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  align-items: flex-start;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
  border: 2px solid transparent;
  min-height: 86px;
  transition: all 0.3s ease;
}

.addon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,.1);
}

.addon-card.selected {
  border-color: var(--primary);
  background: #fffaf0;
}

.addon-icon {
  font-size: 1.4rem;
}

.addon-name {
  font-weight: 700;
}

.addon-sub {
  color: #666;
  font-size: .85rem;
}

.addon-price {
  color: var(--secondary);
  font-weight: 800;
  margin-top: 6px;
}

/* Forms & Inputs */
.form-input {
  width: 100%;
  padding: .6rem;
  border: 2px solid #eee;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Review Summary */
.review-summary {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.summary-section {
  margin-bottom: .75rem;
  padding-bottom: .75rem;
  border-bottom: 1px dashed #eee;
}

.summary-section:last-child {
  border-bottom: none;
}

.summary-title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: .4rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: .35rem 0;
  font-size: .95rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--secondary);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.close-modal:hover {
  transform: scale(1.1);
  background: #e53935;
}

.customize-option {
  padding: .6rem;
  border: 1px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: .5rem;
}

.customize-option:hover {
  border-color: var(--primary);
  background: #fff9f0;
}

.customize-option.selected {
  border-color: var(--primary);
  background: #fff6df;
}

.customize-group {
  margin-bottom: .5rem;
}

.customize-label {
  font-weight: 700;
  margin-bottom: .25rem;
  display: block;
}

.customize-options {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* Split Screen Choice */
.split-screen {
  display: flex;
  min-height: 70vh;
  margin: 1rem;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .split-screen {
    flex-direction: column;
    gap: 1rem;
    min-height: auto;
  }
}

.split-half {
  flex: 1;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.split-half:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.split-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  height: 100%;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.split-half:hover .split-card {
  border-color: var(--primary);
}

.split-half:active .split-card {
  transform: scale(0.95);
}

.split-emoji {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
}

.split-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.split-desc {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.split-features {
  text-align: left;
  display: inline-block;
  margin-bottom: 2rem;
}

.feature {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  display: flex;
  align-items: center;
}

.feature:before {
  content: "✓";
  color: var(--secondary);
  font-weight: bold;
  margin-left: -1rem;
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* Popup */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  animation: fadeIn 0.3s ease;
}

/* Chat Styles */
.chat-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: bounce 2s infinite;
  position: relative;
}

.chat-icon:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 20px rgba(255, 179, 77, 0.4);
}

.chat-icon:active {
  transform: scale(0.95);
  animation: none;
}

.chat-window {
  display: none;
  position: fixed;
  bottom: 86px;
  right: 18px;
  width: 340px;
  max-height: 680px;
  background: linear-gradient(135deg,#fff,#fff8e1);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow: hidden;
  z-index: 120;
  border: 3px solid var(--primary);
}

.chat-messages {
  padding: 0.8rem;
  min-height: 300px;
  overflow-y: auto;
  max-height: 480px;
  padding-bottom: 0;
}

.chat-input-area {
  flex-shrink: 0;
  border-top: 2px solid var(--primary);
  background: #fff8e1;
  padding: 0.8rem;
  position: relative;
}

.chat-input-container {
  display: flex;
  gap: 6px;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid var(--primary);
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}

.chat-input:focus {
  outline: none;
  border-color: var(--secondary);
}

.send-btn {
  padding: 8px 12px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.send-btn:hover,
.send-btn:active {
  transform: scale(0.9);
}

.quick-reply-buttons {
  margin-bottom: 6px;
}

.quick-btn {
  flex: 1;
  padding: 5px 6px;
  border: 2px solid var(--primary);
  border-radius: 16px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--secondary);
  font-weight: 600;
}

.quick-btn:hover {
  background: var(--primary);
  color: #fff;
}

.bot-message, .user-message {
  margin-bottom: 8px;
  animation: slideIn 0.3s ease-out;
  font-size: 13px;
  line-height: 1.3;
}

.user-message {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.user-message .message-text {
  background: linear-gradient(135deg, var(--primary), #ffb74d);
  color: #fff;
  padding: 6px 10px;
  border-radius: 16px 16px 4px 16px;
  max-width: 220px;
  word-wrap: break-word;
  box-shadow: 0 3px 8px rgba(255, 179, 77, 0.25);
  font-size: 12px;
}

.bot-message .message-text {
  background: #fff;
  border: 1px solid #e1e1e1;
  color: #333;
  padding: 8px 12px;
  border-radius: 16px 16px 16px 4px;
  max-width: 240px;
  word-wrap: break-word;
  line-height: 1.3;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  animation: slideInLeft 0.4s ease-out;
  font-size: 12px;
}

.bot-message .bot-info {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.bot-message .bot-emoji {
  font-size: 16px;
}

.bot-message .bot-name {
  font-weight: 700;
  font-size: 11px;
}

.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffb300;
  margin: 0 1px;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

.bot-decoration {
  animation: sparkle 3s infinite linear;
}

.bot-decoration:first-child {
  animation-delay: 0s;
}

.bot-decoration:nth-child(2) {
  animation-delay: 1s;
}

/* Footer Animations */
@keyframes swimFish {
  0% {
    transform: translateX(calc(100vw + 50px)) translateY(0px);
  }
  25% {
    transform: translateX(calc(75vw + 50px)) translateY(-15px);
  }
  50% {
    transform: translateX(calc(50vw + 50px)) translateY(15px);
  }
  75% {
    transform: translateX(calc(25vw + 50px)) translateY(-15px);
  }
  100% {
    transform: translateX(-100px) translateY(0px);
  }
}

.footer-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #ffeb3b;
}
