/*
filename: RandomPlantGenerator.css
author: Evan Lanza
student id last four: 8804
cs username: elanza05
*/

/* =========================================
   PLANT GENERATOR CONTAINER
   Main container for the plant generator
   ========================================= */
#plant-gen-box {
  text-align: center;
  width: 100%;
  /* Changed height to a strict height to completely freeze resizing */
  height: 600px; 
  margin: 0 auto;
  padding: 20px;
  background-color: #eef5ea;
  color: #1a3a16;
  border-radius: 25px;
  border: 10px solid #c0dd97;
  /* Ensures padding/border don't increase the width */
  box-sizing: border-box;
  position: relative;
  /* Flexbox used to stack elements vertically */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

/* GENERATOR HEADING */
#plant-gen-box h2 {
  margin-top: 10px;
  margin-bottom: 10px;
  height: 40px;
  font-size: 2.5rem;
}

/* =========================================
   PLANT DISPLAY AREA
   The section of the generator containing
   the plant image
   ========================================= */
#plant-gen-box .plant-display {
  margin: 20px 0 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 250px;
}

/* INDIVIDUAL PLANT IMAGE STYLING */
.plant-display img {
  width: 200px;
  height: 250px;
  /* Ensures photo fills dimensions without stretching */
  object-fit: cover;
  /* Duration for the rotation animation */
  transition: transform 0.8s ease;
  /* Ensure the image doesn't have extra bottom margin */
  margin: 0;
}

/* GENERATED PLANT IMAGE STYLING */
.plant-display img.generated {
  border: 2px solid #1a3a16;
  border-radius: 25px;
}

/* =========================================
   PLANT TITLES AND DESCRIPTIONS
   ========================================= */
/* PLANT NAME TEXT */
#plantName {
  font-size: 1.75rem;
  margin: 10px 0 5px 0;
  font-weight: 600;
}

/* PLANT DESCRIPTION TEXT */
#plantDescription {
    height: 60px;
    margin: 0 80px;
    font-size: 1.25rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LATIN NAME FORMATTING */
.latin {
    font-style: italic;
}

/* =========================================
   ANIMATION CLASSES
   Class applied via JavaScript to trigger
   a rotation animation
   ========================================= */
.spin {
    transform: rotate(360deg);
}

/* =========================================
   INTERACTIVE BUTTONS
   Generate and Shop button styling
   ========================================= */
.generator-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    padding-bottom: 10px;
}

/* BUTTON STYLING */
.generator-controls button {
    border-radius: 25px;
    padding: 12px 25px;
    width: 180px;            
    font-size: 1.15rem;      
    cursor: pointer;
    background-color: #c2deba;
    color: #1a3a16;
    border: 2px solid #1a3a16;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

/* HOVER EFFECT FOR BUTTONS */
.generator-controls button:hover {
    background-color: #678f62;
    color: #eef5ea;
}
