/* 게시판 전용 스타일 */

/* 게시판 컨테이너 */
.board-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* 채널 헤더 */
.channel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--border-radius-xl);
  color: white;
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-md);
}

.channel-info h2 {
  margin: 0 0 var(--spacing-sm) 0;
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

.channel-info p {
  margin: 0;
  opacity: 0.9;
  font-size: var(--font-size-sm);
}

.channel-actions {
  display: flex;
  gap: var(--spacing-md);
}

/* 게시글 컨테이너 */
.posts-container {
  background: var(--color-bg-primary);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-base);
  overflow: hidden;
}

/* 게시글 헤더 */
.posts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: var(--border-width) solid var(--color-gray-200);
  background: var(--color-gray-50);
}

.posts-filters {
  display: flex;
  gap: var(--spacing-md);
}

.posts-filters select {
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--border-width) solid var(--color-gray-300);
  border-radius: var(--border-radius-base);
  background: var(--color-bg-primary);
  font-size: var(--font-size-sm);
}

.posts-search {
  display: flex;
  gap: var(--spacing-sm);
}

.posts-search input {
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--border-width) solid var(--color-gray-300);
  border-radius: var(--border-radius-base);
  width: 200px;
  font-size: var(--font-size-sm);
}

.posts-search button {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-primary);
  color: var(--color-bg-primary);
  border: none;
  border-radius: var(--border-radius-base);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--transition-base);
}

.posts-search button:hover {
  background: var(--color-primary-hover);
}

/* 게시글 목록 */
.posts-list {
  min-height: 400px;
  display: block; /* 초기에는 보임 */
}

.post-item {
  padding: var(--spacing-lg);
  border-bottom: var(--border-width) solid var(--color-gray-200);
  cursor: pointer;
  transition: var(--transition-base);
}

.post-item:hover {
  background: var(--color-gray-50);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.post-item-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.post-category {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: #e0e7ff;
  color: #3730a3;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.post-date {
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}

.post-item-stats {
  display: flex;
  gap: var(--spacing-md);
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}

.post-item-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-900);
  margin-bottom: var(--spacing-sm);
  line-height: var(--line-height-tight);
}

.post-item-preview {
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  margin-bottom: var(--spacing-md);
}

.post-item-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e7eb;
}

.author-name {
  font-size: 0.9rem;
  color: #6b7280;
}

/* 로딩 상태 */
.loading-container {
  display: none; /* 초기에는 숨김 */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #6b7280;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 에러 메시지 스타일 */
.error-message {
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

.error-message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.error-message.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.error-message.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.error-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: #374151;
}

.error-message.error .error-content {
  color: #dc2626;
}

.error-message.info .error-content {
  color: #2563eb;
}

.error-message.success .error-content {
  color: #059669;
}

.error-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.error-close:hover {
  opacity: 1;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 무한스크롤 로딩 인디케이터 */
#load-more-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0.7;
}

#load-more-loading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 무한스크롤 로딩 애니메이션 */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.5rem;
}

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

/* 게시글 상세 페이지 */
.post-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.post-navigation {
  margin-bottom: 24px;
}

.btn-back {
  padding: 8px 16px;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-back:hover {
  background: #4b5563;
}

.post-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin-bottom: 24px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #e5e7eb;
}

.action-btn.active {
  background: #dbeafe;
  color: #1d4ed8;
}

.post-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
  line-height: 1.3;
}

.post-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
}

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

.author-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.post-stats {
  color: #6b7280;
  font-size: 0.85rem;
}

.post-controls {
  display: flex;
  gap: 8px;
}

.post-body {
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 24px;
}

.post-media {
  margin-bottom: 24px;
}

.post-media img,
.post-media video {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-expiry-info {
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 24px;
}

.expiry-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #92400e;
  font-size: 0.9rem;
}

/* 채팅 섹션 */
.chat-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #111827;
}

.chat-stats {
  display: flex;
  gap: 16px;
  color: #6b7280;
  font-size: 0.9rem;
}

.chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: #fafafa;
}

.chat-welcome {
  text-align: center;
  color: #6b7280;
  padding: 40px 20px;
}

.chat-message {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.chat-message.own {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  flex-shrink: 0;
}

.chat-message-content {
  max-width: 70%;
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-message.own .chat-message-content {
  background: #3b82f6;
  color: white;
}

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

.chat-message-author {
  font-weight: 600;
  font-size: 0.85rem;
}

.chat-message-time {
  color: #9ca3af;
  font-size: 0.8rem;
}

.chat-message.own .chat-message-time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-message-text {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* 시스템 메시지 스타일 */
.chat-system-message {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.system-text {
  background: #e9ecef;
  color: #6c757d;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-style: italic;
}

/* 오류 메시지 스타일 */
.chat-error-message {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.error-text {
  background: #f8d7da;
  color: #721c24;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid #f5c6cb;
}

/* 반응 버튼 스타일 */
.post-reactions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.reaction-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  color: #6b7280;
}

.reaction-button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.reaction-button.liked {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.reaction-button.liked i {
  color: #dc2626;
}

.reaction-button.bookmarked {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #d97706;
}

.reaction-button.bookmarked i {
  color: #d97706;
}

.reaction-button i {
  font-size: 0.9rem;
}

.like-count {
  font-weight: 500;
  font-size: 0.75rem;
}

/* 검색 및 필터 스타일 */
.search-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-button {
  padding: 8px 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-button:hover {
  background: #2563eb;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}

.suggestion-item:hover {
  background: #f9fafb;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.quick-filters {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.quick-filter {
  padding: 6px 12px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.quick-filter:hover {
  background: #f3f4f6;
}

.quick-filter.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* 카테고리 필터 스타일 */
#category-nav {
  margin-top: 12px;
}

.category-filter {
  padding: 6px 12px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  margin-right: 8px;
}

.category-filter:hover {
  background: #f3f4f6;
}

.category-filter.active {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

/* 검색창 레이아웃 */
.search-section {
  margin-top: 16px;
  margin-bottom: 0;
}

.search-form {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 400px;
}

.search-form input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-form button {
  padding: 10px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.search-form button:hover {
  background: var(--primary-color-dark);
}

/* 글쓰기 버튼 섹션 */
.write-button-section {
  padding: 16px 0;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.write-button-section #write-post {
  padding: 12px 24px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.write-button-section #write-post:hover {
  background: var(--accent-color-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .search-form {
    max-width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  
  .search-form input[type="text"] {
    min-width: unset;
    width: 100%;
  }
  
  .search-form button {
    width: 100%;
  }
  
  .write-button-section {
    text-align: center;
  }
  
  .write-button-section #write-post {
    width: 100%;
    max-width: 300px;
  }
  
  .filter-row {
    flex-direction: column;
    gap: 12px;
  }

  .filter-group {
    min-width: auto;
  }

  .quick-filters {
    flex-wrap: wrap;
  }

  .search-input-group {
    flex-direction: column;
    gap: 8px;
  }

  .search-button {
    width: 100%;
  }
}

.chat-input-container {
  border-top: 1px solid #e5e7eb;
}

.chat-disabled {
  padding: 20px;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
}

.chat-input {
  padding: 20px;
}

.chat-input-area {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.chat-input-area textarea {
  flex: 1;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-input-area button {
  padding: 12px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.chat-input-area button:hover {
  background: #2563eb;
}

.chat-options {
  display: flex;
  gap: 8px;
}

.chat-options button {
  padding: 6px 12px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.chat-options button:hover {
  background: #e5e7eb;
}

/* 게시글 작성 페이지 */
.post-write-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.post-write-form {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #111827;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.85rem;
}

.media-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.media-upload-area:hover {
  border-color: #3b82f6;
}

.media-upload-area.dragover {
  border-color: #3b82f6;
  background: #f0f8ff;
  transform: scale(1.02);
}

.media-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #6b7280;
}

.upload-icon {
  font-size: 2rem;
}

.media-preview {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.media-preview-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

.media-preview-item img,
.media-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.writing-guide {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
}

.writing-guide h3 {
  margin: 0 0 16px 0;
  color: #111827;
  font-size: 1.1rem;
}

.writing-guide ul {
  margin: 0;
  padding-left: 20px;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.6;
}

.writing-guide li {
  margin-bottom: 8px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .board-container,
  .post-detail-container,
  .post-write-container {
    padding: 16px;
  }

  .channel-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .posts-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .posts-filters {
    justify-content: center;
    flex-wrap: wrap;
  }

  .posts-search {
    justify-content: center;
  }

  .posts-search input {
    width: 100%;
  }

  .post-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .post-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .post-author {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  /* 반응 버튼 모바일 최적화 */
  .post-reactions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .reaction-button {
    min-width: 60px;
    justify-content: center;
  }

  /* 검색 및 필터 모바일 최적화 */
  .search-input-group {
    flex-direction: column;
    gap: 8px;
  }

  .search-button {
    width: 100%;
  }

  .quick-filters {
    justify-content: center;
    flex-wrap: wrap;
  }

  .quick-filter {
    flex: 1;
    min-width: 80px;
  }

  .post-controls {
    justify-content: center;
  }

  .chat-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .chat-message-content {
    max-width: 85%;
  }

  .chat-input-area {
    flex-direction: column;
  }

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

/* 지역 검색 드롭다운 스타일 */
.channel-search-container {
  position: relative;
  width: 100%;
}

.channel-search-container input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.channel-search-container input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.channel-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e1e5e9;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
}

.channel-suggestions.show {
  display: block;
}

.channel-suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  line-height: 1.4;
}

.channel-suggestion-item:hover {
  background-color: #f8f9fa;
}

.no-suggestions {
  padding: 12px 16px;
  color: #666;
  font-style: italic;
  text-align: center;
  font-size: 14px;
}

/* 선택된 지역 표시 스타일 */
.selected-region-display {
  margin-top: 8px;
  padding: 12px 16px;
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-region-label {
  font-weight: 600;
  color: #2e7d32;
  font-size: 14px;
}

.selected-region-name {
  color: #1b5e20;
  font-weight: 500;
  font-size: 14px;
  flex: 1;
}

.clear-region-btn {
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.clear-region-btn:hover {
  background: #388e3c;
}

/* 검증 메시지 스타일 */
.validation-message {
  margin-top: 8px;
  padding: 8px 12px;
  background: #ffebee;
  border: 1px solid #f44336;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-icon {
  font-size: 16px;
}

.validation-text {
  color: #c62828;
  font-size: 14px;
  font-weight: 500;
}

/* 지역 선택되지 않은 상태 스타일 */
.channel-search-container input[type="text"].invalid {
  border-color: #f44336;
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* 제출 버튼 비활성화 스타일 */
.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.channel-suggestion-item:last-child {
  border-bottom: none;
}

.channel-suggestion-item.selected {
  background-color: #e3f2fd;
  color: #1976d2;
}

.channel-name {
  font-weight: 500;
  color: #333;
}

.channel-code {
  font-size: 0.85rem;
  color: #666;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
}

.channel-suggestion-item.selected .channel-name {
  color: #1976d2;
}

.channel-suggestion-item.selected .channel-code {
  background: #bbdefb;
  color: #1976d2;
}

.no-suggestions {
  padding: 16px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* 액션 버튼 스타일 */
.posts-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* 모바일에서 지역 검색 스타일 */
@media (max-width: 768px) {
  .channel-suggestions {
    max-height: 150px;
  }

  .channel-suggestion-item {
    padding: 10px 12px;
  }

  .channel-name {
    font-size: 0.9rem;
  }

  .channel-code {
    font-size: 0.8rem;
  }

  .posts-actions {
    justify-content: center;
    width: 100%;
  }
}

/* ===== 글쓰기 버튼 ===== */
#write-post {
  display: none; /* 기본적으로 숨김, JavaScript에서 로그인 상태에 따라 표시 */
}
