/* custom-maker_post/custom-maker_post.css */

.board-subtitle {
  margin: 8px 0 0;
  color: #8faadc;
  font-size: 1rem;
  font-weight: 600;
}

.board-controls #view-all-board-btn {
  background: #444;
  color: #fff;
}

.board-controls #view-all-board-btn:hover {
  background: #555;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.post-card-wrapper {
  position: relative;
}

.post-card-wrapper .post-card-report-btn,
.post-card-wrapper .post-card-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
}

.post-card-wrapper .post-card-report-btn {
  border: 1px solid #6b4e16;
  background: rgba(42, 34, 16, 0.92);
  color: #ffd76a;
}

.post-card-wrapper .post-card-edit-btn {
  border: 1px solid #2563eb;
  background: rgba(23, 37, 84, 0.92);
  color: #93c5fd;
}

.post-card-wrapper .post-card-edit-btn:hover {
  background: #1e3a8a;
  color: #fff;
}

.post-card-wrapper .post-card-report-btn:hover:not(:disabled) {
  background: #3d3115;
  color: #fff;
}

.post-card-wrapper .post-card-report-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.post-card {
  display: block;
  background-color: #1f1f1f;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.post-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #111;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-info {
  padding: 14px 16px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

/* ====================== 모바일 게시판 ====================== */
@media (max-width: 768px) {
  .board-container {
    max-width: 100% !important;
    margin: 16px auto !important;
    padding: 0 12px !important;
  }

  .board-header h1 {
    font-size: 1.35rem !important;
    line-height: 1.3;
  }

  .board-controls {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .board-controls input {
    width: 100%;
    font-size: 16px;
    min-height: 44px;
    box-sizing: border-box;
  }

  .board-controls button {
    width: 100%;
    min-height: 44px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px 0;
  }

  .board-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .board-table th,
  .board-table td {
    padding: 12px 10px;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

/* 제목 스타일 (번호 대신 제목을 메인으로) */
.post-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;      /* 제목 2줄까지만 표시 */
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-author {
  color: #aaa;
}

.post-date {
  color: #888;
  font-size: 0.8rem;
}

.post-stats {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: #aaa;
}

.empty-message {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  padding: 60px 20px;
  color: #888;
  line-height: 1.6;
}

.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.report-modal-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.report-modal-card h3 {
  margin: 0 0 18px;
  font-size: 1.1rem;
  color: #111;
}

.report-modal-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-reason-btn,
.report-modal-cancel {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

.report-reason-btn {
  border: 2px solid #111;
  background: #fff;
  color: #111;
}

.report-reason-btn:hover {
  background: #f5f5f5;
}

.report-modal-cancel {
  margin-top: 16px;
  border: none;
  background: #dc3545;
  color: #fff;
}