/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  .comment-list ul,
  .nested-comments {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .comments-section {
    font-family: Arial, sans-serif;
    background: #fff;
    color: #333;
  }
  
  /* Container for the entire comment section */
  .comments-section {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
  }
  
  /* Comment Form */
  .comment-form {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  .comment-form h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #444;
  }
  .comment-form .form-group {
    margin-bottom: 15px;
  }
  .comment-form input[type="text"],
  .comment-form textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    font-size: 1rem;
    background: #f9f9f9;
  }
  .comment-form textarea {
    resize: vertical;
    min-height: 100px;
  }
  .comment-form button {
    background: #fd0094;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  .comment-form button:hover {
    background: #80245e;
  }
  
  /* Comment Header (for the comment list) */
  .comment-header-main {
    margin-bottom: 20px;
  }
  .comment-header-main h2 {
    font-size: 1.3rem;
    color: #444;
  }
  
  /* Comment Item */
  .comment-item {
    margin-bottom: 20px;
  }
  
  /* Comment Box */
  .comment-body {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
  }
  
  /* Comment Header within the Comment Box */
  .comment-body .comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  .comment-header .avatar {
    margin-right: 10px;
  }
  .avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fd0094;
  }
  .comment-header .comment-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .comment-meta .author {
    font-weight: bold;
    color: #fd0094;
    font-size: 1.1rem;
  }
  .comment-meta .date {
    font-size: 0.9rem;
    color: #888;
  }
  
  /* Comment Text */
  .comment-text {
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.5;
  }
  
  /* Reply Toggle Button – Positioned below the comment text */
  .reply-toggle-container {
    text-align: right;
  }
  .reply-toggle {
    background: transparent;
    border: none;
    color: #fd0094;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 5px;
    transition: color 0.3s ease;
  }
  .reply-toggle i {
    margin-right: 5px;
  }
  .reply-toggle:hover {
    color: #80245e;
  }
  
  /* Reply Form Container (initially hidden; JS toggles .active) */
  .reply-form-container {
    margin-top: 10px;
    display: none;
  }
  .reply-form-container.active {
    display: block;
  }
  
  /* Reply Form Styles */
  .reply-form-container form {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
  }
  .reply-form-container form .form-group {
    margin-bottom: 10px;
  }
  .reply-form-container form input[type="text"],
  .reply-form-container form textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    background: #fff;
  }
  .reply-form-container form textarea {
    resize: vertical;
    min-height: 80px;
  }
  .reply-form-container form button {
    background: #fd0094;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  .reply-form-container form button:hover {
    background: #80245e;
  }
  
  /* Nested Comments */
  .nested-comments {
    list-style: none !important;
    margin-top: 15px !important;
    margin-left: 80px !important; /* Desktop indentation */
    padding-left: 15px;
  }
  .nested-comments .comment-item {
    margin-bottom: 15px;
  }
  
  /* Comment Pagination */
  .comment-pagination {
    margin-top: 30px;
    text-align: center;
  }
  .comment-pagination nav ul {
    list-style: none;
    display: inline-flex;
    padding: 0;
  }
  .comment-pagination nav ul li {
    margin: 0 5px;
  }
  .comment-pagination nav ul li a {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #fd0094;
    transition: background 0.3s ease, color 0.3s ease;
  }
  .comment-pagination nav ul li a:hover {
    background: #fd0094;
    color: #fff;
  }
  
  /* Responsive Styles */
  @media (max-width: 600px) {
    .comments-section {
      max-width: 100%;
      padding: 0 10px;
    }
    .comment-form h2 {
      font-size: 1.6rem;
    }
    .comment-header-main h2 {
      font-size: 1.4rem;
    }
    .comment-body {
      padding: 10px;
    }
    /* Keep the comment header horizontal and left-aligned */
    .comment-header {
      flex-direction: row;
      align-items: center;
    }
    .avatar {
      margin-right: 10px;
      margin-bottom: 0;
    }
    /* Reduce indentation for nested comments on mobile */
    .nested-comments {
      margin-left: 20px !important;
      padding-left: 15px;
    }
    /* Optional: Make buttons full-width for easier tapping */
    .comment-form button,
    .reply-form-container form button {
      width: 100%;
    }
  }