/* Comentario styling to match Zensical Material Design theme */
/* Based on Comentario's original CSS with customizations for Zensical */

/* ============================================================================
   BASE: Comentario's original CSS variables and root styles
   ============================================================================ */

/* Root container - override CSS variables for light mode */
comentario-comments {
  /* Comentario's CSS variables - light mode defaults */
  --cmntr-bg: #ffffff;
  --cmntr-bg-shade: #f1f3f5;
  --cmntr-bg-highlight: #bac8ff;
  --cmntr-bg-blink: #ffe066;
  --cmntr-danger-bg: #ffe3e3;
  --cmntr-deleted-bg: #fcc2d7;
  --cmntr-dlg-header-bg: #dee2e6;
  --cmntr-input-bg: #ffffff;
  --cmntr-pending-bg: #e9ecef;
  --cmntr-placeholder-bg: rgba(0, 0, 0, 0.04); /* Light grey for light mode */
  --cmntr-placeholder-mask: #212529;
  --cmntr-rejected-bg: #fff8c5;
  --cmntr-success-bg: #d3f9d8;
  --cmntr-warning-bg: #fff8c5;
  --cmntr-color: rgba(0, 0, 0, 0.87); /* Match Zensical */
  --cmntr-danger-color: #f03e3e;
  --cmntr-input-color: rgba(0, 0, 0, 0.87); /* Match Zensical */
  --cmntr-input-ph-color: rgba(0, 0, 0, 0.6); /* Match Zensical */
  --cmntr-input-disabled-color: #868e96;
  --cmntr-label-color: rgba(0, 0, 0, 0.87);
  --cmntr-link-color: #6366f1; /* indigo-500 */
  --cmntr-link-hover-color: #4f46e5; /* indigo-600 */
  --cmntr-muted-color: rgba(0, 0, 0, 0.6); /* Match Zensical */
  --cmntr-score-color: #ced4da;
  --cmntr-score-up-color: #40c057;
  --cmntr-score-down-color: #fd7e14;
  --cmntr-sticky-color: #ffd43b;
  --cmntr-success-color: #37b24d;
  --cmntr-warning-color: #f59f00;
  --cmntr-card-border: rgba(0, 0, 0, 0.08); /* Match Zensical */
  --cmntr-dlg-border: #adb5bd;
  --cmntr-pending-border: #fab005;
  --cmntr-table-border: #dee2e6;
  
  /* Button CSS variables */
  --cmntr-btn-color: #ffffff;
  --cmntr-btn-bg: #6366f1; /* indigo-500 */
  --cmntr-btn-hover-color: #ffffff;
  --cmntr-btn-hover-bg: #4f46e5; /* indigo-600 */
  --cmntr-btn-active-color: #ffffff;
  --cmntr-btn-active-bg: #4338ca; /* indigo-700 */
  
  display: block;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  font-family: var(--md-text-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
  padding: 0;
  width: 100%;
  font-size: 0.75rem !important; /* 13px - smaller base font */
  line-height: 1.5;
  color: var(--cmntr-color);
}

/* Base styles - scoped to comentario-comments */
/* Force light mode colors - override Comentario's dark mode defaults */
comentario-comments,
comentario-comments *,
comentario-comments ::after,
comentario-comments ::before {
  box-sizing: border-box !important;
  font-family: var(--md-text-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 0.75rem !important; /* 12px - smaller but readable */
}

/* Force light mode text colors - but allow specific overrides below */
comentario-comments,
comentario-comments * {
  color: rgba(0, 0, 0, 0.87) !important; /* Force light mode text color */
}

/* Exceptions for specific elements that need different colors */
/* Commenter names - MUST come after universal selector to override it */
comentario-comments .comentario-card .comentario-name,
comentario-comments .comentario-name,
comentario-comments .comentario-name-container .comentario-name,
comentario-comments .comentario-name-wrap .comentario-name,
comentario-comments .comentario-card-header .comentario-name,
comentario-comments .comentario-card .comentario-name-container .comentario-name,
comentario-comments .comentario-card .comentario-name-wrap .comentario-name {
  color: rgba(0, 0, 0, 0.95) !important; /* Darker for names - MUST override universal selector */
  font-weight: 600 !important; /* Bolder for readability */
}

comentario-comments .comentario-card .comentario-subtitle,
comentario-comments .comentario-subtitle,
comentario-comments .comentario-subtitle a {
  color: rgba(0, 0, 0, 0.6) !important; /* Muted for timestamps */
}

comentario-comments a:not(.comentario-btn) {
  color: #6366f1 !important; /* Links */
}

comentario-comments .comentario-btn-tool,
comentario-comments button.comentario-btn-tool {
  color: rgba(0, 0, 0, 0.6) !important; /* Tool buttons */
}

comentario-comments input[type="email"],
comentario-comments input[type="password"],
comentario-comments input[type="text"],
comentario-comments input[type="url"],
comentario-comments textarea {
  color: rgba(0, 0, 0, 0.87) !important; /* Input text */
  background-color: #ffffff !important; /* White background */
}

comentario-comments textarea[name="comentario-comment-editor"],
comentario-comments .comentario-comment-editor textarea {
  color: rgba(0, 0, 0, 0.87) !important; /* Editor text */
  background-color: rgba(0, 0, 0, 0.04) !important; /* Light grey background */
}

comentario-comments a {
  color: var(--cmntr-link-color) !important;
  outline: 0;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.75rem !important;
}

comentario-comments a:not(.comentario-btn):focus,
comentario-comments a:not(.comentario-btn):hover {
  color: var(--cmntr-link-hover-color) !important;
}

comentario-comments blockquote {
  margin: 0 0 0 8px;
  padding: 0 0 0 5px;
  border-left: 2px solid #adb5bd;
  color: var(--cmntr-muted-color);
}

comentario-comments .comentario-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* Add comment host - placeholder area */
comentario-comments .comentario-add-comment-host {
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  background-color: #ffffff !important; /* White background for light mode */
  font-size: 0.75rem !important;
}

comentario-comments .comentario-add-comment-host:not(.comentario-editor-inserted) {
  min-height: 130px;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 0.25rem !important;
  cursor: text;
  background-color: rgba(0, 0, 0, 0.04) !important; /* Light grey background */
}

comentario-comments .comentario-add-comment-host:not(.comentario-editor-inserted) .comentario-add-comment-placeholder {
  display: block;
  color: rgba(0, 0, 0, 0.6) !important; /* Dark placeholder text */
  font-size: 0.75rem !important;
}

comentario-comments .comentario-add-comment-host .comentario-add-comment-placeholder {
  display: none;
}

/* Buttons */
comentario-comments .comentario-btn,
comentario-comments button.comentario-btn {
  color: var(--cmntr-btn-color) !important;
  background-color: var(--cmntr-btn-bg) !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  cursor: pointer !important;
  line-height: 1.3 !important;
  padding: 0.25rem 0.625rem !important; /* Smaller padding */
  border: 1px solid transparent !important;
  border-radius: 0.25rem !important;
  margin: 5px !important;
  transition: color 0.2s, background-color 0.2s !important;
  white-space: nowrap !important;
  font-size: 0.75rem !important; /* 12px - smaller font */
  font-weight: 500 !important;
  font-family: var(--md-text-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  min-height: auto !important;
  height: auto !important;
  pointer-events: auto !important;
  user-select: none !important;
}

comentario-comments .comentario-btn:not(:disabled):active,
comentario-comments .comentario-btn:not(:disabled):focus,
comentario-comments .comentario-btn:not(:disabled):hover,
comentario-comments button.comentario-btn:not(:disabled):active,
comentario-comments button.comentario-btn:not(:disabled):focus,
comentario-comments button.comentario-btn:not(:disabled):hover {
  color: var(--cmntr-btn-hover-color) !important;
  background-color: var(--cmntr-btn-hover-bg) !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

comentario-comments .comentario-btn:disabled,
comentario-comments button.comentario-btn:disabled {
  cursor: not-allowed !important;
  opacity: 0.3 !important;
  pointer-events: none !important;
}

comentario-comments .comentario-btn:not(.comentario-btn-link):not(.comentario-btn-tool).comentario-btn-active {
  color: var(--cmntr-btn-active-color);
  background-color: var(--cmntr-btn-active-bg);
  box-shadow: inset 0 0.25rem 0.375rem rgba(50, 50, 93, 0.11), inset 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08);
}

comentario-comments .comentario-btn:not(.comentario-btn-link):not(.comentario-btn-tool):not(.comentario-btn-active) {
  box-shadow: 0 0.25rem 0.375rem rgba(50, 50, 93, 0.11), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08);
}

comentario-comments .comentario-btn.comentario-btn-link.comentario-btn-active {
  font-weight: 500 !important;
}

comentario-comments .comentario-btn-sm {
  font-size: 0.75rem !important; /* 12px */
  line-height: 1.3 !important;
  padding: 0.25rem 0.5rem !important;
  margin: 2.5px;
}

comentario-comments .comentario-submit-icon {
  font-size: 1rem !important;
}

/* Primary button */
comentario-comments .comentario-btn-primary {
  --cmntr-btn-color: #ffffff;
  --cmntr-btn-bg: #6366f1;
  --cmntr-btn-hover-color: #ffffff;
  --cmntr-btn-hover-bg: #4f46e5;
  --cmntr-btn-active-color: #ffffff;
  --cmntr-btn-active-bg: #4338ca;
  padding: 0.25rem 0.625rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
}

/* Link buttons */
comentario-comments .comentario-btn-link,
comentario-comments button.comentario-btn-link {
  --cmntr-btn-color: var(--cmntr-link-color);
  --cmntr-btn-bg: transparent;
  --cmntr-btn-hover-color: var(--cmntr-link-hover-color);
  --cmntr-btn-hover-bg: transparent;
  --cmntr-btn-active-color: var(--cmntr-link-hover-color);
  --cmntr-btn-active-bg: transparent;
  font-size: 0.75rem !important;
  padding: 0.25rem 0.5rem !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Tool buttons */
comentario-comments .comentario-btn-tool,
comentario-comments button.comentario-btn-tool {
  --cmntr-btn-color: rgba(0, 0, 0, 0.6) !important;
  --cmntr-btn-bg: transparent;
  --cmntr-btn-hover-color: #6366f1 !important;
  --cmntr-btn-hover-bg: transparent;
  --cmntr-btn-active-color: #6366f1 !important;
  --cmntr-btn-active-bg: transparent;
  color: rgba(0, 0, 0, 0.6) !important; /* Direct color override */
  margin: 0;
  padding: 0.25rem !important;
  width: 32px;
  height: 32px;
  opacity: 0.5;
  font-size: 0.75rem !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

comentario-comments .comentario-btn-tool:hover,
comentario-comments button.comentario-btn-tool:hover {
  opacity: 1 !important;
  color: #6366f1 !important; /* indigo-500 */
}

/* Inputs and textareas */
comentario-comments input[type="email"],
comentario-comments input[type="password"],
comentario-comments input[type="text"],
comentario-comments input[type="url"],
comentario-comments textarea,
comentario-comments .comentario-input {
  background-color: #ffffff !important; /* White background for light mode */
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 0.25rem;
  color: rgba(0, 0, 0, 0.87) !important; /* Dark text for light mode */
  font-size: 0.75rem !important;
  font-family: var(--md-text-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  padding: 0.5rem 0.75rem !important;
}

comentario-comments input[type="email"].comentario-touched:invalid,
comentario-comments input[type="password"].comentario-touched:invalid,
comentario-comments input[type="text"].comentario-touched:invalid,
comentario-comments input[type="url"].comentario-touched:invalid,
comentario-comments textarea.comentario-touched:invalid {
  border: 1px solid #f03e3e !important;
}

comentario-comments input[type="email"]::placeholder,
comentario-comments input[type="password"]::placeholder,
comentario-comments input[type="text"]::placeholder,
comentario-comments input[type="url"]::placeholder,
comentario-comments textarea::placeholder {
  color: var(--cmntr-input-ph-color) !important;
  font-size: 0.75rem !important;
}

comentario-comments input[type="email"]:disabled,
comentario-comments input[type="password"]:disabled,
comentario-comments input[type="text"]:disabled,
comentario-comments input[type="url"]:disabled,
comentario-comments textarea:disabled {
  color: var(--cmntr-input-disabled-color);
}

comentario-comments textarea {
  display: inline-block;
  white-space: pre-wrap;
  outline: 0;
  overflow: auto;
  min-height: 130px;
  width: 100%;
  transition: all 0.2s;
}

comentario-comments textarea:focus {
  outline: 0;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
}

/* Comment editor - active editor after clicking */
comentario-comments .comentario-comment-editor,
comentario-comments .comentario-add-comment-host.comentario-editor-inserted {
  background-color: #ffffff !important; /* White background */
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

comentario-comments .comentario-comment-editor textarea,
comentario-comments textarea[name="comentario-comment-editor"] {
  background-color: rgba(0, 0, 0, 0.04) !important; /* Light grey background */
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: rgba(0, 0, 0, 0.87) !important; /* Dark text */
  font-size: 0.75rem !important;
  font-family: var(--md-text-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

comentario-comments .comentario-comment-editor textarea:focus,
comentario-comments textarea[name="comentario-comment-editor"]:focus {
  background-color: rgba(0, 0, 0, 0.02) !important; /* Slightly lighter on focus */
  border-color: #6366f1 !important;
  color: rgba(0, 0, 0, 0.87) !important; /* Dark text */
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
}

comentario-comments .comentario-comment-editor textarea::placeholder,
comentario-comments textarea[name="comentario-comment-editor"]::placeholder {
  color: rgba(0, 0, 0, 0.6) !important; /* Dark placeholder text */
}

/* Input group */
comentario-comments .comentario-input-group {
  flex: 1 1 100%;
  display: flex;
  align-items: stretch;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.15), 0 1px 0 rgba(0, 0, 0, 0.02);
  border-radius: 0.25rem;
  background-color: #ffffff !important; /* White background for light mode */
  margin: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12) !important; /* Light border */
}

comentario-comments .comentario-input-group .comentario-input {
  flex-grow: 1;
  height: 40px;
  background-color: #ffffff !important; /* White background */
  border: none !important;
  outline: 0;
  padding: 5px 5px 5px 10px;
  font-size: 0.75rem !important;
  color: rgba(0, 0, 0, 0.87) !important; /* Dark text */
  font-family: var(--md-text-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

comentario-comments .comentario-input-group .comentario-input:focus {
  outline: 0;
  border: none !important;
  box-shadow: none !important;
}

comentario-comments .comentario-input-group .comentario-input::placeholder {
  color: rgba(0, 0, 0, 0.6) !important; /* Dark placeholder text */
}

comentario-comments .comentario-input-group .comentario-btn {
  box-shadow: none;
  margin: 0;
}

/* Dialog */
comentario-comments .comentario-backdrop {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(3px);
}

comentario-comments .comentario-dialog {
  position: absolute;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 500px;
  min-height: 100px;
  background-color: #ffffff !important; /* White for light mode */
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
}

comentario-comments .comentario-dialog hr {
  border: none;
  background: var(--cmntr-muted-color);
  height: 1px;
  margin: 12px 0;
}

/* Dialog header - ensure proper light mode styling */
comentario-comments .comentario-dialog .comentario-dialog-header,
comentario-comments .comentario-dialog-header {
  position: relative;
  display: flex;
  align-items: center;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
  padding: 6px 16px;
  line-height: 24px;
  font-weight: 700;
  font-size: 0.75rem !important; /* 12px - smaller but readable */
  color: rgba(0, 0, 0, 0.87) !important; /* Dark text for light mode */
}

/* Override CSS variables in dialog for light mode */
comentario-comments .comentario-dialog {
  --cmntr-bg: #ffffff !important;
  --cmntr-bg-shade: #f1f3f5 !important;
  --cmntr-color: rgba(0, 0, 0, 0.87) !important;
  --cmntr-muted-color: rgba(0, 0, 0, 0.6) !important;
  --cmntr-dlg-header-bg: transparent !important;
  --cmntr-dlg-border: rgba(0, 0, 0, 0.12) !important;
}

comentario-comments .comentario-dialog * {
  color: rgba(0, 0, 0, 0.87) !important; /* Force light mode text in dialog */
}

comentario-comments .comentario-dialog .comentario-dialog-header .comentario-dialog-btn-close,
comentario-comments .comentario-dialog .comentario-dialog-header button.comentario-dialog-btn-close {
  --cmntr-btn-color: var(--cmntr-muted-color);
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  border: 0;
  padding: 2px;
  cursor: pointer !important;
  pointer-events: auto !important;
  background: transparent !important;
}

comentario-comments .comentario-dialog .comentario-dialog-header .comentario-dialog-btn-close .comentario-icon {
  width: 1.5em;
  height: 1.5em;
}

comentario-comments .comentario-dialog .comentario-dialog-body,
comentario-comments .comentario-dialog-body {
  padding: 16px;
  overflow: hidden;
  font-size: 0.75rem !important; /* 12px - smaller but readable */
  color: rgba(0, 0, 0, 0.87) !important; /* Dark text for light mode */
}

comentario-comments .comentario-dialog .comentario-dialog-centered,
comentario-comments .comentario-dialog-centered {
  color: rgba(0, 0, 0, 0.6) !important; /* Muted color for light mode */
  text-align: center;
  margin: 8px 0;
  font-size: 0.75rem !important; /* 12px - smaller but readable */
}

/* Footer - hide "Powered by Comentario" */
comentario-comments .comentario-footer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

comentario-comments .comentario-footer a {
  display: none !important;
}

/* Comment cards */
comentario-comments .comentario-card {
  display: flex;
  margin-top: 16px;
  border-top: 1px solid var(--cmntr-card-border);
  width: 100%;
}

comentario-comments .comentario-card .comentario-card-expand-spacer {
  flex: 0 0 12px;
}

comentario-comments .comentario-card .comentario-card-expand-toggler {
  flex: 0 0 12px;
  cursor: pointer;
  transition: border-left-width 0.1s linear;
}

comentario-comments .comentario-card .comentario-card-expand-toggler:hover:not(.comentario-collapsed) {
  border-left-width: 4px !important;
}

comentario-comments .comentario-card .comentario-card-expand-toggler.comentario-collapsed {
  border-left-style: dotted !important;
}

comentario-comments .comentario-card .comentario-card-expand-body {
  flex: 1 1 100%;
  overflow: hidden;
}

comentario-comments .comentario-card .comentario-card-expand-body.comentario-editor-inserted > .comentario-card-self {
  display: none;
}

comentario-comments .comentario-card .comentario-card-self {
  padding-top: 12px;
}

comentario-comments .comentario-card .comentario-card-children.comentario-card-children-unnest {
  margin-left: -12px;
}

comentario-comments .comentario-card .comentario-card-header {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: start;
  margin-bottom: 6px;
}

comentario-comments .comentario-card .comentario-name-container {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  justify-content: start;
  margin-bottom: 6px;
}

comentario-comments .comentario-card .comentario-name-wrap {
  display: flex;
  flex-wrap: wrap;
}

/* Commenter names - ensure they're dark and readable */
/* Commenter names - ensure they're dark and readable */
comentario-comments .comentario-card .comentario-name,
comentario-comments .comentario-name,
comentario-comments .comentario-name-container .comentario-name,
comentario-comments .comentario-name-wrap .comentario-name,
comentario-comments .comentario-card-header .comentario-name {
  font-weight: 600 !important; /* Bolder for readability */
  font-size: 0.75rem !important; /* 13px */
  color: rgba(0, 0, 0, 0.95) !important; /* Higher contrast - direct color override */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

comentario-comments .comentario-card .comentario-subtitle,
comentario-comments .comentario-subtitle {
  color: rgba(0, 0, 0, 0.6) !important; /* Direct color override */
  font-size: 0.75rem !important; /* 12px */
}

comentario-comments .comentario-card .comentario-subtitle a,
comentario-comments .comentario-subtitle a {
  color: rgba(0, 0, 0, 0.6) !important; /* Direct color override */
  font-size: 0.75rem !important;
}

comentario-comments .comentario-card .comentario-score {
  display: inline;
  color: var(--cmntr-score-color);
  font-weight: 700;
  transition: color 0.2s;
  font-size: 0.75rem !important;
}

comentario-comments .comentario-card .comentario-upvoted {
  color: var(--cmntr-score-up-color);
}

comentario-comments .comentario-card .comentario-downvoted {
  color: var(--cmntr-score-down-color);
}

comentario-comments .comentario-card .comentario-is-sticky {
  color: var(--cmntr-sticky-color) !important;
}

comentario-comments .comentario-card .comentario-card-body,
comentario-comments .comentario-card-body {
  font-size: 0.75rem !important;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.87) !important; /* Direct color override */
}

comentario-comments .comentario-card .comentario-card-body p,
comentario-comments .comentario-card-body p {
  margin-top: 6px;
  margin-bottom: 6px;
  font-size: 0.75rem !important;
  color: rgba(0, 0, 0, 0.87) !important; /* Direct color override */
}

comentario-comments .comentario-card .comentario-card-body img {
  max-width: 100%;
}

comentario-comments .comentario-card .comentario-card-body code {
  font-family: monospace;
  font-size: 0.75rem !important;
  white-space: pre;
}

comentario-comments .comentario-card .comentario-card-body pre {
  padding: 6px;
  background-color: var(--cmntr-bg-shade);
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  font-size: 0.75rem !important;
}

comentario-comments .comentario-card .comentario-moderation-notice {
  width: 100%;
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
  color: var(--cmntr-warning-color);
  font-size: 0.75rem !important;
}

comentario-comments .comentario-deleted {
  opacity: 0.33;
  filter: grayscale(0.8);
}

comentario-comments .comentario-pending {
  background-color: var(--cmntr-pending-bg);
  border: var(--cmntr-pending-border) dashed 1px;
}

comentario-comments .comentario-rejected {
  background-color: var(--cmntr-rejected-bg);
}

comentario-comments .comentario-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--cmntr-bg);
  font-size: 20px;
  margin-right: 10px;
  border: 0 transparent;
}

comentario-comments .comentario-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

/* Thread toolbar */
comentario-comments .comentario-thread-toolbar {
  display: flex;
  align-content: center;
  align-items: center;
  flex-wrap: nowrap;
  color: var(--cmntr-muted-color);
  font-size: 0.75rem !important; /* 12px */
}

comentario-comments .comentario-thread-toolbar::after {
  display: block;
  clear: both;
  content: "";
}

comentario-comments .comentario-thread-toolbar .comentario-thread-buttons {
  flex-grow: 0;
  text-align: left;
}

comentario-comments .comentario-thread-toolbar .comentario-comment-count,
comentario-comments .comentario-comment-count {
  flex-grow: 1;
  text-align: center;
  font-size: 0.75rem !important;
  color: rgba(0, 0, 0, 0.87) !important; /* Direct color override */
  font-weight: 500;
}

comentario-comments .comentario-thread-toolbar .comentario-sort-buttons {
  flex-grow: 0;
  text-align: right;
}

comentario-comments .comentario-thread-toolbar .comentario-btn .comentario-icon {
  width: 8px;
  height: 8px;
  transition: transform 0.2s;
}

comentario-comments .comentario-thread-toolbar .comentario-btn.comentario-sort-asc .comentario-icon {
  transform: rotate(180deg);
}

/* Toolbar */
comentario-comments .comentario-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

comentario-comments .comentario-toolbar .comentario-toolbar-section {
  display: flex;
  align-items: center;
}

comentario-comments .comentario-toolbar .comentario-btn-tool,
comentario-comments .comentario-toolbar button.comentario-btn-tool {
  --cmntr-btn-color: rgba(0, 0, 0, 0.6) !important;
  color: rgba(0, 0, 0, 0.6) !important; /* Direct color override */
  margin: 0;
  padding: 0;
  width: 32px;
  height: 32px;
  opacity: 0.5;
  cursor: pointer !important;
  pointer-events: auto !important;
}

comentario-comments .comentario-toolbar .comentario-btn-tool:hover,
comentario-comments .comentario-toolbar button.comentario-btn-tool:hover {
  color: #6366f1 !important; /* indigo-500 */
  opacity: 1 !important;
}

comentario-comments .comentario-toolbar .comentario-btn-tool.comentario-btn-lg {
  width: 40px;
  height: 40px;
}

comentario-comments .comentario-toolbar .comentario-btn-tool.comentario-btn-lg .comentario-icon {
  width: 1.25em;
  height: 1.25em;
}

comentario-comments .comentario-toolbar.comentario-disabled {
  background-color: var(--cmntr-bg-shade);
}

comentario-comments .comentario-toolbar.comentario-disabled .comentario-btn-tool,
comentario-comments .comentario-toolbar.comentario-disabled button.comentario-btn-tool {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Form text */
comentario-comments .comentario-form-text {
  margin: 2px 8px;
  font-size: 0.75rem !important;
  color: var(--cmntr-muted-color);
}

/* Checkbox */
comentario-comments .comentario-checkbox-container {
  display: inline-block;
  min-height: 22px;
  padding-left: 24px;
  margin-bottom: 2px;
}

comentario-comments .comentario-checkbox-container input {
  float: left;
  margin-left: -24px;
  width: 20px;
  height: 20px;
  vertical-align: top;
  background: #fff no-repeat center;
  background-size: contain;
  border: 1px solid rgba(0, 0, 0, 0.25);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

comentario-comments .comentario-checkbox-container input:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}

comentario-comments .comentario-checkbox-container input[type="checkbox"] {
  border-radius: 5px;
}

comentario-comments .comentario-checkbox-container input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

comentario-comments .comentario-checkbox-container label {
  color: var(--cmntr-label-color);
  font-size: 0.75rem !important;
}

/* Message box */
comentario-comments .comentario-message-box {
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  background-color: var(--cmntr-success-bg);
  color: var(--cmntr-success-color);
  font-size: 0.75rem !important;
}

comentario-comments .comentario-message-box.comentario-error {
  background-color: var(--cmntr-danger-bg);
  color: var(--cmntr-danger-color);
}

comentario-comments .comentario-message-box .comentario-message-box-body {
  padding: 1rem;
  text-align: center;
}

/* Utility classes */
comentario-comments .comentario-small {
  font-size: 85% !important;
}

comentario-comments .comentario-hidden {
  display: none !important;
}

comentario-comments .comentario-disabled {
  opacity: 0.75;
}

comentario-comments .comentario-text-center {
  text-align: center !important;
}

comentario-comments .comentario-flex {
  display: flex !important;
}

comentario-comments .comentario-flex-wrap {
  flex-wrap: wrap !important;
}

comentario-comments .comentario-text-muted {
  color: var(--cmntr-muted-color) !important;
}

comentario-comments .comentario-text-success {
  color: var(--cmntr-success-color) !important;
}

comentario-comments .comentario-text-danger {
  color: var(--cmntr-danger-color) !important;
}

comentario-comments .comentario-text-warning {
  color: var(--cmntr-warning-color) !important;
}

/* ============================================================================
   DARK MODE (slate)
   ============================================================================ */

[data-md-color-scheme="slate"] comentario-comments {
  --cmntr-bg: #212529;
  --cmntr-bg-shade: #343a40;
  --cmntr-bg-highlight: #4263eb;
  --cmntr-bg-blink: #fab005;
  --cmntr-danger-bg: #c92a2a;
  --cmntr-deleted-bg: #f06595;
  --cmntr-dlg-header-bg: #868e96;
  --cmntr-input-bg: #212529;
  --cmntr-pending-bg: #565c63;
  --cmntr-placeholder-bg: rgba(255, 255, 255, 0.05);
  --cmntr-rejected-bg: #f08c00;
  --cmntr-success-bg: #2f9e44;
  --cmntr-warning-bg: #f08c00;
  --cmntr-color: rgba(255, 255, 255, 0.87);
  --cmntr-danger-color: #ffc9c9;
  --cmntr-input-color: rgba(255, 255, 255, 0.87);
  --cmntr-input-ph-color: rgba(255, 255, 255, 0.6);
  --cmntr-input-disabled-color: #dee2e6;
  --cmntr-label-color: rgba(255, 255, 255, 0.87);
  --cmntr-link-color: #818cf8;
  --cmntr-link-hover-color: #a5b4fc;
  --cmntr-muted-color: rgba(255, 255, 255, 0.6);
  --cmntr-score-color: #adb5bd;
  --cmntr-score-up-color: #8ce99a;
  --cmntr-score-down-color: #ffc078;
  --cmntr-sticky-color: #fcc419;
  --cmntr-success-color: #b2f2bb;
  --cmntr-warning-color: #ffec99;
  --cmntr-card-border: rgba(255, 255, 255, 0.12);
  --cmntr-dlg-border: #ced4da;
  --cmntr-pending-border: #ffe066;
  --cmntr-table-border: #868e96;
  
  --cmntr-btn-color: #ffffff;
  --cmntr-btn-bg: #6366f1;
  --cmntr-btn-hover-color: #ffffff;
  --cmntr-btn-hover-bg: #818cf8;
  --cmntr-btn-active-color: #ffffff;
  --cmntr-btn-active-bg: #4f46e5;
  
  border-top-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.87);
}

[data-md-color-scheme="slate"] comentario-comments * {
  color: rgba(255, 255, 255, 0.87) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-dialog {
  background-color: var(--md-default-bg-color) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-dialog-header {
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.87) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-backdrop {
  background-color: rgba(0, 0, 0, 0.6);
}

[data-md-color-scheme="slate"] comentario-comments input[type="email"],
[data-md-color-scheme="slate"] comentario-comments input[type="password"],
[data-md-color-scheme="slate"] comentario-comments input[type="text"],
[data-md-color-scheme="slate"] comentario-comments input[type="url"],
[data-md-color-scheme="slate"] comentario-comments textarea {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.87) !important;
}

[data-md-color-scheme="slate"] comentario-comments textarea[name="comentario-comment-editor"] {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-md-color-scheme="slate"] comentario-comments textarea:focus {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2) !important;
}

/* Dark mode - Commenter names */
[data-md-color-scheme="slate"] comentario-comments .comentario-card .comentario-name,
[data-md-color-scheme="slate"] comentario-comments .comentario-name,
[data-md-color-scheme="slate"] comentario-comments .comentario-name-container .comentario-name,
[data-md-color-scheme="slate"] comentario-comments .comentario-name-wrap .comentario-name,
[data-md-color-scheme="slate"] comentario-comments .comentario-card-header .comentario-name {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600 !important;
}

/* Dark mode - Subtitles/timestamps */
[data-md-color-scheme="slate"] comentario-comments .comentario-card .comentario-subtitle,
[data-md-color-scheme="slate"] comentario-comments .comentario-subtitle,
[data-md-color-scheme="slate"] comentario-comments .comentario-subtitle a {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Dark mode - Comment body text */
[data-md-color-scheme="slate"] comentario-comments .comentario-card .comentario-card-body,
[data-md-color-scheme="slate"] comentario-comments .comentario-card-body,
[data-md-color-scheme="slate"] comentario-comments .comentario-card .comentario-card-body p,
[data-md-color-scheme="slate"] comentario-comments .comentario-card-body p {
  color: rgba(255, 255, 255, 0.87) !important;
}

/* Dark mode - Comment count */
[data-md-color-scheme="slate"] comentario-comments .comentario-thread-toolbar .comentario-comment-count,
[data-md-color-scheme="slate"] comentario-comments .comentario-comment-count {
  color: rgba(255, 255, 255, 0.87) !important;
}

/* Dark mode - Add comment host */
[data-md-color-scheme="slate"] comentario-comments .comentario-add-comment-host {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-add-comment-host:not(.comentario-editor-inserted) {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-add-comment-host:not(.comentario-editor-inserted) .comentario-add-comment-placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Dark mode - Comment editor */
[data-md-color-scheme="slate"] comentario-comments .comentario-comment-editor,
[data-md-color-scheme="slate"] comentario-comments .comentario-add-comment-host.comentario-editor-inserted {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Dark mode - Input group */
[data-md-color-scheme="slate"] comentario-comments .comentario-input-group {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-input-group .comentario-input {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.87) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-input-group .comentario-input::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Dark mode - Tool buttons */
[data-md-color-scheme="slate"] comentario-comments .comentario-btn-tool,
[data-md-color-scheme="slate"] comentario-comments button.comentario-btn-tool,
[data-md-color-scheme="slate"] comentario-comments .comentario-toolbar .comentario-btn-tool {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-btn-tool:hover,
[data-md-color-scheme="slate"] comentario-comments button.comentario-btn-tool:hover {
  color: #818cf8 !important;
}

/* Dark mode - Link buttons */
[data-md-color-scheme="slate"] comentario-comments .comentario-btn-link,
[data-md-color-scheme="slate"] comentario-comments button.comentario-btn-link {
  color: #818cf8 !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-btn-link:hover {
  color: #a5b4fc !important;
}

/* Dark mode - Thread toolbar */
[data-md-color-scheme="slate"] comentario-comments .comentario-thread-toolbar {
  color: rgba(255, 255, 255, 0.6) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

/* Dark mode - Dialog CSS variables */
[data-md-color-scheme="slate"] comentario-comments .comentario-dialog {
  --cmntr-bg: var(--md-default-bg-color) !important;
  --cmntr-bg-shade: rgba(255, 255, 255, 0.05) !important;
  --cmntr-color: rgba(255, 255, 255, 0.87) !important;
  --cmntr-muted-color: rgba(255, 255, 255, 0.6) !important;
  --cmntr-dlg-header-bg: transparent !important;
  --cmntr-dlg-border: rgba(255, 255, 255, 0.12) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-dialog * {
  color: rgba(255, 255, 255, 0.87) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-dialog .comentario-dialog-body {
  color: rgba(255, 255, 255, 0.87) !important;
}

[data-md-color-scheme="slate"] comentario-comments .comentario-dialog .comentario-dialog-centered {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Responsive */
@media screen and (max-width: 768px) {
  comentario-comments {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }
  
  comentario-comments .comentario-card .comentario-card-self {
    padding-top: 0.75rem;
  }
}

/* Footer links styling to match copyright font size */
.md-footer-links {
  font-size: 0.64rem;
  line-height: 1.6;
}

.md-footer-links a {
  font-size: inherit;
  color: inherit;
}

.md-footer-links__separator {
  margin: 0 0.4rem;
  opacity: 0.54;
}
