/* QA Board Styles - Soft Rounded Aesthetic */
.portal-board-list { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

.board-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 20px; border-bottom: none; padding-bottom: 0; }
.board-title { font-size: 24px; font-weight: 800; color: var(--primary); margin: 0; letter-spacing: -0.02em; }
.board-actions { display: flex; align-items: center; gap: 12px; }

.board-search { display: flex; gap: 8px; }
.board-search select, .board-search input {
  min-height: 44px; padding: 10px 14px; border: 1px solid rgba(229,232,237,0.8);
  border-radius: 12px; font-size: 14px; background: #fff; outline: none; font-weight: 500;
  transition: all 0.2s ease; box-shadow: inset 0 2px 4px rgba(20,43,82,0.02);
}
.board-search input:focus, .board-search select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,43,82,0.1), inset 0 2px 4px rgba(20,43,82,0.02);
}

.ev-qa-list {
  background: #fff; border: 1px solid rgba(229,232,237,0.8); border-radius: 16px;
  overflow: hidden; box-shadow: 0 6px 20px rgba(20,43,82,0.06), 0 2px 5px rgba(20,43,82,0.04);
}
.ev-qa-list table { width: 100%; border-collapse: collapse; text-align: left; }
.ev-qa-list th {
  border-bottom: 1px solid rgba(229,232,237,0.8); padding: 16px 20px;
  background: #f8f9fb; font-size: 14px; color: var(--primary); font-weight: 700;
}
.ev-qa-list td {
  border-bottom: 1px solid rgba(229,232,237,0.6); padding: 16px 20px;
  font-size: 14px; color: var(--ink); transition: background 0.2s ease;
}
.ev-qa-list tr:last-child td { border-bottom: none; }
.ev-qa-list tr:hover td { background: #fcfcfd; }

.ev-qa-list .col-num { width: 60px; text-align: center; color: var(--muted); font-family: var(--font-mono); }
.ev-qa-list .col-status { width: 90px; text-align: center; }
.ev-qa-list .col-author { width: 120px; font-weight: 500; }
.ev-qa-list .col-date { width: 90px; text-align: center; color: var(--muted); font-family: var(--font-mono); }
.ev-qa-list .col-hit { width: 70px; text-align: center; color: var(--muted); font-family: var(--font-mono); }
.ev-qa-list .col-title a { font-weight: 600; font-size: 15px; color: var(--primary); transition: color 0.2s ease; }
.ev-qa-list .col-title a:hover { color: var(--danger); text-decoration: none; }
.ev-qa-list .cmt-cnt { color: var(--danger); font-weight: 700; margin-left: 6px; font-size: 13px; }
.ev-qa-list .mobile-meta { display: none; }

/* Q&A status colors */
.badge-status {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 24px; padding: 4px 9px; border: 1px solid transparent;
  border-radius: 999px; font-size: 11px; line-height: 1; font-weight: 800; white-space: nowrap;
}
.badge-status.waiting {
  color: #9a4b00; background: #fff5df; border-color: #f4c77a;
}
.badge-status.answered,
.badge-status.published {
  color: #0b6b43; background: #e9f8f0; border-color: #9dd9bb;
}
.badge-status.followup {
  color: #1558a6; background: #edf5ff; border-color: #a9cbf2;
}
.badge-status.closed {
  color: #596579; background: #f1f3f6; border-color: #cfd5de;
}
.badge-status.verified {
  color: #ffffff; background: #12805c; border-color: #12805c;
}

/* View Screen */
#bo_v {
  background: #fff; border: 1px solid rgba(229,232,237,0.8); border-radius: 16px;
  margin-bottom: 32px; overflow: hidden; box-shadow: 0 6px 20px rgba(20,43,82,0.06), 0 2px 5px rgba(20,43,82,0.04);
}
.bo_v_hd { padding: 32px 32px 24px; border-bottom: 1px solid rgba(229,232,237,0.8); }
#bo_v_title { font-size: 24px; font-weight: 800; color: var(--primary); margin: 0 0 16px; line-height: 1.4; letter-spacing: -0.02em; }
.bo_v_cate {
  display: inline-block; padding: 6px 12px; background: rgba(20,43,82,0.05); color: var(--primary);
  font-size: 13px; border-radius: 8px; font-weight: 700; margin-bottom: 16px; border: 1px solid rgba(20,43,82,0.1);
}
.bo_v_info { display: flex; gap: 16px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.bo_v_info strong { color: var(--ink); font-weight: 700; }

.bo_v_con { padding: 32px; font-size: 15px; line-height: 1.7; color: var(--ink); min-height: 200px; word-break: break-word; }

.bo_v_btn { padding: 20px 32px; border-top: 1px solid rgba(229,232,237,0.8); display: flex; justify-content: space-between; align-items: center; background: #f8f9fb; flex-wrap: wrap; gap: 12px; }

/* Widgets in View */
.ev-widget {
  background: #fff; border: 1px solid rgba(229,232,237,0.8); border-radius: 16px;
  margin-top: 32px; overflow: hidden; box-shadow: 0 6px 20px rgba(20,43,82,0.06), 0 2px 5px rgba(20,43,82,0.04);
}
.ev-widget .widget-head { padding: 20px; border-bottom: 1px solid rgba(229,232,237,0.8); display: flex; justify-content: space-between; align-items: center; background: #f8f9fb; }
.ev-widget .widget-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.qa-info-grid { margin-bottom: 0; gap: 24px; }
.qa-widget-body { padding: 24px; }
.qa-topic-chips { padding: 0; margin: 0 0 18px; align-items: center; }
.qa-topic-chips:last-child { margin-bottom: 0; }
.qa-topic-chips .chip {
  min-height: 36px; padding: 7px 13px; justify-content: center;
  color: var(--primary); font-weight: 700; line-height: 1.25;
}

/* Accepted */
.accepted-answer { background: #f0fdf4; border: 1px solid rgba(21,128,61,0.2); border-radius: 12px; padding: 24px; box-shadow: inset 0 2px 4px rgba(21,128,61,0.02); }
.accepted-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.accepted-head strong { color: #15803d; font-size: 16px; font-weight: 800; }
.accepted-head .meta { color: #166534; font-size: 14px; font-weight: 600; }
.accepted-body { font-size: 15px; color: var(--ink); line-height: 1.6; }
.bo-v-signature { margin: 0 32px 24px; padding-top: 20px; border-top: 1px dashed rgba(229,232,237,0.8); color: var(--muted); font-size: 14px; }

.related-question-widget { margin-top: 32px; }
.related-question-list { padding: 0 20px; }
.related-question-list li { border-top: 1px dashed rgba(229,232,237,0.8); }
.related-question-list li:first-child { border-top: none; }
.related-question-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-size: 14px; }
.related-question-list a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; transition: color 0.2s ease; }
.related-question-list a:hover span { color: var(--danger); text-decoration: none; }
.related-question-list time { color: var(--muted); font-size: 12px; font-family: var(--font-mono); }

/* Comments */
#bo_vc {
  background: #fff; border: 1px solid rgba(229,232,237,0.8); border-radius: 16px;
  margin-top: 32px; overflow: hidden; box-shadow: 0 6px 20px rgba(20,43,82,0.06), 0 2px 5px rgba(20,43,82,0.04);
}
.ev-comments { padding: 0; margin: 0; }
.ev-comments li { padding: 24px 32px; border-bottom: 1px solid rgba(229,232,237,0.8); }
.ev-comments li:last-child { border-bottom: none; }
.c-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.c-name { font-weight: 800; color: var(--primary); font-size: 15px; }
.c-date { font-size: 13px; color: var(--muted); }
.c-content { font-size: 15px; line-height: 1.6; color: var(--ink); margin-bottom: 16px; }
.c-foot { display: flex; gap: 16px; font-size: 13px; font-weight: 700; }
.c-foot a { color: var(--muted); transition: color 0.2s ease; }
.c-foot a:hover { color: var(--primary); }

.ev-comment-write { background: #f8f9fb; padding: 24px 32px; border-top: 1px solid rgba(229,232,237,0.8); }
.c-textarea textarea {
  width: 100%; min-height: 100px; resize: vertical; border: 1px solid rgba(229,232,237,0.8);
  padding: 16px; border-radius: 12px; font-size: 14px; outline: none; background: #fff;
  transition: all 0.2s ease; box-shadow: inset 0 2px 4px rgba(20,43,82,0.02);
}
.c-textarea textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,43,82,0.1), inset 0 2px 4px rgba(20,43,82,0.02); }

/* Depths */
.c-depth-1 { padding-left: 56px; position: relative; }
.c-depth-2 { padding-left: 80px; position: relative; }
.c-depth-3 { padding-left: 104px; position: relative; }
[class*="c-depth-"]::before { content: ""; position: absolute; left: 32px; top: 32px; width: 12px; height: 12px; border-left: 2px solid rgba(229,232,237,0.8); border-bottom: 2px solid rgba(229,232,237,0.8); border-bottom-left-radius: 6px; }
.c-depth-2::before { left: 56px; }
.c-depth-3::before { left: 80px; }

@media (max-width: 768px) {
  .portal-board-list { padding: 16px; }
  .ev-qa-list thead { display: none; }
  .ev-qa-list tr { display: flex; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid rgba(229,232,237,0.8); }
  .ev-qa-list td { border: none; padding: 0; }
  .ev-qa-list .col-num, .ev-qa-list .col-author, .ev-qa-list .col-date, .ev-qa-list .col-hit { display: none; }
  .ev-qa-list .col-status { width: auto; margin-right: 12px; margin-top: 2px; }
  .ev-qa-list .col-title { flex: 1; min-width: 0; }
  .ev-qa-list .col-title a { display: block; font-size: 15px; margin-bottom: 6px; white-space: normal; line-height: 1.4; }
  .ev-qa-list .mobile-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
  }
  .ev-qa-list .mobile-meta span {
    min-width: 0;
    white-space: nowrap;
  }
  .ev-qa-list .mobile-meta span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .board-header { flex-direction: column; align-items: stretch; margin-bottom: 16px; padding-bottom: 0; }
  .board-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }
  .board-search { min-width: 0; gap: 6px; }
  .board-search select { width: 108px; flex: 0 0 108px; padding-right: 8px; }
  .board-search input { width: 100%; min-width: 0; }
  .board-search button {
    flex: 0 0 58px;
    min-width: 58px;
    padding: 0 10px;
    white-space: nowrap;
    word-break: keep-all;
  }
  .board-actions > .btn-primary {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    white-space: nowrap;
    min-height: 44px;
  }

  .qa-info-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .qa-info-grid .ev-widget { width: 100%; }
  .qa-info-grid .widget-head { padding: 16px 18px; }
  .qa-widget-body { padding: 18px; }
  .qa-topic-chips { gap: 8px; margin-bottom: 14px; }
  .qa-topic-chips .chip {
    flex: 0 1 auto; min-height: 34px; padding: 7px 12px;
    font-size: 12px; box-shadow: none;
  }
  .ev-qa-list .badge-status { min-height: 25px; padding: 5px 9px; }

  .bo_v_hd { padding: 24px 20px; }
  .bo_v_con { padding: 24px 20px; }
  .bo_v_btn { padding: 20px; }
  .bo-v-signature { margin: 0 20px 24px; }
  .related-question-list { padding: 0 20px; }

  .ev-comments li { padding: 20px; }
  .ev-comment-write { padding: 20px; }
  [class*="c-depth-"] { padding-left: 20px; }
  [class*="c-depth-"]::before { display: none; }
}

/* ====== Responsive Improvements for ev_qa Write ====== */
@media (max-width: 768px) {
  .portal-board-write {
    width: 100%;
    margin: 0 auto;
    padding: 16px;
  }
  .portal-board-write .board-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
  }
  .portal-board-write .board-title { font-size: 23px; }
  .portal-board-write .ev-widget { margin-top: 0; border-radius: 16px; }
  .portal-board-write .widget-head { padding: 16px 18px; }
  .portal-board-write .widget-body { padding: 16px !important; }
  .portal-board-write .ev-fields { display: flex; flex-direction: column; gap: 16px; }
  .portal-board-write .field-group { width: 100%; min-width: 0 !important; }
  .portal-board-write .write-row { flex-direction: column; gap: 16px !important; }
  .portal-board-write .ev-input, .portal-board-write .ev-select, .portal-board-write .ev-select-multi { width: 100%; box-sizing: border-box; }
}
