/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 /* Custom animations for expandable message sections */

/* Smooth transitions for expandable sections */
.message-content {
  transition: all 0.3s ease-in-out;
}

/* Icon rotation for toggle button */
.rotate-180 {
  transform: rotate(180deg);
}

/* Smooth max-height transitions for expandable content */
[data-expandable-message-target="details"] {
  transition: max-height 0.3s ease-out;
}

/* Thinking indicator pulse animation */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   GRADIENT BACKGROUND ANIMATION
   ============================================ */

/* Animated gradient background keyframes */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Gradient background class */
.animated-gradient {
  position: relative;
  overflow: hidden;
}

/* Elliptical gradient overlay positioned top-right */
.animated-gradient::before {
  content: '';
  position: absolute;
  top: -20%; /* Offset upward */
  right: -40%; /* Offset to the right */
  width: 80%; /* Control ellipse width */
  height: 80%; /* Control ellipse height */
  background: linear-gradient(
    135deg,
    #CFF09EB2,
    #FFE0B2B2
  );
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
  border-radius: 100%; /* Creates elliptical shape */
  filter: blur(60px); /* Soften edges for a more organic look */
  pointer-events: none; /* Ensure it doesn't interfere with interactions */
  z-index: 0;
}

/* Ensure content appears above the gradient */
.animated-gradient > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   FLOATING FOOD ELEMENTS ANIMATION
   ============================================ */

/* Float up and down smoothly */
@keyframes float-vertical {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(-20px) translateX(10px);
  }
}

/* Circular floating motion */
@keyframes float-circle {
  0% {
    transform: rotate(0deg) translateX(10px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(10px) rotate(-360deg);
  }
}

/* Diagonal drift */
@keyframes float-diagonal {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(15px, -15px);
  }
  50% {
    transform: translate(30px, 0px);
  }
  75% {
    transform: translate(15px, 15px);
  }
}

/* Gentle rotation while floating */
@keyframes gentle-rotate {
  0%, 100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

/* ============================================
   FLOATING ELEMENT CLASSES
   ============================================ */

/* Base floating element style */
.floating-food {
  position: absolute;
  opacity: 0.15; /* CONFIGURABLE: Adjust opacity (0.1-0.3 recommended) */
  pointer-events: none; /* Prevents interaction with floating elements */
  transition: opacity 0.3s ease;
}

/* Different animation variations */
.float-1 {
  animation: float-vertical 8s ease-in-out infinite;
  animation-delay: 0s;
}

.float-2 {
  animation: float-diagonal 12s ease-in-out infinite;
  animation-delay: 2s;
}

.float-3 {
  animation: float-circle 20s linear infinite;
  animation-delay: 4s;
}

.float-4 {
  animation: float-vertical 10s ease-in-out infinite;
  animation-delay: 1s;
}

.float-5 {
  animation: float-diagonal 15s ease-in-out infinite;
  animation-delay: 3s;
}

.float-6 {
  animation: float-circle 18s linear infinite;
  animation-delay: 5s;
}

/* Add gentle rotation to some elements */
.with-rotation {
  animation: float-vertical 8s ease-in-out infinite, 
             gentle-rotate 6s ease-in-out infinite;
}

/* ============================================
   INPUT BOX STYLING
   ============================================ */

/* Elegant input container with backdrop blur */
.input-container {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
}

.input-container:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.9);
}

.fancy-input {
  width: 100%;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0px 0px 8px 0px #E8D2B780;
  border: 1.5px solid transparent;
  background: 
    linear-gradient(white, white) padding-box,
    linear-gradient(90deg, #FFE0B2, #C1DA8C) border-box;
}

.fancy-input:focus {
  outline: none;
  border: 1px solid black;
}

/* ============================================
   WELCOME TEXT ANIMATIONS
   ============================================ */

/* Fade in from bottom */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fade-up 1s ease-out;
}

.fade-up-delay-1 {
  animation: fade-up 1s ease-out 0.2s both;
}

.fade-up-delay-2 {
  animation: fade-up 1s ease-out 0.4s both;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .floating-food {
    opacity: 0.1; /* Reduce opacity on mobile for better readability */
  }
}


/* ============================================
   CONVERSATION VIEW STYLES
   ============================================ */


/* Glass message bubbles */
.glass-message-user {
  backdrop-filter: blur(20px);
  background: rgba(102, 126, 234, 0.9);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 80%;
}

.glass-message-assistant {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 85%;
}

/* Submit button */
.conversation-submit-btn {
  /* background: linear-gradient(135deg, #CFF09EB2, #FFE0B2B2);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); */
}

.conversation-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.conversation-submit-btn:active {
  transform: translateY(0);
}

/* Smooth scrolling for messages */
#messages-container {
  scroll-behavior: smooth;
}

/* Message entry animation */
@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: message-slide-in 0.3s ease-out;
  position: relative; /* Ensure messages use normal document flow */
}

/* Remove any absolute positioning from messages */
.message.user,
.message.assistant {
  position: relative;
  display: block;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS FOR CONVERSATION
   ============================================ */

@media (max-width: 768px) {
  .glass-message-user,
  .glass-message-assistant {
    max-width: 90%;
  }
 }

/* ============================================
   CACHED PLACE DETAILS STYLES
   ============================================ */
.image-and-details {
  background-color: #3E3837;
  padding: 1rem 0 1rem 1rem;
}

/* ============================================
   Help me decide STYLES
   ============================================ */
.checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #A7A7A7;
  border-radius: 0.25rem;          
}

.checkbox:checked {
  background-color: var(--color-primary);      
  border-color: var(--color-primary);
  color: white
}

.option-selection {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  border: 1.5px solid #DDDDDD;
  border-radius: 0.5rem;       
  color: #7C6D6D;
  background-color: white;
}

.additional-notes-container {
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #DDDDDD;
  background-color: #F7F5F5;
}

.additional-notes {
  width: 100%;
  border: 1.5px solid #DDDDDD;
  border-radius: 0.5rem;
  color: black;
  padding: 0.75rem;
  background-color: white;
}

.additional-notes:focus {
  border-color: black;
  outline: none;       
}

.additional-notes::placeholder {
  color: #D2D2D2;
}

.text-md-bold{
  font-size: var(--h-medium);   
  font-weight: 600;  
}

.horizontal-line {
  border: 1px solid #DDDDDD;
}

.craving-option {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1.5px solid #DDDDDD;
  border-radius: 0.5rem;       
  color: #7C6D6D;
  cursor: pointer;
  position: relative;
  background-color: white;
}

.craving-option-checklist {
  position: absolute;
  top: -0.5rem;     
  right: -0.5rem;
  padding: 0.25rem;
  border-radius: 50%;
  background-color: var(--color-primary);
}

.selected {
  border: 1.5px solid var(--color-primary);
  background-color: #FFF5F5;
}

.disabled {
  background-color: #F1F0F0;
  color: #C3C3C3;
}

.search-input {
  width: 100%;
  border-radius: 0.5rem;
  background-color: white;
  border: 1.5px solid #DDDDDD;
  padding: 0.625rem 0.625rem 0.625rem 2.25rem;
}

.search-input:focus {
  border-color: #DDDDDD;
  outline: none;
}

.selected-location {
  flex-direction: row;
  border-radius: 0.5rem;
  padding: 0.75rem 0.5rem;
  align-items: center;
}

.add-location-section {
  flex-direction: column;
  text-align: center;
  gap: 0.5rem;
  align-items: center;
}

.ringgit-text {
  background-color: #F1F0F0;
  color: #C3C3C3;
  padding: 0.75rem;
  border-radius: 0.75rem 0 0 0.75rem;
  border: 1.5px solid #DDDDDD;
}

.budget-input {
  width: 100%;
  border-radius: 0 0.75rem 0.75rem 0;
  background-color: white;
  border: 1.5px solid #DDDDDD;
  border-left: none;
  padding: 0.75rem;
}

.budget-input:focus {
  border-color: #DDDDDD;
  outline: none;       
}

/* ============================================
   SHARED STYLES
   ============================================ */
.text-lg {
  font-size: var(--h-large);   
  font-weight: 600;  
}

.text-md {
  font-size: var(--h-medium);
  font-weight: 400;
}

.text-sm {
  font-size: var(--h-small); 
  font-weight: 400;      
}

.type {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: var(--h-small); 
  font-weight: 400;  
  background-color: var(--color-type-background);
  color: var(--color-type)
}

.source {
  font-size: var(--h-small); 
  font-weight: 400;  
  border-radius: 0.5rem;
  padding: 0.25rem;
  border: 1px solid #DDDDDD;
  display: inline-block;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background-color: var(--color-primary);
  border-radius: 0.5rem;
  padding: 0.75rem 0;
  color: white;
}

.submit-button:disabled {
  background-color: #F1F0F0;
  color: #C3C3C3;
  cursor: not-allowed;
}

.bottom-modal {
  position: fixed;       
  bottom: 0;             
  left: 50%;           
  transform: translateX(-50%); 
  width: 100%;           
  max-width: 896px;     
  padding: 1rem 1rem 0.75rem 1rem;
  border-radius: 1.75rem 1.75rem 0 0;
  top: auto;
}

.bottom-modal::backdrop {
  background: linear-gradient(#3A2E2E66 40%, #3A2E2E66 100%);
}

dialog.bottom-modal:not([open]) {
  display: none;
}

.button-modal {
  flex: 1;
  padding: 0.65rem 0;
  border-radius: 0.5rem;
  text-align: center;
}

.message-bar {
  display: flex;
  flex-direction: row;
  position: fixed;
  justify-content: space-between;
  transform: translateY(-100%);
  align-items: flex-start;
  width: 90%;
  max-width: 896px;     
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: white;
  box-shadow: 0px 0px 8px 0px #E8D2B780;
}

.message-bar.show {
  transform: translateY(0);
  top: 20px;
}

.message-bar.hide {
  transform: translateY(-100%);
  top: -100%;
}

input, textarea {
  font-size: 1rem;
  line-height: 1.5rem;
}

.circle-background {
  position: fixed;       
  width: 100vw;
  height: 100vw;
  border-radius: 50%;   
  top: -5vw;            
  right: -40vw; 
  background: linear-gradient(77.18deg, rgba(207, 240, 158, 0.7) -21.46%, rgba(255, 224, 178, 0.7) 53.39%);
  filter: blur(64px);
}

@media (min-width: 576px) {
  .circle-background {
    width: 80vw;
    height: 80vw;
    right: -30vw; 
  }
}

@media (min-width: 768px) {
  .circle-background {
    width: 70vw;
    height: 70vw;        
    right: -20vw; 
    top: -2vw;
    max-height: 50vh;
  }
}