button[disabled]:hover {
  cursor: not-allowed;
}

/**
 * Main container
 */


.email-ai-response-container {
  border: 1px solid #e6e7eb;
  padding: 1.5rem;
  width: 100%;
}

/**
 * Textareas
 */

textarea {
  flex-grow: 1;
  width: 100%;
  resize: none;
}

.textareas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 60fr 40fr;
  gap: 1rem;
  width: 100%;
  height: 30rem;
}

.input-textarea {
  position: relative;
  border: 1px solid #CED4DA;
  border-radius: 0.25rem;
  transition: height 0.2s ease-in-out, border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 0.5rem;
}

.input-textarea:focus-within {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.email-to-reply-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1;
}

.email-to-reply-subject-container {
  display: flex;
  justify-content: space-between;
  height: 100%;
  flex-direction: column;
  grid-column: 1;
  grid-row: 2;
}

.email-to-reply-subject-textarea {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
}

.result-textarea-container {
  background-color: #F5F7F9;
  display: flex;
  width: 100%;
  flex-grow: 1;
  flex-direction: column;
  border: 1px solid #CED4DA;
  border-radius: 0.25rem;
  padding: 0.5rem;
}

.result-textarea {
  background-color: #F5F7F9;
  outline: none;
  border: none
}

.result-textarea[focus] {
  outline: none;
}

.result-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  grid-column: 2; /* Colonne 2 */
  grid-row: 1 / span 2; /* Occupe les deux lignes (100% de la hauteur) */
}

.generate-btn-container {
  display: flex;
  justify-content: flex-end;
}

.generate-btn {
  width: fit-content;
  display: inline-block;
  margin: 1rem 0 0 0;
}

@media screen and (max-width: 991px) {
  .textareas {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .email-ai-response-container {
    height: 50em;
  }

  .email-to-reply-container,
  .email-to-reply-subject-container,
  .result-container {
    width: 100%;
    margin-bottom: 1rem;
  }

  .email-to-reply-container,
  .result-container {
    max-height: 20rem;
  }

  .email-to-reply-subject-container {
    max-height: 10rem;
  }

}

.textareas > div {
  flex: 1 1 0;
}

.textarea-container textarea {
  resize: none;
  background: none;
  position: relative;
}

.textarea-container.result textarea {
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
}

.textarea-container textarea,
.textarea-container textarea:focus,
.textarea-container textarea:focus-visible,
.textarea-container textarea:active {
  border: none;
  outline: none;
}

.textarea-container.result textarea,
.textarea-container.result textarea:disabled,
.textarea-container.result textarea:focus {
  background-color: #F5F7F9;
}

.top-right-btn {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0.75rem 0.75rem 0 0;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-right-btn svg {
  opacity: 0.8;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.top-right-btn:hover svg {
  opacity: 1;
}

.top-right-btn.hide {
  opacity: 0;
  pointer-events: none;
}

/**
 * Skeleton loaders
 */

@keyframes skeleton-loader-fade {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }

  50% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

.result-skeleton {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem 0.75rem
}

.result-skeleton-line {
  background: #CED4DA;
  max-width: 15rem;
  height: 1rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
}

.result-skeleton-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, transparent 0%, #e6e7eb 50%, transparent 100%);
  animation: skeleton-loader-fade 1.5s linear infinite;
}

.result-skeleton-line:nth-child(1) {
  width: 6rem;
  margin-bottom: 1.5rem;
}

.result-skeleton-line:nth-last-child(3) {
  margin-bottom: 1.5rem;
}

.result-skeleton-line:nth-last-child(2) {
  width: 5rem;
}

.result-skeleton-line:nth-last-child(1) {
  width: 3rem;
}

/**
 * Result sub-container
 */

.result-sub-container {
  display: flex;
  flex-grow: 1;
  position: relative;
}

/**
 * Error
 */

.result-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  width: 100%;
  height: 100%;
}

.result-error span {
  text-align: center;
  color: #6C757D;
}

.result-error .retry-btn {
  background: white;
  color: #000000A1;
  border: 1px solid #D4D9DF;
  padding: 0.4rem 0.75rem;
}

.result-error .retry-btn:hover {
  color: #000000;
}


/**
 * Refine
 */

.refine-outer {
  position: absolute;
  bottom: 0;
  width: 100%;
  transition: opacity 0.2s ease-in-out;
}

.refine-outer.hide {
  opacity: 0;
  pointer-events: none;
}

.refine-tooltip {
  position: absolute;
  bottom: 0.5rem;
  right: 3rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #1A53FF;
  color: white;
  font-size: 0.8rem;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.refine-tooltip::after {
  content: '';
  position: absolute;
  right: -0.4rem;
  bottom: 0.65rem;
  width: 0;
  height: 0;
  border-top: 0.425rem solid transparent;
  border-bottom: 0.425rem solid transparent;
  border-left: 0.425rem solid #1A53FF;
}

.refine-container {
  background: #1a53ff;
  position: absolute;
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.65, 0.05, 0.36, 1),
  background 0.2s ease;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  overflow: hidden;
}

.refine-container.is-opened {
  padding: 1rem;
  width: 100%;
  height: 6.75rem;
  right: 0;
  bottom: 0;
  border-bottom-left-radius: 0.2rem;
  border-bottom-right-radius: 0.2rem;
}

.refine-container:not(.is-opened) {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  box-shadow: 0px 0px 19px 0px rgba(58, 58, 58, 0.34);
  width: 1.75rem;
  height: 1.75rem;
  bottom: 0.75rem;
  right: 0.75rem;
}

.refine-container:not(.is-opened):hover {
  background: #184be6;
  cursor: pointer;
}

.refine-container .close-btn {
  margin: 0.5rem 0.5rem 0 0;
}

.refine-container .refine-title {
  display: flex;
  flex-direction: row;
}

.refine-container.is-opened .refine-title svg {
  margin: 0 0.25rem 0 0;
  flex-shrink: 0;
}

.refine-container:not(.is-opened) .refine-title svg {
  transition: margin 0.2s ease-in-out;
  margin: 0.25rem;
}

.refine-container .refine-title span {
  color: white;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-wrap: nowrap;
}

/**
 * Refine actions
 */

.refine-actions {
  margin-top: 0.5rem;
  gap: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  animation: appear-fade 0.3s 0.5s ease-out forwards;
}

.refine-actions .btn {
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
  justify-content: center;
}

.refine-actions .btn.is-loading {
  background: white;
  opacity: 1;
}

.refine-actions .btn[disabled]:hover {
  cursor: not-allowed
}

/* Text */

.refine-actions .btn span {
  transition: all 0.2s ease;
  color: white;
  text-transform: capitalize;
}

.refine-actions .btn:not([disabled]):hover span,
.refine-actions .btn.is-loading span {
  color: #1a53ff;
}

/* Icon */

.refine-actions .btn svg {
  fill: white;
  opacity: 0.5;
  transition: all 0.2s ease;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.refine-actions .btn:not([disabled]):hover svg,
.refine-actions .btn.is-loading svg {
  opacity: 1;
  fill: #1a53ff;
}

/**
 * Refine responsive
 */

@media screen and (max-width: 575px) {
  .refine-container.is-opened {
    height: 13.25rem;
  }

  .refine-actions {
    grid-template-columns: unset;
    grid-template-rows: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .refine-actions .btn {
    margin: 0;
  }
}

.fade-enter-active, .fade-leave-active {
  transition: opacity 0.5s;
}

.fade-enter, .fade-leave-to {
  opacity: 0;
}

.refine-content {
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.65, 0.05, 0.36, 1);
}
