/* iFeedeBook - mobile comment row fit */

/*
  Corrige mobile:
  - El botón Comentar se salía del ancho.
  - El input ahora se achica para dejar lugar al botón de iconos y Comentar.
  - No toca JS, picker ni lógica.
*/

.comment-form,
.page-comment-form,
.retro-page-comment-form {
  width: 100% !important;
  box-sizing: border-box !important;
}

.comment-form .form-row,
.page-comment-form .form-row,
.retro-page-comment-form .form-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.comment-form input[name="content"],
.page-comment-form input[name="content"],
.retro-page-comment-form input[name="content"],
.comment-form textarea[name="content"],
.page-comment-form textarea[name="content"],
.retro-page-comment-form textarea[name="content"] {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

.comment-form .ifb-final-comment-icon-button,
.comment-form .ifb-comment-inline-icon-button,
.comment-form .ifb-lite-icon-button,
.page-comment-form .ifb-final-comment-icon-button,
.page-comment-form .ifb-comment-inline-icon-button,
.page-comment-form .ifb-lite-icon-button,
.retro-page-comment-form .ifb-final-comment-icon-button,
.retro-page-comment-form .ifb-comment-inline-icon-button,
.retro-page-comment-form .ifb-lite-icon-button {
  flex: 0 0 31px !important;
  width: 31px !important;
  min-width: 31px !important;
  max-width: 31px !important;
}

.comment-form button[type="submit"],
.page-comment-form button[type="submit"],
.retro-page-comment-form button[type="submit"] {
  flex: 0 0 82px !important;
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
  height: 30px !important;
  padding: 2px 6px !important;
  box-sizing: border-box !important;
}

@media (max-width: 390px) {
  .comment-form .form-row,
  .page-comment-form .form-row,
  .retro-page-comment-form .form-row {
    gap: 3px !important;
  }

  .comment-form .ifb-final-comment-icon-button,
  .comment-form .ifb-comment-inline-icon-button,
  .comment-form .ifb-lite-icon-button,
  .page-comment-form .ifb-final-comment-icon-button,
  .page-comment-form .ifb-comment-inline-icon-button,
  .page-comment-form .ifb-lite-icon-button,
  .retro-page-comment-form .ifb-final-comment-icon-button,
  .retro-page-comment-form .ifb-comment-inline-icon-button,
  .retro-page-comment-form .ifb-lite-icon-button {
    flex-basis: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
  }

  .comment-form button[type="submit"],
  .page-comment-form button[type="submit"],
  .retro-page-comment-form button[type="submit"] {
    flex-basis: 78px !important;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

@media (max-width: 340px) {
  .comment-form button[type="submit"],
  .page-comment-form button[type="submit"],
  .retro-page-comment-form button[type="submit"] {
    flex-basis: 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    font-size: 10px !important;
  }

  .comment-form button[type="submit"] .ifb-comment-submit-inner,
  .page-comment-form button[type="submit"] .ifb-comment-submit-inner,
  .retro-page-comment-form button[type="submit"] .ifb-comment-submit-inner {
    gap: 2px !important;
  }
}
