/* file: static/styles.css */

/* ============================================================
   SwipeEat UI — aligned to your Restaurant Menu reference file
   BUT preserves the original Like/Dislike/Refresh colors.
   ============================================================ */

:root{
  /* SwipeEat palette (from your brand board) */
  --peach: #FFE8DA;
  --taupe: #5F5143;
  --espresso: #4F3525;
  --olive: #686928;
  --orange: #D17F2D;

  /* App tokens mapped to the palette (match the menu file) */
  --bg: var(--peach);
  --card: #FFF7F1;
  --muted: var(--taupe);
  --text: var(--espresso);

  --accent: var(--orange);
  --accent-600: #B56A22;
  --ring: rgba(209,127,45,.32);

  --radius: 18px;
  --shadow: 0 10px 20px rgba(79,53,37,.16);
  --shadow-strong: 0 16px 28px rgba(79,53,37,.22);
  --stroke: rgba(95,81,67,.22);

  /* Preserve original action colors */
  --like: #28a745;
  --dislike: #dc3545;
  --refresh: #007bff;
  --refresh-600: #0056b3;
  --action-neutral: #f0f0f0;
  --action-border: #dcdcdc;
}

/* Base reset & typography (match) */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, var(--card) 0%, var(--bg) 60%);
  line-height: 1.45;
}

/* Header */
header{
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
}

/* Title */
.title{
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .2px;
  text-shadow: 2px 2px 6px rgba(79,53,37,.18);
  margin: 0;
}

/* Container that defines the available logo area */
.logo-container{
  width: 230px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Image fills the container WITHOUT distortion */
.title-logo{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Reusable hidden class for toggling visibility */
.hidden{ display: none !important; }

/* Invisible class for opacity-based hiding */
.invisible{ opacity: 0; }

/* Main container for the swiping page */
.container{
  width: 80%;
  max-width: 600px;
  transition: opacity 0.3s ease-in-out;
}

/* Card styling (match menu cards) */
.card{
  background: linear-gradient(180deg, var(--card), var(--bg));
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.5s ease, opacity 0.5s ease, box-shadow .12s ease, border-color .12s ease;
}

.card:hover{
  box-shadow: var(--shadow-strong);
  border-color: rgba(95,81,67,.32);
}

.card.swipe-right{
  transform: translateX(100%);
  opacity: 0;
}

.card.swipe-left{
  transform: translateX(-100%);
  opacity: 0;
}

.card img{
  width: 100%;
  border-radius: 12px;
}

/* Transition for the meal image */
#meal-img{
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
}

.card h2{
  margin: 10px 0;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .2px;
}

/* Like/Dislike button area */
.actions{
  margin-top: 20px;
}

.meal-emotion{
  font-style: italic;
  margin-top: 5px;
  color: rgba(95,81,67,.95);
}

.buttons{
  display: flex;
  justify-content: space-around;
  gap: 12px;
}

/* Base action button (keeps original neutral background) */
.button{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;

  background-color: var(--action-neutral);     /* original */
  border: 2px solid var(--action-border);      /* original */
  border-radius: 50%;

  cursor: pointer;
  transition: transform 0.2s ease-in-out, background-color 0.3s ease-in-out;
}

.button:hover{
  background-color: #e0e0e0;                   /* original */
  transform: scale(1.1);                       /* original */
}

.button:focus{
  outline: 3px solid var(--refresh);           /* original focus color family */
  outline-offset: 2px;
}

.button i{
  font-size: 24px;
  color: var(--refresh);                       /* original default icon color */
}

/* Like (original green) */
.button.like{
  border-color: var(--like);
}
.button.like i{
  color: var(--like);
}

/* Dislike (original red) */
.button.dislike{
  border-color: var(--dislike);
}
.button.dislike i{
  color: var(--dislike);
}

/* Refresh (original blue) — apply if you have a refresh class */
.button.refresh{
  border-color: var(--refresh);
}
.button.refresh i{
  color: var(--refresh);
}

/* Meal of the Day page container (menu-like cards) */
.meal-of-the-day-container{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 20px;
  box-sizing: border-box;
  width: 80%;
  max-width: 600px;

  background: linear-gradient(180deg, var(--card), var(--bg));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.meal-of-the-day-container img{
  width: 100%;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* Keep original blue button styling here (as before) */
.meal-of-the-day-container button{
  margin-top: 20px;
  padding: 10px 20px;
  background-color: var(--refresh);            /* original */
  color: #ffffff;
  border: none;
  border-radius: 5px;                          /* original */
  cursor: pointer;
}

.meal-of-the-day-container button:hover{
  background-color: var(--refresh-600);        /* original */
}

/* Welcome page styling */
.welcome-body{
  background: url("{{ url_for('static', filename='images/food_background.jpg') }}") no-repeat center center;
  background-size: cover;

  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

/* Welcome container (menu-like glass card) */
.welcome-container{
  background-color: rgba(255,247,241, 0.88);
  padding: 40px;
  border-radius: 16px;
  max-width: 500px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(8px);
}

.app-title{
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--text);
}

.welcome-message{
  font-size: 1.1rem;
  color: rgba(95,81,67,.95);
  margin-bottom: 30px;
  line-height: 1.4;
}

/* Keep original green start button (as before) */
.start-button{
  display: inline-block;
  padding: 14px 28px;
  background-color: var(--like);               /* original */
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;                          /* original */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.start-button:hover{
  background-color: #218838;                   /* original */
  transform: scale(1.05);
}

/* Optional utility */
.sr-only{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.progress-panel{
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,247,241,.78);
  box-shadow: 0 6px 14px rgba(79,53,37,.08);
}

.progress-copy{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: .92rem;
  font-weight: 800;
  color: var(--espresso);
}

#progress-remaining{
  color: rgba(95,81,67,.9);
  font-weight: 700;
}

.progress-track{
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(95,81,67,.18);
}

.progress-bar{
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--olive), var(--orange));
  transition: width .25s ease;
}

.card{
  position: relative;
  touch-action: none;
  user-select: none;
}

.card.dragging{
  transition: none;
  cursor: grabbing;
}

.swipe-choice{
  position: absolute;
  top: 96px;
  z-index: 2;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(255,247,241,.86);
  border: 2px solid transparent;
}

.choice-like{
  right: 22px;
  color: var(--like);
  border-color: var(--like);
  opacity: 1;
}

.choice-skip{
  left: 22px;
  color: var(--dislike);
  border-color: var(--dislike);
  opacity: 1;
}

.swipe-hint{
  margin-top: 8px;
  color: rgba(95,81,67,.86);
  font-size: .9rem;
}

button.button{
  padding: 0;
}
