/* Card */
.encourage-card {
  max-width: 620px;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 50px 50px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  margin: auto;
  border: 1px solid #eee6d8;
  margin-top: 40px;
}

/* Header */
.encourage-header h2 {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: normal;
  color: #3a3a3a;
}

.encourage-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b8e6e;
  font-weight: bold;
  padding-bottom: 20px;
}

/* Profile section */
.encourage-profile {
  display: flex;
  align-items: flex-start; /* lock to top */
  gap: 22px;
  margin-top: 24px;
}

/* Ensure wrapper clips the zoom */
.encourage-avatar {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  display: block;
  overflow: hidden;        /* 👈 important */
  border-radius: 50%;
}

/* Image base state */
.encourage-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.35s ease;  /* 👈 smooth + gentle */
}

/* Hover zoom */
.encourage-avatar:hover img {
  transform: scale(1.06);  /* 👈 subtle zoom */
}

/* Info */
.encourage-card .encourage-profile .encourage-info h3.encourage-name {
  margin: 0;
  font-size: 1.3rem;
  color: #2f2f2f;
}

.encourage-subtext {
  margin: 8px 0 18px;
  font-size: 0.95rem;
  color: #777;
}

/* Button */
.encourage-card .send-message {
  transition: all 0.2s ease;
}

.encourage-card .send-message:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}



/* Prompt */
.wriwoods-encourage-prompt-text {
  margin: 8px 0 18px;
  font-size: 0.95rem;
  color: #777;

}

/* Refresh button */
.wriwoods-encourage-prompt-refresh {
    color: gray;
    cursor: pointer;
    font-size: 24px;
    opacity: .5;
    transition: opacity .2s ease, transform .2s ease;
}

.wriwoods-encourage-prompt-refresh:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/** Encourage button **/
.encourage-cta-button {
  display: inline-block;
  background-color: var(--wriwoods-primary-color);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.encourage-cta-button:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  color: #fff;
}

.encourage-cta-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.encourage-cta-button:focus {
  outline: 2px solid #a0c4a0;   /* subtle focus ring */
  outline-offset: 3px;
}

/* Visibility container */
.wriwoods-encourage-visibility-container {
  opacity: 0;
  max-height: 0;             /* collapse vertically */
  overflow: hidden;          /* prevent content from showing */
  transition: 
    opacity 0.3s ease, 
    max-height 0.6s ease;
}

/* Visible state */
.wriwoods-encourage-visibility-container.is-visible {
  opacity: 1;
  max-height: 500px; /* should be larger than the content height */
}

/* Mobile responsive */
@media (max-width: 600px) {

  /* Card padding */
  .encourage-card {
    padding: 20px 20px 30px;
    border-radius: 14px;
  }

  /* Header font sizes */
  .encourage-header h2 {
    font-size: 1.3rem;
    text-align: center;
  }

  .encourage-label {
    font-size: 0.75rem;
    padding-bottom: 16px;
  }

  /* Profile section stacks vertically */
  .encourage-profile {
    flex-direction: column;
    align-items: center;  /* center avatar and info */
    gap: 16px;
    margin-top: 20px;
  }

  /* Avatar smaller on mobile */
  .encourage-avatar {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
  }

  .encourage-avatar img {
    width: 100%;
    height: 100%;
  }

  /* Info text centered */
  .encourage-info {
    text-align: center;
  }

  .encourage-info h3.encourage-name {
    font-size: 1.15rem;
  }

  .encourage-subtext {
    font-size: 0.9rem;
  }

  /* Prompt text smaller */
  .wriwoods-encourage-prompt-text {
    font-size: 0.9rem;
  }

  /* Encourage CTA button full width */
  .encourage-cta-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
  }

  /* Visibility container max-height for mobile */
  .wriwoods-encourage-visibility-container.is-visible {
    max-height: 1000px; /* increase if content can wrap more */
  }
}