/* Chat CSS - Input sections, meal input, camera, chat messages */

.input-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 154, 158, 0.2);
  position: relative;
  overflow: hidden;
}

.input-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9a9e, #fecfef, #4caf50);
  border-radius: 20px 20px 0 0;
}

.input-label {
  font-weight: 600;
  margin-bottom: 15px;
  color: #5d4037;
  font-size: 1.1em;
  text-align: center;
}

.meal-input {
  width: 100%;
  padding: 18px;
  border: 2px solid #ddd;
  border-radius: 15px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.meal-input:focus {
  outline: none;
  border-color: #ff9a9e;
  box-shadow: 0 0 0 4px rgba(255, 154, 158, 0.15);
  transform: translateY(-2px);
  background: white;
}

.camera-section {
  text-align: center;
  margin-bottom: 25px;
}

.camera-btn {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  color: #5d4037;
  border: none;
  padding: 18px 35px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
  position: relative;
  overflow: hidden;
}

.camera-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.camera-btn:hover::before {
  left: 100%;
}

.camera-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 154, 158, 0.4);
}

.chat-messages {
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
  background: white;
  border-radius: 15px;
  border: 1px solid #eee;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.message {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 15px;
  animation: slideIn 0.4s ease-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.message.user {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  margin-left: 20px;
  border-left: 4px solid #2196f3;
}

.message.ai {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  margin-right: 20px;
  border-left: 4px solid #9c27b0;
}

/* Avoided foods warning styling */
.avoided-foods-warning {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  color: #e65100;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.85em;
  font-weight: 600;
  border-left: 4px solid #ff9800;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
  animation: warningPulse 2s ease-in-out infinite;
}

/* Prominent warning styling */
.avoided-foods-warning.prominent {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: #c62828;
  padding: 15px 18px;
  border-radius: 12px;
  margin: 15px 0;
  font-size: 0.95em;
  font-weight: 600;
  border: 2px solid #f44336;
  box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
  animation: prominentWarningPulse 1.5s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.avoided-foods-warning.prominent::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f44336, #ff9800, #f44336);
  animation: warningMove 2s linear infinite;
}

@keyframes prominentWarningPulse {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
    transform: scale(1.02);
  }
}

@keyframes warningMove {
  0% {
    background-position: -100px 0;
  }
  100% {
    background-position: 100px 0;
  }
}

/* Chat-specific warning styling */
.message.ai .avoided-foods-warning {
  margin: 12px 0;
  font-size: 0.9em;
  line-height: 1.4;
}

@keyframes warningPulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
  }
  50% {
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.4);
  }
}

/* File input */
#fileInput {
  display: none;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.quick-btn {
  padding: 15px;
  background: linear-gradient(
    135deg,
    rgba(255, 154, 158, 0.1),
    rgba(254, 207, 239, 0.1)
  );
  border: 2px solid rgba(255, 154, 158, 0.3);
  border-radius: 15px;
  cursor: pointer;
  text-align: center;
  font-size: 0.9em;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.quick-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 154, 158, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.quick-btn:hover::before {
  left: 100%;
}

.quick-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 154, 158, 0.2),
    rgba(254, 207, 239, 0.2)
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 154, 158, 0.2);
  border-color: rgba(255, 154, 158, 0.5);
}
