/* recipe-chat.page.scss */
.header-bar {
  --background: linear-gradient(135deg, #48BB78 0%, #38B2AC 100%);
  --color: white;
  
  .app-title {
    font-family: 'PingFang SC', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
  }
  
  .header-icon {
    font-size: 1.8em;
    margin-right: 12px;
    color: rgba(255,255,255,0.9);
  }
}

.chat-content {
  --background: #f7fafc;
}

.messages-container {
  padding: 16px;
  padding-bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message-wrapper {
  &.user {
    align-self: flex-end;
    max-width: 75%;
    
    .message-bubble {
      background: white;
      border-radius: 18px 4px 18px 18px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      padding: 12px 16px;
      
      .message-text {
        color: #2d3748;
        font-weight: 500;
      }
      
      .message-time {
        color: #718096;
        font-size: 12px;
        margin-top: 4px;
      }
    }
  }
}

.recipe-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin: 8px 0;
  
  .recipe-image {
    height: 200px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
  }

  .recipe-title {
    font-size: 1.2em;
    color: #2d3748;
    font-weight: 600;
  }

  .section-title {
    color: #48BB78;
    font-weight: 500;
    margin: 16px 0 8px;
    font-size: 1.1em;
  }

  ion-item {
    --padding-start: 0;
    --inner-padding-end: 0;
    --min-height: 40px;
  }

  .step-badge {
    --background: #48BB78;
    --color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nutrition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
    
    .nutrition-item {
      background: #f7fafc;
      padding: 12px;
      border-radius: 8px;
      text-align: center;
      
      ion-icon {
        font-size: 24px;
        color: #48BB78;
        margin-bottom: 8px;
      }
      
      div {
        font-size: 12px;
        color: #4a5568;
      }
    }
  }
}

.input-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.input-box {
  display: flex;
  gap: 12px;
  align-items: center;
}

.custom-searchbar {
  --background: #edf2f7;
  --border-radius: 24px;
  --box-shadow: none;
  flex: 1;
  
  &.searchbar-has-focus {
    --background: white;
    --box-shadow: 0 0 0 2px #48BB7833;
  }
}

.search-button {
  --border-radius: 50%;
  --padding-start: 0;
  --padding-end: 0;
  width: 48px;
  height: 48px;
  --background: linear-gradient(135deg, #48BB78 0%, #38B2AC 100%);
  
  &:disabled {
    opacity: 0.6;
  }
  
  ion-icon {
    color: white;
  }
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.recipe-card {
  animation: fadeIn 0.5s ease-out;
}