/* Custom styles for Pouch Blog using Pico.css and TinyMCE compatibility */

/* Accessibility improvements */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only content */
.sr-only, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tag Manager Styles - using Pico.css compatible classes */
.tag-manager {
  margin-bottom: 1rem;
}

.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: var(--pico-form-element-height);
  padding: calc(var(--pico-form-element-spacing-vertical) * 0.5) var(--pico-form-element-spacing-horizontal);
  border: var(--pico-border-width) solid var(--pico-form-element-border-color);
  border-radius: var(--pico-border-radius);
  background-color: var(--pico-form-element-background-color);
  gap: 0.25rem;
  cursor: text;
}

.tag-input-wrapper:focus-within {
  border-color: var(--pico-form-element-active-border-color);
  background-color: var(--pico-form-element-active-background-color);
}

.tag-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--pico-primary);
  color: var(--pico-primary-inverse);
  border: none;
  border-radius: calc(var(--pico-border-radius) * 0.5);
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.tag-pill:hover {
  background-color: var(--pico-primary-hover);
  transform: translateY(-1px);
}

.tag-pill:focus {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
  background-color: var(--pico-primary-hover);
}

.tag-pill:active {
  transform: translateY(0);
}

.tag-text {
  font-weight: 500;
}

.tag-separator {
  opacity: 0.7;
  font-weight: 300;
  user-select: none;
}

.tag-remove {
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.8;
  user-select: none;
}

.tag-input {
  flex: 1 1 auto;
  min-width: 8rem;
  border: none;
  outline: none;
  background: transparent;
  color: var(--pico-form-element-color);
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  margin: 0;
}

.tag-input::placeholder {
  color: var(--pico-form-element-placeholder-color);
}

.recent-tags-label {
  display: block;
  font-weight: var(--pico-form-element-label-font-weight);
  margin-bottom: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--pico-color);
}

.recent-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.recent-tag-btn {
  padding: 0.25rem 0.5rem;
  border: var(--pico-border-width) solid var(--pico-muted-border-color);
  border-radius: calc(var(--pico-border-radius) * 0.5);
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}

.recent-tag-btn:hover {
  border-color: var(--pico-primary);
  background-color: var(--pico-primary-hover);
  color: var(--pico-primary-inverse);
}

.recent-tag-btn:focus {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
}

.recent-tag-btn.selected {
  border-color: var(--pico-primary);
  background-color: var(--pico-primary);
  color: var(--pico-primary-inverse);
}

.recent-tag-btn.selected:hover {
  background-color: var(--pico-primary-hover);
}

.no-recent-tags {
  color: var(--pico-muted-color);
  font-style: italic;
  font-size: 0.875rem;
  margin: 0;
}

/* Status label pills for post indicators */
.status-label-pill {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: 0.5rem;
  background-color: var(--pico-muted-border-color);
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* Dark mode adjustments */
[data-theme="dark"] .tag-pill {
  background-color: var(--pico-primary);
}

[data-theme="dark"] .tag-remove:hover,
[data-theme="dark"] .tag-remove:focus {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .tag-input-wrapper {
    padding: calc(var(--pico-form-element-spacing-vertical) * 0.4) calc(var(--pico-form-element-spacing-horizontal) * 0.8);
  }
  
  .recent-tags-container {
    gap: 0.125rem;
  }
  
  .recent-tag-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
  }
  
  .tag-pill {
    font-size: 0.8rem;
    padding: 0.1rem 0.3rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure sufficient color contrast for better accessibility */
.delete-btn {
  color: #dc3545; /* Improved contrast */
  background-color: transparent;
  border: 1px solid #dc3545;
}

.delete-btn:hover, 
.delete-btn:focus {
  background-color: #dc3545;
  color: white;
}

/* Improved contrast for post indicators */
.post-indicator.excerpt-indicator {
  color: #0056b3 !important; /* Darker blue for better contrast */
  font-weight: bold;
}

.post-indicator.hidden-indicator {
  color: #a71e22 !important; /* Darker red for better contrast */
  font-weight: bold;
}

.post-indicator.static-page-indicator {
  color: #086f08 !important; /* Darker green for better contrast */
  font-weight: bold;
}

.post-indicator.pinned-indicator {
  color: #b8860b !important; /* Dark goldenrod for pinned posts */
  font-weight: bold;
}

/* Improve muted text contrast */
small,
.muted {
  color: #666666; /* Darker than default pico muted color for better contrast */
}

/* Status message improvements for better contrast */
.success-message {
  background-color: #155724;
  border: 1px solid #c3e6cb;
  color: #d4edda;
}

.error-message {
  background-color: #721c24;
  border: 1px solid #f5c6cb;
  color: #f8d7da;
}

.warning-message {
  background-color: #856404;
  border: 1px solid #ffeaa7;
  color: #fff3cd;
}

/* Focus indicators for better keyboard navigation */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
}

/* Improve form label associations and help text styling */
label span[aria-label="required"] {
  color: #dc3545;
  font-weight: bold;
  margin-left: 0.2em;
}

small {
  display: block;
  margin-top: 0.25rem;
  color: var(--pico-muted-color);
  font-size: 0.875rem;
}

/* Ensure fieldset legends are properly styled */
fieldset {
  border: 1px solid var(--pico-border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

legend {
  font-weight: 600;
  padding: 0 0.5rem;
  color: var(--pico-color);
}


@font-face {
  font-family: "NotePaper";
  src: url('../fonts/note-paper/NotePaper-regular.otf') format('opentype');
}
@font-face {
  font-family: "MetalMania";
  src: url('../fonts/metal-mania/MetalMania-Regular.ttf') format('truetype');
}

/* REQUIRES letter-spacing: .3rem; to be easily readable */
@font-face {
  font-family: "GreenFuz";
  src: url('../fonts/green-fuz/GreenFuz.otf') format('opentype');
}

@font-face {
  font-family: "Yatsurano Western";
  src: url('../fonts/yatsurano-western/gomarice_yatsurano_western.ttf') format('truetype');
}


/* keep */
@font-face {
  font-family: "AvQest";
  src: url('../fonts/avqest/AvQest.ttf') format('truetype');
}

/* Better with letter-spacing: 2px; */
@font-face {
  font-family: "Special Elite";
  src: url('../fonts/special-elite/SpecialElite.ttf') format('truetype');
}

/* keep */
@font-face {
  font-family: "Mystery Quest";
  src: url('../fonts/mystery-quest/MysteryQuest-Regular.ttf') format('truetype');
}






/* Ensure TinyMCE content fits Pico's look */
.tox .tox-edit-area__iframe {
  border-radius: 0.5rem;
}

.tox .tox-statusbar {
  background: var(--pico-background);
  color: var(--pico-muted-color);
  border-top: 1px solid var(--pico-border-color);
}

.tox .tox-toolbar {
  background-color: var(--pico-background);
  border-bottom: 1px solid var(--pico-border-color);
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Article styling */
article {
  padding: 1.5rem 1rem;
  margin-top: 2em;
  margin-bottom: 1em;
   background-color: var(--pico-card-background-color);
border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Tags styling */
footer p {
  font-size: 0.9em;
  color: var(--pico-muted-color);
}


/* Container for main content */
main.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.delete-btn {
  color: rgba(210, 0, 0, 1.0);
}

/* Pagination nav centering and button spacing */
#internal-pagination,
#public-pagination,
#editor-pagination {
  display: flex;
  justify-content: center;   /* center horizontally */
  gap: 1em;                /* even space between buttons */
  margin-bottom: 2em;
}

#internal-pagination button,
#public-pagination button,
#editor-pagination button {
  min-width: 3.0em;
  margin: 0;
  /* Optional: add more style to match your theme */
}




/* Add spacing before the response form to separate it visually from the post */
.response-form-separator {
  margin-top: 2.5em;
}

/* Add spacing before the response list to separate it visually */
.responses-list {
  margin-top: 2.5em;  
}

/* Make card boundaries visible in both light and dark mode */
.card {
  border: 1.5px solid #444 !important;        /* dark neutral border */
  box-shadow: none !important;                /* remove shadow for clarity */
  margin-bottom: 3em !important;            /* extra space between cards */
  padding: 3em 2em 1em 2em;
}
@media (max-width: 700px) {
  .card {
    margin-bottom: 3.5em !important;
  }
}

/* High contrast mode support for Windows users */
@media (prefers-contrast: high) {
  .skip-link {
    background: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
  }
  
  button:focus,
  input:focus,
  textarea:focus,
  select:focus,
  a:focus {
    outline: 3px solid #ffff00;
    outline-offset: 2px;
  }
  
  .delete-btn {
    border-width: 2px;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .skip-link:focus {
    transition: none;
  }
}


/* Gratitude feature styles */
.gratitude-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.gratitude-button {
  /* Use secondary background to ensure contrast in both light and dark modes */
/*  background: var(--pico-secondary-background);
  border: 2px solid var(--pico-secondary);*/
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  color: var(--pico-color);
}



/* On hover (both modes), use Pico's primary background */
.gratitude-button:hover {
  /*background: var(--pico-primary-background);*/
  border-color: var(--pico-primary);
  /*color: var(--pico-primary);*/
  transform: scale(1.05);
}

.gratitude-button.clicked {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: var(--pico-primary-inverse);
}

.gratitude-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.gratitude-icon {
  width: 48px;
  height: 48px;
}

.gratitude-counter {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 24px;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gratitude-counter:empty {
  display: none;
}

/* Ensure proper spacing in article context */
article .gratitude-container {
  margin-left: 0;
  margin-right: auto;
}

/* Subscription button styling for visibility in both light and dark modes */
.subscription-button {
  color: var(--pico-primary) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

.subscription-button svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  .gratitude-button {
    border-width: 3px;
  }
  
  .gratitude-button:focus {
    outline: 3px solid #ffff00;
    outline-offset: 3px;
  }
}

/* Reduced motion adjustments */
@media (prefers-reduced-motion: reduce) {
  .gratitude-button {
    transition: none;
  }
  
  .gratitude-button:hover {
    transform: none;
  }
}

/* Pinned post styling - using article element for higher specificity */
article.pinned-internal-post {
  background-color: var(--pico-code-background-color);
  border-left: 4px solid var(--pico-primary);
  border-radius: var(--pico-border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Green styling for private mentions by non-admin authors */
article.pinned-internal-post-private {
  background-color: var(--pico-code-background-color);
  border-left: 4px solid #28a745 !important; /* Green color */
  border-radius: var(--pico-border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Red styling for pinned private posts by admin authors */
article.pinned-internal-post-admin {
  background-color: var(--pico-code-background-color);
  border-left: 4px solid #dc3545 !important; /* Red color */
  border-radius: var(--pico-border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Blue styling for public mentions */
article.pinned-internal-post-public {
  background-color: var(--pico-code-background-color);
  border-left: 4px solid var(--pico-primary) !important; /* Blue color */
  border-radius: var(--pico-border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

article.pinned-internal-post h3,
article.pinned-internal-post-private h3,
article.pinned-internal-post-admin h3,
article.pinned-internal-post-public h3 {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Dark mode support for pinned posts */
[data-theme="dark"] article.pinned-internal-post {
  background-color: var(--pico-card-background-color);
  border-left-color: var(--pico-primary);
}

[data-theme="dark"] article.pinned-internal-post-private {
  background-color: var(--pico-card-background-color);
  border-left-color: #28a745 !important; /* Green color for private mentions */
}

[data-theme="dark"] article.pinned-internal-post-admin {
  background-color: var(--pico-card-background-color);
  border-left-color: #dc3545 !important; /* Red color for admin authors */
}

[data-theme="dark"] article.pinned-internal-post-public {
  background-color: var(--pico-card-background-color);
  border-left-color: var(--pico-primary) !important; /* Blue color for public mentions */
}

/* Light mode explicit styling for pinned posts */
[data-theme="light"] article.pinned-internal-post {
  background-color: #f8f9fa;
  border-left-color: var(--pico-primary);
}

[data-theme="light"] article.pinned-internal-post-private {
  background-color: #f8f9fa;
  border-left-color: #28a745 !important; /* Green color for private mentions */
}

[data-theme="light"] article.pinned-internal-post-admin {
  background-color: #f8f9fa;
  border-left-color: #dc3545 !important; /* Red color for admin authors */
}

[data-theme="light"] article.pinned-internal-post-public {
  background-color: #f8f9fa;
  border-left-color: var(--pico-primary) !important; /* Blue color for public mentions */
}

/* Username link styling - make it prominent and clearly clickable */
a.username-link {
  font-weight: 600 !important;
  color: var(--pico-color) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border-radius: 0.25rem;
  padding: 0.1rem 0.25rem;
  transition: background-color 0.15s ease;
}

a.username-link:hover, 
a.username-link:focus {
  background-color: var(--pico-primary-hover);
  color: var(--pico-primary-inverse) !important;
  text-decoration: none !important;
}

a.username-link:focus {
  outline: 2px solid var(--pico-primary);
  outline-offset: 1px;
}

/* Make avatars clickable and responsive */
.author-avatar {
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.author-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.author-avatar:focus {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
}

.author-avatar img,
.author-avatar .avatar-placeholder {
  display: block;
  cursor: pointer;
}

/* Fix filter button styling issues - override inline styles */
#subscription-filter-btn,
#mentions-toggle-btn {
  /* Remove problematic background and use proper contrast */
  background: var(--pico-form-element-background-color) !important;
  color: var(--pico-color) !important;
  border: 1px solid var(--pico-form-element-border-color) !important;
  border-radius: var(--pico-border-radius) !important;
  padding: 0.5rem 1rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  transition: all 0.2s ease !important;
}

/* Hover state for filter buttons */
#subscription-filter-btn:hover,
#mentions-toggle-btn:hover {
  background: var(--pico-form-element-active-background-color) !important;
  border-color: var(--pico-form-element-active-border-color) !important;
}

/* Active/pressed state for filter buttons when toggled on */
#subscription-filter-btn[aria-pressed="true"],
#mentions-toggle-btn[aria-pressed="true"] {
  background: var(--pico-primary-background) !important;
  color: var(--pico-primary-inverse) !important;
  border-color: var(--pico-primary-border) !important;
}

/* Text color for filter button spans */
#subscription-filter-text,
#mentions-toggle-text {
  color: inherit !important;
}
responses-list
