body.modal-shown {
  overflow: hidden;
}
.as-comment-section * {
  box-sizing: border-box;
}
.as-comment-section h2 {
  font-weight: bold;
}
.as-comment-section p {
  margin: 0;
}

.as-comment-section a,
.as-comment-section p,
.as-comment-section span {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 400;
  color: #1e1e1e;
}

.as-comments strong {
  font-weight: bold;
  font-family: inherit;
}

/* Comment Section */
.as-comment-section {
  max-width: 800px;
  margin: 40px auto 0;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  font-family: Arial, Helvetica, sans-serif;
}

.as-comment-section ::placeholder {
  font-family: Arial, Helvetica, sans-serif;
  color: #888;
  font-size: 14px;
}

/* Title */
.as-comment-section h2 {
  margin-bottom: 15px;
  color: #000;
}

/* Comment Form */
.as-comment-section .as-comment-form {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
    border-bottom: 1px solid #ccc;
}

.as-comment-section .as-comment-form textarea {
  appearance: none;
  width: 100%;
  height: 80px;
  padding: 10px;
  font-size: 14px;
  color: #1e1e1e;
  padding-right: 40px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 5px;
  resize: none;
}

.as-comment-section .as-char-counter {
    color: #ccc;
    font-size: 14px;
    position: absolute;
    z-index: 2;
    right: 10px;
    top: 10px;
}

.as-comment-section .as-comment-form textarea.error,
.as-comments-section .as-reply-box input.error {
    border-color: #ee2828;
}
.as-comment-section .as-reply-box {
  padding-left: 50px;
  padding-top: 20px;
}

.as-comment-section .as-comment-input-wrapper {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-end;
  position: relative;
  margin-bottom: 10px;
  z-index: 1;
}

.as-comment-section .as-reply-box input,
.as-comment-section .as-edit-comment-input {
  appearance: none;
  width: 100%;
  padding: 10px;
  padding-right: 40px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 5px;
}

.as-comment-section .as-btn-block {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.as-comment-section .as-comment-form button {
  display: inline-flex;
  margin-top: 10px;
  margin-left: auto;
}

.as-comment-section .as-main-btn {
  appearance: none;
  padding: 8px 15px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.as-comment-section .as-main-btn--submit {
  background-color: #2462ed;
  color: white;
}

.as-comment-section .as-main-btn--cancel {
  background-color: #ccc;
  color: black;
}

/* Comments List */
.as-comment-section .as-comments {
  margin-top: 10px;
}

.as-comment-section .as-comment {
  display: flex;
  flex-flow: column;
  padding: 15px;
  margin-bottom: 10px;
}

.as-comment-section .as-comment-top {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  padding: 10px 0;
}

.as-comment-section .as-comment-text {
  font-size: 14px;
}

.as-comment-section .as-attachment-image {
  display: inline-block;
  margin-top: 10px;
  max-width: 180px;
}

.as-comment-section .as-comment-inner {
  display: flex;
  align-items: flex-start;
}

.as-comment-section .as-comment--reply {
  margin-left: 70px; /* Indent replies */
  padding-left: 15px;
  padding-top: 20px;
  margin-top: 5px;
  border-left: 1px solid #dadada;
}

/* Avatar */
.as-comment-section .as-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

/* Comment Content */
.as-comment-section .as-comment-content {
  flex: 1;
}

.as-comment-section .as-comment-content strong {
  font-size: 14px;
  color: #333;
}

.as-comment-section .as-comment-content p {
  color: #555;
}

/* Timestamp */
.as-comment-section .as-timestamp {
  font-size: 12px;
  color: #888;
}

/* Action Buttons */
.as-comment-section .as-comment-actions {
  display: flex;
  align-items: center;
  flex-flow: row wrap;
  gap: 10px;
  margin-top: 10px;
}
.as-comment-section .as-review {
    color: #cacaca;
    font-size: 14px;
}
.as-comment-section .as-action-btn {
  appearance: none;
  background: #f0f5f5;
  border: none;
  font-size: 12px;
  cursor: pointer;
  color: #1e1e1e;
  height: 30px;
  min-width: 50px;
  padding: 0;
  padding-left: 30px;
  padding-right: 5px;
  border-radius: 100px;
  position: relative;
  z-index: 1;
}

.as-comment-section .as-like-btn::before {
  content: "👍";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}
.as-comment-section .as-dislike-btn::before {
  content: "👎";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.as-comment-section .as-like-btn--marked {
  background: #2462ed;
}
.as-comment-section .as-dislike-btn--marked {
  background: #ee2828;
}
.as-comment-section .as-like-btn--marked span,
.as-comment-section .as-dislike-btn--marked span {
  color: #fff;
}

.as-comment-section .as-reply-btn::before {
  content: "💬";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}
.as-comment-section .as-edit-btn::before {
  content: "📝";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}
.as-comment-section .as-delete-btn::before {
  content: "❌";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}
.as-comment-section .as-new-comment,
.as-comment-section .as-reply-opened {
  animation: fadeIn 0.5s ease-in-out;
}

.as-comment-section .as-action-animation {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}
.as-comment-section .closing,
.as-comment-section .deleting {
  animation: fadeOut 0.5s ease-in-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}
.as-modal-overlay {
  /* hidden by default */
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.5); /* dark overlay */
  opacity: 0; /* let the animation fade in */
  pointer-events: none;
  transition: opacity 0.3s ease-out;
  z-index: 100;
}

.as-modal-overlay.as-show {
  display: flex;
  pointer-events: all; /* activate clickable overlay */
  opacity: 1; /* fade in */
}

.as-modal {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
  min-width: 250px;
  transform: scale(0.9); /* start slightly smaller */
  animation: modalPopIn 0.3s forwards ease-out;
  z-index: 101;
}

@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.as-modal-text {
  margin-bottom: 1rem;
}

.as-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 20px;
}

.as-modal-btn {
  appearance: none;
  padding: 8px 15px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.as-modal-btn--delete {
  background-color: #e41b1b;
  color: white;
}

.as-modal-btn--cancel {
  background-color: #ccc;
  color: black;
}

.as-comment-section .as-error-message {
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: #ee2828;
}