.comments-thread .comments-thread {
  padding-inline-start: 15px;
  border-inline-start: 1px solid grey;
}
.comments-comment {
  border-bottom: 1px solid grey;
}
.comments-comment:last-child {
  border-bottom: none;
}
.comments-comment.mobile-hidden-comment {
  border-bottom: none;
}
.comment {
  padding: 24px 0px 13px;
}
.comment .comment-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 11px;
}
.comment .comment-heading .comment-authored {
  display: flex;
  flex: 1;
  align-items: center;
  margin-bottom: 11px;
  margin-inline-end: 15px;
}
.comment .comment-heading .comment-authored .author-avatar {
  margin-inline-end: 8px;
}
.comment .comment-heading .comment-authored .author-avatar img {
  object-fit: contain;
}
.comment .comment-heading .comment-authored .comment-meta .author-name {
  font-size: 520px;
  font-size: 16px;
  line-height: 24px;
}
.comment .comment-heading .comment-authored .comment-meta .comment-date {
  font-size: 12px;
  line-height: 22px;
  white-space: nowrap;
}
.comment .comment-heading .comment-actions .comment-action {
  margin-inline-end: 16px;
  margin-bottom: 16px;
}
.comment .comment-heading .comment-actions .comment-action:last-child {
  margin-inline-end: 0;
}

.comment .comment-body {
  margin-bottom: 11px;
}

.comment .comment-body .comment-content {
  font-size: 16px;
  line-height: 24px;
}

.comment .comment-body .comment-content img {
  max-width: 100%;
}

.comment .comment-footer .reply-actions .reply-action {
  margin-top: 10px;
  margin-inline-end: 16px;
  margin-bottom: 16px;
}

.comment .comment-footer .reply-actions .reply-action:last-child {
  margin-inline-end: 0;
}

/* Estilos para modales de confirmación */
.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-width: 500px;
  width: 90%;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.modal-header {
  margin-bottom: 15px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-footer .btn {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.modal-footer .btn-secondary {
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #333;
}

.modal-footer .btn-danger {
  background: #dc3545;
  border: 1px solid #dc3545;
  color: white;
}

.modal-footer .btn:hover {
  opacity: 0.9;
}

/* Estilos para el formulario de comentarios */
.comment-form {
  margin-top: 20px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
  border: 1px solid #eee;
}

.comment-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.comment-form .form-group {
  margin-bottom: 15px;
}

.comment-form .control-label {
  font-weight: normal;
  margin-bottom: 5px;
  font-size: 12.5px;
}

.comment-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.comment-form .btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  padding: 8px 20px;
  font-weight: 600;
}

.comment-form .btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

#refresh-captcha, #refresh-captcha:hover, #refresh-captcha:focus, #refresh-captcha:active {
  color: #333 !important;
  background-color: var(--principal-color) !important;
  border-color: var(--principal-color) !important;
}

/* Asegurarse de que el div de comentarios sea visible */
div[data-module="comments-thread"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Estilos para el captcha */
.captcha-container {
  margin-bottom: 15px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 15px;
}

.captcha-image-container {
  margin-bottom: 0;
  flex-shrink: 0;
}

.captcha-image {
  border: 1px solid #ddd;
  padding: 5px;
  background-color: #f9f9f9;
  border-radius: 4px;
  max-width: 160px;
}

.captcha-input-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.captcha-input-wrapper {
  flex: 1;
  max-width: 200px;
}

.captcha-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 400;
  font-size: 1rem;
}

#captcha-input {
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 1rem;
  height: 38px;
  max-width: 200px;
  width: 200px;
}

#refresh-captcha {
  padding: 8px 12px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.captcha-help {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

.captcha-help i {
  margin-right: 5px;
}

.captcha-image.loading {
  opacity: 0.5;
  pointer-events: none;
}

#refresh-captcha.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

#refresh-captcha.loading::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
