
/* CRUNEVO Feed - Modern Facebook-style Design */

/* Variables CSS */
:root {
  --crunevo-primary: #6D28D9;
  --crunevo-accent: #42B883;
  --feed-bg: #F0F2F5;
  --post-bg: #FFFFFF;
  --text-primary: #1C1E21;
  --text-secondary: #65676B;
  --text-muted: #8A8D91;
  --border-color: #E4E6EA;
  --hover-bg: #F2F3F5;
  --blue-link: #1877F2;
  --success-color: #42B883;
  --error-color: #E74C3C;
  --warning-color: #F39C12;
  --shadow-light: 0 1px 2px rgba(0,0,0,0.1);
  --shadow-medium: 0 2px 4px rgba(0,0,0,0.1);
  --border-radius: 8px;
  --transition: all 0.2s ease;
}

/* Dark mode variables */
[data-bs-theme="dark"] {
  --feed-bg: #18191A;
  --post-bg: #242526;
  --text-primary: #E4E6EA;
  --text-secondary: #B0B3B8;
  --text-muted: #8A8D91;
  --border-color: #3A3B3C;
  --hover-bg: #3A3B3C;
  --shadow-light: 0 1px 2px rgba(255,255,255,0.1);
  --shadow-medium: 0 2px 4px rgba(255,255,255,0.1);
}

/* Feed container */
.feed-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
  background: var(--feed-bg);
  min-height: 100vh;
}

/* Facebook-style post */
.facebook-post {
  background: var(--post-bg);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-light);
  overflow: hidden;
  transition: var(--transition);
}

.facebook-post:hover {
  box-shadow: var(--shadow-medium);
}

/* Post header */
.post-header {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  gap: 12px;
}

.post-avatar {
  flex-shrink: 0;
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.post-user-info {
  flex: 1;
}

.user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.username-link {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.username-link:hover {
  color: var(--blue-link);
  text-decoration: underline;
}

.deleted-user {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
}

.verified-badge {
  background-color: transparent !important;
  border: none !important;
  color: #a855f7 !important;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
}

.user-career {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--hover-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.post-timestamp {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.edited-indicator {
  font-style: italic;
}

.post-options {
  position: relative;
}

.options-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.options-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.dropdown-menu {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-medium);
  border-radius: var(--border-radius);
}

.dropdown-item {
  color: var(--text-primary);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.dropdown-item.delete-option:hover {
  background: #fef2f2;
  color: var(--error-color);
}

/* Post content */
.post-content {
  padding: 0 16px 16px;
}

.post-content p {
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  word-wrap: break-word;
}

/* Post media */
.post-media {
  margin-bottom: 8px;
}

/* File attachment */
.file-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin: 0 16px 16px;
  background: var(--hover-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.file-icon {
  font-size: 32px;
  color: var(--error-color);
}

.file-info {
  flex: 1;
}

.file-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.file-link {
  color: var(--blue-link);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.file-link:hover {
  text-decoration: underline;
}

/* Post reactions count */
.post-reactions-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-secondary);
}

.reactions-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.reactions-summary:hover {
  text-decoration: underline;
}

.reaction-icons {
  display: flex;
  margin-right: 4px;
}

.reaction-emoji {
  font-size: 16px;
  margin-right: -2px;
  background: white;
  border-radius: 50%;
  padding: 1px;
  border: 1px solid var(--border-color);
}

.reactions-text {
  font-weight: 500;
}

.comments-count {
  cursor: pointer;
}

.comments-count:hover {
  text-decoration: underline;
}

/* Post actions */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--border-color);
  gap: 8px;
}

.fb-action-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.fb-action-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.fb-action-btn.active,
.fb-action-btn.active i {
  color: var(--crunevo-primary);
}

.like-btn.active,
.like-btn.active i {
  color: var(--crunevo-primary);
}

.fb-action-btn i {
  font-size: 16px;
}

.action-text {
  font-weight: 600;
}

.action-count {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 20px;
}

/* Reaction panel */
.reaction-panel {
  overflow-x: auto;
  white-space: nowrap;
  max-width: 300px;
  flex-wrap: nowrap;
}

/* Comments section */
.comments-section {
  border-top: 1px solid var(--border-color);
  padding: 16px;
}

.comments-container {
  margin-bottom: 16px;
}

.comment-item {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.comment-avatar {
  flex-shrink: 0;
}

.comment-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-bubble {
  background: var(--hover-bg);
  border-radius: 16px;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
}

.comment-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.comment-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.3;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-left: 12px;
}

.comment-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.comment-reply-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.comment-reply-btn:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.view-more-comments {
  text-align: center;
  margin: 12px 0;
}

.view-more-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition);
}

.view-more-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* Add comment form */
.add-comment-form {
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.comment-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--hover-bg);
  border-radius: 20px;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
}

.comment-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-primary);
  resize: none;
}

.comment-input::placeholder {
  color: var(--text-muted);
}

.comment-submit-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.comment-submit-btn:hover:not(:disabled) {
  background: var(--blue-link);
  color: white;
}

.comment-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.inactive-btn {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-secondary);
}

/* Post creation image preview */
.preview-item {
  position: relative;
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.preview-image {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Facebook-style Image Gallery */
.facebook-gallery-container {
  width: 100%;
  margin-bottom: 0;
}

.facebook-gallery {
  width: 100%;
  display: flex;
  gap: 2px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
  display: block;
}

.gallery-image:hover {
  opacity: 0.95;
}

/* Single image */
.facebook-gallery.single-image {
  max-height: 450px;
  min-height: 200px;
}

.facebook-gallery.single-image .gallery-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  background: #000;
}

/* Two images */
.facebook-gallery.two-images {
  height: 300px;
}

.facebook-gallery.two-images .gallery-item {
  flex: 1;
  height: 100%;
}

/* Three images */
.facebook-gallery.three-images {
  height: 300px;
}

.facebook-gallery.three-images .main-item {
  flex: 1;
  height: 100%;
}

.facebook-gallery.three-images .gallery-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.facebook-gallery.three-images .gallery-side .gallery-item {
  flex: 1;
}

/* Four images */
.facebook-gallery.four-images {
  height: 300px;
  flex-wrap: wrap;
}

.facebook-gallery.four-images .gallery-item {
  width: calc(50% - 1px);
  height: calc(50% - 1px);
}

/* Five or more images */
.facebook-gallery.five-plus-images {
  height: 300px;
}

.facebook-gallery.five-plus-images .main-item {
  flex: 1;
  height: 100%;
}

.facebook-gallery.five-plus-images .gallery-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}

.facebook-gallery.five-plus-images .gallery-grid .gallery-item {
  position: relative;
}

/* Overlay for extra images */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.gallery-overlay:hover {
  background: rgba(0, 0, 0, 0.85);
}

.overlay-text {
  color: white;
  font-size: 32px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .facebook-gallery.two-images,
  .facebook-gallery.three-images,
  .facebook-gallery.four-images,
  .facebook-gallery.five-plus-images {
    height: 250px;
  }

  .facebook-gallery.single-image {
    max-height: 300px;
  }

  .overlay-text {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .facebook-gallery.two-images,
  .facebook-gallery.three-images,
  .facebook-gallery.four-images,
  .facebook-gallery.five-plus-images {
    height: 200px;
  }

  .facebook-gallery.single-image {
    max-height: 250px;
  }

  .overlay-text {
    font-size: 20px;
  }
}

/* Post creation form */
.post-creation-box {
  background: var(--post-bg);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-light);
}

.post-creation-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 16px;
  background: var(--hover-bg);
  border-radius: 24px;
  transition: var(--transition);
}

.post-creation-trigger:hover {
  background: var(--border-color);
}

.post-creation-trigger img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.post-creation-placeholder {
  flex: 1;
  color: var(--text-muted);
  font-size: 16px;
}

/* Loading skeleton */
.post-skeleton {
  background: var(--post-bg);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-light);
}

.skeleton-line {
  background: var(--border-color);
  height: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border-color);
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .feed-container {
    padding: 0 8px;
  }

  .facebook-post {
    margin-bottom: 16px;
  }

  .post-header {
    padding: 12px;
  }

  .post-content {
    padding: 0 12px 12px;
  }

  .post-actions {
    padding: 8px 12px;
  }

  .action-text {
    display: none;
  }

  .fb-action-btn {
    padding: 8px;
  }

  .comments-section {
    padding: 12px;
  }

  .image-gallery.two,
  .image-gallery.three,
  .image-gallery.four,
  .image-gallery.five-plus {
    height: 250px;
  }

  .image-gallery.single {
    max-height: 350px;
  }
}

@media (max-width: 480px) {
  .image-gallery.two,
  .image-gallery.three,
  .image-gallery.four,
  .image-gallery.five-plus {
    height: 200px;
  }

  .image-gallery.single {
    max-height: 300px;
  }

  .fb-action-btn {
    font-size: 14px;
    padding: 6px 4px;
  }

  .user-career {
    display: none;
  }
}

/* Animations */
@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);
  }
}

@keyframes likeAnimation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

.fade-out {
  animation: fadeOut 0.3s ease;
}

@keyframes like-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.like-pop {
  animation: like-pop 0.3s ease;
}

.like-animation {
  animation: likeAnimation 0.3s ease;
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--crunevo-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow-light: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-medium: 0 2px 4px rgba(0,0,0,0.3);
    --border-color: #000000;
  }
  
  [data-bs-theme="dark"] {
    --border-color: #FFFFFF;
  }
}

/* Comments Modal Styles */
.comment-item {
  padding: 8px 0;
}

.comment-bubble {
  background: var(--hover-bg);
  border-radius: 16px;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
}

.comment-author {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.comment-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.comment-meta {
  margin-left: 12px;
  margin-top: 4px;
}

.comment-meta .btn-link {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.comment-meta .btn-link:hover {
  text-decoration: underline;
}

.comment-form .comment-input {
  border-radius: 20px;
  padding: 8px 45px 8px 12px;
  border: 1px solid var(--border-color);
  background: var(--hover-bg);
}

.comment-form .comment-input:focus {
  outline: none;
  border-color: var(--crunevo-primary);
  box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.1);
}

.post-content-modal {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.post-content-modal p {
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.comments-list {
  max-height: 400px;
  overflow-y: auto;
}

/* Interest/Not Interest Actions */
.post-interest-actions {
  padding: 12px 16px;
  background: var(--hover-bg);
  border-top: 1px solid var(--border-color);
  display: none;
}

.post-interest-actions.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.interest-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  margin-right: 8px;
}

.interest-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.interest-btn.active {
  background: var(--crunevo-primary);
  color: white;
  border-color: var(--crunevo-primary);
}


/* Modal Comments Gallery Styles */
.modal-gallery-container {
  margin-bottom: 0;
}

.facebook-gallery-modal {
  width: 100%;
  display: flex;
  gap: 2px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.modal-gallery-vertical {
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
}
.modal-gallery-vertical .modal-gallery-item {
  flex: none;
}
.modal-gallery-vertical .modal-gallery-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  background: #000;
}

.modal-gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.modal-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
  display: block;
}

.modal-gallery-image:hover {
  opacity: 0.95;
}

/* Modal gallery layouts */
.modal-gallery.single-image {
  max-height: 400px;
  min-height: 200px;
}

.modal-gallery.single-image .modal-gallery-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  background: #000;
}

.modal-gallery.two-images {
  height: 300px;
}

.modal-gallery.two-images .modal-gallery-item {
  flex: 1;
  height: 100%;
}

.modal-gallery.three-images {
  height: 300px;
}

.modal-gallery.three-images .main-item {
  flex: 1;
  height: 100%;
}

.modal-gallery.three-images .modal-gallery-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-gallery.three-images .modal-gallery-side .modal-gallery-item {
  flex: 1;
}

.modal-gallery.four-images {
  height: 300px;
  flex-wrap: wrap;
}

.modal-gallery.four-images .modal-gallery-item {
  width: calc(50% - 1px);
  height: calc(50% - 1px);
}

.modal-gallery.five-plus-images {
  height: 300px;
}

.modal-gallery.five-plus-images .main-item {
  flex: 1;
  height: 100%;
}

.modal-gallery.five-plus-images .modal-gallery-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}

.modal-gallery.five-plus-images .modal-gallery-grid .modal-gallery-item {
  position: relative;
}

.modal-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-gallery-overlay:hover {
  background: rgba(0, 0, 0, 0.85);
}

.modal-gallery-overlay .overlay-text {
  color: white;
  font-size: 24px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Modal Post Actions */
.modal-post-actions {
  background: var(--post-bg);
}

.modal-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-action-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.modal-action-btn.active {
  color: var(--crunevo-primary);
}

.modal-action-btn.like-btn.active {
  color: var(--crunevo-primary);
}

/* Modal Comments Section */
.modal-comments-section {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.comments-list {
  margin-bottom: 20px;
}

.comment-item {
  padding: 8px 0;
}

.comment-bubble {
  background: var(--hover-bg) !important;
  border-radius: 16px !important;
  padding: 8px 12px !important;
  display: inline-block;
  max-width: 100%;
}

[data-bs-theme="dark"] .comment-bubble {
  background: #3A3B3C !important;
}

.comment-author {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
  font-weight: 600;
}

.comment-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.comment-meta {
  margin-left: 12px;
  margin-top: 4px;
}

.comment-meta .btn-link {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
}

.comment-meta .btn-link:hover {
  text-decoration: underline;
  color: var(--text-primary);
}

/* Add Comment Form */
.add-comment-form .comment-input {
  border: 1px solid var(--border-color);
  background: var(--hover-bg);
  color: var(--text-primary);
  font-size: 14px;
  padding: 8px 45px 8px 12px;
}

.add-comment-form .comment-input:focus {
  outline: none;
  border-color: var(--crunevo-primary);
  box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.1);
  background: var(--post-bg);
}

.add-comment-form .comment-input::placeholder {
  color: var(--text-muted);
}

/* Responsive adjustments for modal gallery */
@media (max-width: 768px) {
  .modal-dialog {
    max-width: 95vw;
    margin: 10px auto;
  }

  .modal-gallery-vertical {
    max-height: 50vh;
  }

  .modal-gallery.two-images,
  .modal-gallery.three-images,
  .modal-gallery.four-images,
  .modal-gallery.five-plus-images {
    height: 250px;
  }

  .modal-gallery.single-image {
    max-height: 300px;
  }

  .modal-gallery-overlay .overlay-text {
    font-size: 20px;
  }

  .modal-comments-section {
    max-height: 300px;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .modal-gallery.two-images,
  .modal-gallery.three-images,
  .modal-gallery.four-images,
  .modal-gallery.five-plus-images {
    height: 200px;
  }

  .modal-gallery-vertical {
    max-height: 45vh;
  }

  .modal-gallery.single-image {
    max-height: 250px;
  }

  .modal-gallery-overlay .overlay-text {
    font-size: 18px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Floating action button container (desktop only) */
#fab-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 1050;
}

.fab-button,
.fab-sub {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: #6f42c1;
  color: #fff;
  font-size: 24px;
  margin-bottom: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, opacity 0.3s ease;
}


#fab-container .fab-sub {
  position: absolute;
  right: 0;
  transform: translateX(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#fab-container.active .fab-sub {
  opacity: 1;
  pointer-events: auto;
}

/* Grid layout for notes */
.feed-as-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
