/* ============================================
   COMMENT SYSTEM STYLES
   ============================================ */

/* Updated to use existing theme variables from style.css */
:root,
[data-theme="dark"] {
  --primary-color: var(--accent, #ff4500);
  --secondary-color: var(--brand-green, #27ab22);
}

[data-theme="light"] {
  --primary-color: var(--accent, #ff4500);
  --secondary-color: var(--brand-green, #27ab22);
}

/* Comment Section */
.comment-section {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* Form Container */
.comment-form-container {
  margin-bottom: 30px;
}

/* ============================================
   COLLAPSED STATE
   ============================================ */

.comment-form-collapsed {
  cursor: pointer;
}

/* Increased padding from 8px to 16px to match comment items size */
.comment-form-trigger {
  display: flex;
  gap: 12px;
  padding: 16px;
  background-color: var(--card);
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  align-items: center;
}

.comment-form-trigger:hover {
  background-color: var(--panel);
  border-color: var(--primary-color);
}

.user-avatar {
  flex-shrink: 0;
}

/* Increased avatar size from 32px to 40px to match comment items */
.user-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

/* Changed to flex row with reduced gap for inline layout */
.comment-form-placeholder {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  /* Add max-width and overflow to prevent border overflow on mobile */
  max-width: 100%;
  overflow: hidden;
}

/* Added username-wrapper for verification badge alignment */
.username-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Increased font size from 13px to 14px to match comment items */
.comment-form-placeholder .username {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
}

/* Increased font size from 12px to 14px to match comment items */
.comment-form-placeholder .placeholder-text {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid var(--primary-color);
  background-color: var(--panel);
  box-sizing: border-box;
  min-width: 0;
}

/* Dark mode specific styling for placeholder text box */
[data-theme="dark"] .comment-form-placeholder .placeholder-text {
  background-color: rgba(255, 69, 0, 0.08);
  border-color: rgba(255, 69, 0, 0.3);
}

/* Light mode specific styling for placeholder text box */
[data-theme="light"] .comment-form-placeholder .placeholder-text {
  background-color: rgba(255, 69, 0, 0.05);
  border-color: rgba(255, 69, 0, 0.4);
}

.comment-form-placeholder a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.comment-form-placeholder a:hover {
  text-decoration: off-underline;
}

/* ============================================
   EXPANDED STATE
   ============================================ */

/* Updated to use theme variables */
.comment-form-expanded {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background-color: var(--card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Updated to use theme variables */
.comment-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

/* Updated to use theme text color */
.user-info .username {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

/* Updated to use theme colors */
.btn-collapse {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  width: 32px;
  height: 32px;
}

.btn-collapse:hover {
  color: var(--primary-color);
}

/* ============================================
   TOOLBAR
   ============================================ */

/* Updated to use theme variables */
.comment-toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 8px;
  background-color: var(--panel);
  border-radius: 6px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
}

/* Updated to use theme variables */
.toolbar-btn {
  padding: 6px 10px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  color: var(--text);
  font-weight: 600;
}

.toolbar-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.toolbar-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.toolbar-btn code {
  font-size: 11px;
  font-family: monospace;
}

.toolbar-separator {
  width: 1px;
  background-color: var(--border);
  margin: 0 4px;
}

/* ============================================
   TEXTAREA
   ============================================ */

/* Updated to use theme variables */
.comment-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  transition: all 0.3s ease;
  color: var(--text);
  background-color: var(--card);
}

/* Updated to use theme muted color */
.comment-textarea::placeholder {
  color: var(--muted);
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

/* ============================================
   EMOTICON PICKER MODAL
   ============================================ */

.emoticon-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Updated to use theme variables */
.emoticon-picker-content {
  background-color: var(--card);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Updated to use theme variables */
.emoticon-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

/* Updated to use theme text color */
.emoticon-picker-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

/* Updated to use theme muted color */
.btn-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.btn-close:hover {
  color: var(--text);
}

/* ============================================
   EMOTICON SEARCH
   ============================================ */

/* Updated to use theme variables */
.emoticon-picker-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

/* Updated to use theme variables */
.emoticon-search-input {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s ease;
}

/* Updated to use theme muted color */
.emoticon-search-input::placeholder {
  color: var(--muted);
}

.emoticon-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

/* ============================================
   EMOTICON TABS
   ============================================ */

/* Updated to use theme variables */
.emoticon-picker-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scroll-behavior: smooth;
}

/* Updated to use theme variables */
.emoticon-tab {
  width: 40px;
  height: 40px;
  font-size: 8px;
  color: #dddddd;
  border: 2px solid transparent;
  border-radius: 6px;
  background-color: var(--emoticon-box-free-premium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.emoticon-tab:hover {
  background-color: var(--brand-green);
  transform: scale(1.05);
}

.emoticon-tab.active {
  border-color: var(--primary-color);
  background-color: var(--emoticon-box-all);
}

.emoticon-tab img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ============================================
   EMOTICON INFO
   ============================================ */

/* Updated to use theme variables */
.emoticon-picker-info {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.info-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), #ff6b35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

/* Updated to use theme text color */
.info-text h4 {
  margin: 0 0 4px 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* Updated to use theme muted color */
.info-text p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.btn-upgrade {
  padding: 6px 12px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  margin-top: 8px;
}

.btn-upgrade:hover {
  background-color: #1f8319;
  transform: translateY(-2px);
}

/* ============================================
   EMOTICON GRID
   ============================================ */

/* Updated to use theme variables */
.emoticon-picker-grid {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  background-color: var(--card);
}

/* Updated to use theme variables */
.emoticon-item {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.emoticon-item:hover {
  background-color: var(--card);
  border-color: var(--primary-color);
  transform: scale(1.1);
}

.emoticon-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  aspect-ratio: 1;
  transition: all 0.3s ease;
}

.emoticon-item.locked {
  opacity: 0.6;
  filter: grayscale(100%);
}

.emoticon-item.locked:hover {
  opacity: 0.8;
}

.emoticon-item.locked::after {
  content: "🔒";
  position: absolute;
  font-size: 16px;
  top: 2px;
  right: 2px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   EMOTICON FOOTER
   ============================================ */

/* Updated to use theme variables */
.emoticon-picker-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background-color: var(--panel);
}

/* Updated to use theme variables */
.emoticon-type-btn {
  flex: 1;
  padding: 8px 12px;
  background-color: var(--brand-green);
  color: var(--textnormal);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.emoticon-type-btn:hover {
  background-color: var(--orange-green);
  color: var(--text);
}

.emoticon-type-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Updated to use theme variables */
.emoticon-tab-btn {
  flex: 1;
  padding: 8px 12px;
  background-color: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.emoticon-tab-btn:hover {
  background-color: var(--panel);
  color: var(--text);
}

.emoticon-tab-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ============================================
   FORM ACTIONS
   ============================================ */

/* Updated to use theme variables */
.comment-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn {
  padding: 7px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 700;
  text-shadow: none;
  border: none;
}

.btn-primary:hover:not(:disabled) {
  background-color: #e63e00;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
}

.btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
  color: #ffffff;
}

/* Updated to use theme variables */
.btn-secondary {
  background-color: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700;
}

.btn-secondary:hover {
  background-color: var(--card);
  color: var(--text);
}

/* ============================================
   COMMENTS LIST
   ============================================ */

.comments-list {
  margin-top: 20px;
}

/* Updated to use theme variables */
.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease;
}

.comment-item:hover {
  background-color: var(--panel);
}

.comment-item:last-child {
  border-bottom: none;
  border-radius: 8px;
}

.comment-avatar {
  flex-shrink: 0;
}

.comment-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

/* Updated to use theme text color */
.comment-username {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

/* Updated to use theme muted color */
.comment-time {
  color: var(--muted);
  font-size: 12px;
}

/* Updated to use theme text color */
.comment-text {
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 8px;
  word-break: break-word;
}

.comment-text code {
  background-color: var(--panel);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  border: 1px solid var(--border);
  display: inline-block;
}

.comment-text b {
  font-weight: 700;
}

.comment-text i {
  font-style: italic;
}

.comment-text u {
  text-decoration: off-underline;
}

.comment-actions {
  display: flex;
  gap: 12px;
  font-size: 12px;
}

/* Updated to use theme muted color */
.comment-action-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s ease;
  font-weight: 600;
}

.comment-action-btn:hover {
  color: var(--primary-color);
}

/* Updated to use theme variables */
.comment-replies {
  margin-top: 12px;
  padding-left: 20px;
  border-left: 2px solid var(--border);
}

.reply-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
}

/* ============================================
   PAGINATION
   ============================================ */

.comments-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 20px 0;
  flex-wrap: wrap;
}

/* Updated to use theme variables */
.pagination-btn {
  padding: 8px 12px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: var(--text);
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.pagination-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Updated to use theme muted color */
.pagination-info {
  color: var(--muted);
  font-size: 12px;
  margin: 0 8px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .emoticon-picker-content {
    width: 95%;
    max-height: 90vh;
  }

  .emoticon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  }

  .emoticon-item {
    width: 45px;
    height: 45px;
  }

  .emoticon-item img {
    width: 35px;
    height: 35px;
  }

  .comment-form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    
  }

  .comments-pagination {
    gap: 4px;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Added tablet-specific responsive improvements */
  .comment-form-trigger {
    padding: 10px;
    gap: 10px;
  }

  .comment-form-placeholder {
    gap: 6px;
  }

  .comment-form-placeholder .placeholder-text {
    font-size: 13px;
    padding: 5px 8px;
  }

  .comment-item {
    gap: 10px;
    padding: 14px;
  }

  .comment-avatar img {
    width: 38px;
    height: 38px;
  }

  .comment-text {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  /* Added medium mobile device support */
  .comment-form-trigger {
    padding: 8px;
    gap: 8px;
    border-radius: 6px;
  }

  .user-avatar img {
    width: 30px;
    height: 30px;
  }

  .comment-form-placeholder .username {
    font-size: 12px;
  }

  .comment-form-placeholder .placeholder-text {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 4px;
  }

  .comment-form-expanded {
    padding: 12px;
    border-radius: 6px;
  }

  .comment-toolbar {
    gap: 2px;
    padding: 6px;
  }

  .toolbar-btn {
    padding: 4px 6px;
    min-width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .comment-textarea {
    padding: 10px;
    font-size: 13px;
    min-height: 80px;
  }

  .comment-item {
    gap: 8px;
    padding: 12px;
  }

  .comment-avatar img {
    width: 34px;
    height: 34px;
  }

  .comment-username {
    font-size: 12px;
  }

  .comment-time {
    font-size: 11px;
  }

  .comment-text {
    font-size: 12px;
  }

  .comment-actions {
    gap: 10px;
    font-size: 11px;
  }

  .emoticon-picker-content {
    width: 98%;
    max-height: 85vh;
  }

  .emoticon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 5px;
  }

  .emoticon-item {
    width: 42px;
    height: 42px;
  }

  .emoticon-item img {
    width: 32px;
    height: 32px;
  }

  .comments-pagination {
    gap: 3px;
  }

  .pagination-btn {
    padding: 5px 8px;
    font-size: 10px;
  }

  .pagination-info {
    font-size: 10px;
    margin: 0 4px;
  }
}

@media (max-width: 480px) {
  /* Enhanced small mobile device support */
  .comment-form-trigger {
    padding: 8px;
    gap: 8px;
    border-radius: 6px;
  }

  .user-avatar img {
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--primary-color);
  }

  .comment-form-placeholder {
    gap: 6px;
  }

  .comment-form-placeholder .username {
    font-size: 11px;
    white-space: nowrap;
  }

  .comment-form-placeholder .placeholder-text {
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 3px;
    border: 1px solid var(--primary-color);
  }

  .comment-form-expanded {
    padding: 10px;
    border-radius: 6px;
  }

  .comment-form-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .comment-toolbar {
    gap: 2px;
    padding: 5px;
  }

  .toolbar-btn {
    padding: 3px 5px;
    min-width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .toolbar-separator {
    margin: 0 2px;
  }

  .comment-textarea {
    padding: 8px;
    font-size: 12px;
    min-height: 70px;
    border-radius: 4px;
  }

  .comment-form-actions {
    flex-direction: column-reverse;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 4px;
  }

  .comment-item {
    gap: 8px;
    padding: 10px;
    border-radius: 4px;
  }

  .comment-avatar img {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--primary-color);
  }

  .comment-username {
    font-size: 11px;
  }

  .comment-time {
    font-size: 10px;
  }

  .comment-text {
    font-size: 11px;
    line-height: 1.4;
  }

  .comment-actions {
    gap: 8px;
    font-size: 10px;
  }

  .comment-replies {
    margin-top: 8px;
    padding-left: 12px;
  }

  .reply-item {
    gap: 8px;
    padding: 8px 0;
  }

  .emoticon-picker-content {
    width: 100%;
    max-height: 80vh;
    border-radius: 12px 12px 0 0;
  }

  .emoticon-picker-header {
    padding: 12px;
  }

  .emoticon-picker-header h3 {
    font-size: 14px;
  }

  .emoticon-picker-search {
    padding: 8px 12px;
  }

  .emoticon-search-input {
    padding: 8px 10px;
    font-size: 12px;
  }

  .emoticon-picker-tabs {
    gap: 6px;
    padding: 8px 12px;
  }

  .emoticon-tab {
    width: 36px;
    height: 36px;
  }

  .emoticon-tab img {
    width: 20px;
    height: 20px;
  }

  .emoticon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 4px;
    padding: 8px 12px;
  }

  .emoticon-item {
    width: 38px;
    height: 38px;
    border-radius: 4px;
  }

  .emoticon-item img {
    width: 28px;
    height: 28px;
  }

  .emoticon-picker-footer {
    gap: 6px;
    padding: 8px 12px;
  }

  .emoticon-type-btn,
  .emoticon-tab-btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  .comments-pagination {
    gap: 2px;
    margin-top: 16px;
    padding: 16px 0;
  }

  .pagination-btn {
    padding: 4px 6px;
    font-size: 9px;
    border-radius: 3px;
  }

  .pagination-info {
    font-size: 9px;
    margin: 0 2px;
  }

  .emoticon-upgrade-banner {
    padding: 12px;
    flex-direction: column;
    gap: 12px;
  }

  .upgrade-content {
    gap: 12px;
  }

  .upgrade-icon {
    font-size: 24px;
  }

  .upgrade-text h4 {
    font-size: 12px;
  }

  .upgrade-text p {
    font-size: 11px;
  }

  .btn-upgrade-now {
    padding: 6px 12px;
    font-size: 11px;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 360px) {
  /* Added extra small mobile device support */
  .comment-form-trigger {
    padding: 6px;
    gap: 6px;
  }

  .user-avatar img {
    width: 26px;
    height: 26px;
  }

  .comment-form-placeholder .username {
    font-size: 10px;
  }

  .comment-form-placeholder .placeholder-text {
    font-size: 10px;
    padding: 3px 5px;
  }

  .comment-item {
    gap: 6px;
    padding: 8px;
  }

  .comment-avatar img {
    width: 30px;
    height: 30px;
  }

  .comment-username {
    font-size: 10px;
  }

  .comment-text {
    font-size: 10px;
  }

  .btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .emoticon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
  }

  .emoticon-item {
    width: 35px;
    height: 35px;
  }

  .emoticon-item img {
    width: 25px;
    height: 25px;
  }

  .pagination-btn {
    padding: 3px 5px;
    font-size: 8px;
  }
}

/* Add responsive emoticon styling with object-fit and aspect-ratio */
.emoticon-inline {
  height: 24px;
  width: 24px;
  vertical-align: middle;
  margin: 0 2px;
  object-fit: contain;
  aspect-ratio: 1;
  flex-shrink: 0;
}

/* Update emoticon picker grid items for responsive sizing */
.emoticon-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  aspect-ratio: 1;
  transition: all 0.3s ease;
}

/* Add responsive emoticon sizing for different screen sizes */
@media (max-width: 768px) {
  .emoticon-inline {
    height: 22px;
    width: 22px;
  }

  .emoticon-item img {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 600px) {
  .emoticon-inline {
    height: 20px;
    width: 20px;
  }

  .emoticon-item img {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .emoticon-inline {
    height: 18px;
    width: 18px;
  }

  .emoticon-item img {
    width: 28px;
    height: 28px;
  }
}
