/* ================================
   Suggest Board 공통 컨테이너
================================ */
.suggest-container,
.suggest-detail,
.suggest-write {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: #fbfaff; /* 퍼플 톤 배경 */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ================================
   Suggest List 전용
================================ */
.suggest-container h2 {
    font-size: 24px;
    color: #4c1d95; /* 진한 퍼플 */
    margin-bottom: 18px;
    border-bottom: 2px solid #ede9fe;
    padding-bottom: 6px;
}

.suggest-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.suggest-table th {
    background: #ede9fe; /* 연한 퍼플 */
    color: #5b21b6;      /* 진한 퍼플 */
    text-align: center;
    padding: 12px;
    font-weight: bold;
    font-size: 14px;
}

.suggest-table tr {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.suggest-table tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.suggest-table td {
    padding: 14px 12px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #f3e8ff;
    border-bottom: 1px solid #f3e8ff;
}

.suggest-table td:first-child,
.suggest-table th:first-child {
    border-radius: 10px 0 0 10px;
    border-left: 1px solid #f3e8ff;
}
.suggest-table td:last-child,
.suggest-table th:last-child {
    border-radius: 0 10px 10px 0;
    border-right: 1px solid #f3e8ff;
}

/* Status */
.answered {
    color: #16a34a; /* 초록 */
    font-weight: bold;
}
.pending {
    color: #dc2626; /* 빨강 */
    font-weight: bold;
}

/* Write Button */
.write-btn {
    margin-top: 20px;
    text-align: right;
}
.write-btn a {
    background: #7c3aed;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease-in-out;
}
.write-btn a:hover {
    background: #5b21b6;
}

/* Title Cell (Restricted 포함) */
.title-cell {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}
.title-cell a {
    display: inline-block;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}
.title-cell a:hover {
    color: #5b21b6;
    text-decoration: underline;
}
.title-cell .restricted-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #374151; /* 진한 회색 */
    font-size: 14px;
}
.title-cell a[onclick] {
    color: #374151;
    font-weight: bold;
}

/* ================================
   Suggest Detail 전용
================================ */
.suggest-detail-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}
.suggest-detail-header h2 {
    font-size: 24px;
    font-weight: bold;
    color: #4c1d95;
    margin-bottom: 10px;
}

.suggest-meta {
    font-size: 14px;
    color: #4a5568;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    line-height: 1.6;
}
.suggest-meta b {
    color: #2d3748;
    margin-right: 6px;
}

.suggest-content {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    background: white;
    font-size: 15px;
    line-height: 1.7;
    color: #2d3748;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.suggest-actions {
    margin-bottom: 25px;
    text-align: right;
}

/* Comments */
.suggest-comments {
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.suggest-comments h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #4c1d95;
}
.comment-form textarea {
    width: 100%;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
    font-size: 14px;
    margin-bottom: 10px;
}
.comment-form button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background-color: #7c3aed;
    color: white;
    font-size: 14px;
    cursor: pointer;
}
.comment-form button:hover {
    background-color: #5b21b6;
}

/* Comment List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}
.comment-main {
    flex: 1;
    color: #2d3748;
}
.comment-writer {
    font-weight: bold;
    margin-right: 5px;
    color: #2d3748;
}
.comment-date {
    font-size: 12px;
    color: #718096;
    margin-right: 5px;
}
.comment-content {
    margin-left: 3px;
}
.comment-actions {
    white-space: nowrap;
}
.comment-edit {
    margin-right: 10px;
    color: #2563eb;
    text-decoration: none;
    font-weight: bold;
}
.comment-edit:hover {
    text-decoration: underline;
}
.comment-delete {
    color: #e53e3e;
    text-decoration: none;
    font-weight: bold;
}
.comment-delete:hover {
    text-decoration: underline;
}

.suggest-btn {
    font-weight: bold;
    transition: background 0.2s;
    text-decoration: none;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.page-btn {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #fff;
    color: #7c3aed; /* suggest는 퍼플 톤 */
    text-decoration: none;
    transition: background 0.2s ease;
}

.page-btn:hover {
    background: #ede9fe;
}

.page-btn.active {
    background: #7c3aed;
    color: #fff;
    font-weight: bold;
}

.suggest-actions {
    margin-bottom: 25px;
    text-align: right;
}

.suggest-btn {
    display: inline-block;
    padding: 8px 14px;
    margin: 5px 3px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    text-decoration: none;
    color: white;
    font-weight: bold;
}

/* Primary (Edit) */
.suggest-btn-primary {
    background-color: #7c3aed; /* 퍼플 */
}
.suggest-btn-primary:hover {
    background-color: #5b21b6;
}

/* Danger (Delete) */
.suggest-btn-danger {
    background-color: #e53e3e;
}
.suggest-btn-danger:hover {
    background-color: #c53030;
}

/* Secondary (Back to List) */
.suggest-btn-secondary {
    background-color: #718096;
}
.suggest-btn-secondary:hover {
    background-color: #4a5568;
}

/* ================================
   Suggest Write 전용
================================ */
.suggest-write h2 {
    font-size: 22px;
    color: #4c1d95;
    margin-bottom: 20px;
    font-weight: bold;
    border-bottom: 2px solid #ede9fe;
    padding-bottom: 6px;
}

.suggest-write form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 14px;
}

.suggest-write label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #4c1d95;
}

.suggest-write input[type="text"],
.suggest-write textarea {
    width: 100%;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    background: #fff;
    margin-bottom: 15px;
    transition: border 0.2s, box-shadow 0.2s;
}

.suggest-write input[type="text"]:focus,
.suggest-write textarea:focus {
    border-color: #7c3aed;
    outline: none;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.2);
}

.suggest-write textarea {
    resize: vertical;
    min-height: 150px;
}

/* Checkbox */
.suggest-write label input[type="checkbox"] {
    margin-right: 6px;
    vertical-align: middle;
}

/* Form Actions */
.form-actions {
    margin-top: 15px;
    text-align: right;
}

.form-actions button {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-left: 8px;
    transition: background 0.2s ease-in-out;
}

/* Submit 버튼 */
.btn-submit {
    background: #7c3aed;
    color: #fff;
}
.btn-submit:hover {
    background: #5b21b6;
}

/* Cancel 버튼 */
.btn-cancel {
    background: #e2e8f0;
    color: #1a202c;
}
.btn-cancel:hover {
    background: #cbd5e0;
}

/* ================================
   Mobile Responsive (<=600px)
================================ */
@media (max-width: 600px) {
  /* 공통 컨테이너 */
  .suggest-container,
  .suggest-detail,
  .suggest-write {
    margin: 15px 10px;
    padding: 15px;
    font-size: 14px;
  }

  .suggest-container h2,
  .suggest-detail-header h2,
  .suggest-write h2 {
    font-size: 20px;
  }

  /* 리스트: 테이블 → 카드형 */
  .suggest-table,
  .suggest-table thead,
  .suggest-table tbody,
  .suggest-table th,
  .suggest-table td,
  .suggest-table tr {
    display: block;
    width: 100%;
  }

  .suggest-table thead {
    display: none; /* 헤더 숨김 */
  }

  .suggest-table tr {
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 10px;
  }

  .suggest-table td {
    text-align: left;
    border: none;
    padding: 8px 6px;
    font-size: 13px;
  }

  .suggest-table td:before {
    content: attr(data-label);
    font-weight: bold;
    color: #5b21b6;
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
  }

  /* 제목 셀 강조 */
  .title-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
  }
  .title-cell .restricted-icon {
    position: static;
    margin-right: 6px;
    transform: none;
  }
  .title-cell a {
    font-size: 14px;
  }

  /* Detail / Write 페이지 */
  .suggest-meta {
    font-size: 13px;
    padding: 10px;
  }
  .suggest-content {
    font-size: 14px;
    padding: 15px;
  }
  .suggest-write form {
    padding: 15px;
  }
  .suggest-write label {
    font-size: 14px;
  }
  .suggest-write input[type="text"],
  .suggest-write textarea {
    font-size: 14px;
    padding: 8px;
  }

  /* 체크박스 세로 배치 */
  .suggest-write label input[type="checkbox"] {
    display: inline-block;
    margin-top: 6px;
  }

  /* 액션 버튼 영역: 가로 정렬 */
  .suggest-actions,
  .form-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
    text-align: center;
  }
  .suggest-btn,
  .form-actions button {
    flex: 1;
    margin: 0;
    font-size: 14px;
    text-align: center;
  }

  /* 댓글 */
  .suggest-comments {
    padding: 12px;
  }
  .comment-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .comment-actions {
    margin-top: 4px;
  }

  /* 페이지네이션 */
  .page-btn {
    padding: 6px 8px;
    font-size: 13px;
  }

  .suggest-table td:first-child,
  .suggest-table th:first-child {
    display: none;
  }
}
