/* ============================================
   COMMUNITY JOURNAL STYLES
   ============================================ */

/* Container */
.community-container {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Login Prompt */
.community-login-prompt {
  text-align: center;
  padding: 3rem 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.community-login-prompt .login-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1rem;
  color: var(--ark-navy);
}

.community-login-prompt .login-icon svg {
  width: 100%;
  height: 100%;
}

.community-login-prompt h3 {
  font-size: 1.25rem;
  color: var(--ark-navy);
  margin-bottom: 0.5rem;
}

.community-login-prompt p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Header Bar */
.community-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.community-label {
  font-weight: 600;
  color: var(--ark-navy);
}

.community-sort {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  color: var(--gray-700);
}

/* Feed */
.community-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Loading State */
.community-loading {
  text-align: center;
  padding: 3rem;
  color: var(--gray-500);
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--gray-200);
  border-top-color: var(--ark-maroon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.community-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.community-empty .empty-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1rem;
  color: var(--ark-navy);
  opacity: 0.5;
}

.community-empty .empty-icon svg {
  width: 100%;
  height: 100%;
}

.community-empty h3 {
  font-size: 1.125rem;
  color: var(--ark-navy);
  margin-bottom: 0.5rem;
}

.community-empty p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Post Card */
.community-post {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.community-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.community-post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--ark-navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.author-avatar.anonymous {
  background: var(--gray-400);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.9rem;
}

.post-time {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.community-post-scripture {
  padding: 0.75rem;
  background: rgba(232, 181, 98, 0.1);
  border-left: 3px solid var(--ark-gold);
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--ark-navy);
}

.community-post-scripture .scripture-passage-text {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  font-style: italic;
  line-height: 1.5;
}

.community-post-section {
  margin-bottom: 0.75rem;
}

.community-post-section .section-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.section-badge.head {
  background: rgba(20, 51, 72, 0.1);
  color: var(--ark-teal);
}

.section-badge.heart {
  background: rgba(95, 12, 11, 0.1);
  color: var(--ark-maroon);
}

.section-badge.hands {
  background: rgba(232, 181, 98, 0.2);
  color: #996b1f;
}

.community-post-section p {
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: none;
  background: none;
  color: var(--gray-500);
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.like-btn:hover {
  background: rgba(95, 12, 11, 0.05);
  color: var(--ark-maroon);
}

.like-btn.liked {
  color: var(--ark-maroon);
}

.like-btn.liked svg {
  fill: var(--ark-maroon);
}

.like-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.like-count {
  font-weight: 500;
}

/* Buttons */
.community-btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--ark-maroon);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.community-btn-primary:hover {
  background: #4a0908;
}

.community-btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.community-btn-secondary:hover {
  background: var(--gray-200);
}

/* ============================================
   SHARE TO COMMUNITY MODAL
   ============================================ */

.community-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 1rem;
}

.community-modal-overlay.show {
  opacity: 1;
}

.community-modal {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.community-modal-overlay.show .community-modal {
  transform: translateY(0);
}

.community-modal h3 {
  font-size: 1.25rem;
  color: var(--ark-navy);
  margin-bottom: 0.25rem;
}

.community-modal-subtitle {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
}

.community-identity-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.community-identity-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.community-identity-option:has(input:checked) {
  border-color: var(--ark-maroon);
  background: rgba(95, 12, 11, 0.03);
}

.community-identity-option input[type="radio"] {
  margin-top: 0.25rem;
  accent-color: var(--ark-maroon);
}

.community-identity-option .option-content {
  display: flex;
  flex-direction: column;
}

.community-identity-option .option-title {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.9rem;
}

.community-identity-option .option-desc {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.community-modal-preview {
  padding: 0.875rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.community-modal-preview strong {
  color: var(--ark-navy);
}

.community-modal-preview .preview-text {
  margin-top: 0.5rem;
  color: var(--gray-600);
  font-size: 0.8rem;
}

.community-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ============================================
   SHARE MENU UPDATE - Community Icon
   ============================================ */

.share-option.community-share {
  border-left: 3px solid var(--ark-maroon);
}

.share-option .share-icon-svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--ark-navy);
}

.share-option .share-icon-svg svg {
  width: 100%;
  height: 100%;
}

/* ============================================
   COMPACT CARDS (ARK Online, Community, Profile)
   ============================================ */

.compact-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 1rem;
}

@media (max-width: 400px) {
  .compact-cards-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.compact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  min-height: 90px;
}

.compact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.compact-card-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.5rem;
  color: var(--ark-navy);
}

.compact-card-icon svg {
  width: 100%;
  height: 100%;
}

.compact-card-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ark-navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

/* Card variants */
.compact-card.ark-online {
  border-color: var(--ark-gold);
}

.compact-card.ark-online:hover {
  background: rgba(232, 181, 98, 0.05);
}

.compact-card.community {
  border-color: var(--ark-maroon);
}

.compact-card.community .compact-card-icon {
  width: 3.5rem;
  height: 3.5rem;
}

.compact-card.community:hover {
  background: rgba(95, 12, 11, 0.03);
}

.compact-card.profile {
  border-color: var(--ark-teal);
}

.compact-card.profile .compact-card-icon {
  width: 2.25rem;
  height: 2.25rem;
}

.compact-card.profile:hover {
  background: rgba(20, 51, 72, 0.03);
}

/* ============================================
   JOURNAL HEADER - Community Link
   ============================================ */

.journal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: background 0.2s;
}

.header-icon-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.header-icon-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ============================================
   COLLAPSIBLE POSTS
   ============================================ */

.community-post.collapsible {
  cursor: pointer;
}

.community-post.collapsible .community-post-header {
  cursor: pointer;
}

.community-post-preview {
  display: block;
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.community-post-preview p {
  margin: 0;
}

.community-post-full {
  display: none;
}

.community-post.expanded .community-post-preview {
  display: none;
}

.community-post.expanded .community-post-full {
  display: block;
}

.expand-indicator {
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: transform 0.3s;
}

.community-post.expanded .expand-indicator {
  transform: rotate(180deg);
}

.community-post.collapsible .community-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Scripture passage box in expanded view */
.scripture-passage-box {
  padding: 0.75rem;
  background: rgba(232, 181, 98, 0.1);
  border-left: 3px solid var(--ark-gold);
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
}

.scripture-passage-box .scripture-passage-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-700);
  font-style: italic;
  line-height: 1.5;
}

/* ============================================
   DELETE BUTTON
   ============================================ */

.delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.delete-btn:hover {
  background: rgba(95, 12, 11, 0.1);
  color: var(--ark-maroon);
}

.delete-btn.admin-delete {
  color: var(--ark-gold);
}

.delete-btn.admin-delete:hover {
  background: rgba(232, 181, 98, 0.2);
  color: var(--ark-maroon);
}

.delete-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Post delete animation */
.community-post {
  transition: opacity 0.3s, transform 0.3s;
}

/* ============================================
   LEADERBOARD BADGE
   ============================================ */

.leaderboard-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.leaderboard-badge-icon {
  width: 1rem;
  height: 1rem;
}

.author-name {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================
   ACTIONS ROW UPDATE
   ============================================ */

.community-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 0.75rem;
}
