/* ===== 违纪案例栏目样式 ===== */

.case-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.case-search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}
.case-search-box button {
    padding: 10px 20px;
    background: #2c5282;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.case-search-box button:hover { background: #2a4365; }

.case-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}
.case-filters select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}
.case-count {
    font-size: 13px;
    color: #666;
    margin-left: auto;
}

.case-list { display: flex; flex-direction: column; gap: 16px; }

.case-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.1s;
    border-left: 4px solid #2c5282;
}
.case-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}
.case-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}
.case-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}
.case-card-id {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}
.case-card-summary {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.case-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.case-tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #edf2f7;
    color: #4a5568;
}
.case-tag.tag-discipline { background: #e6f4ea; color: #1e7e34; }
.case-tag.tag-regulation { background: #e8f0fe; color: #1967d2; }
.case-tag.tag-violation { background: #fff3e0; color: #e65100; }

.case-detail-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 30px 20px;
}
.case-detail-overlay.show { display: block; }
.case-detail-box {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    position: relative;
}
.case-detail-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
}
.case-detail-close:hover { color: #333; }
.case-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-right: 40px;
}
.case-detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.case-detail-section {
    margin-bottom: 20px;
}
.case-detail-section h3 {
    font-size: 15px;
    color: #2c5282;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8ecf0;
}
.case-detail-section p,
.case-detail-section pre {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}
.case-detail-section pre {
    background: #f7f9fb;
    padding: 12px;
    border-radius: 6px;
    font-family: inherit;
}
.case-no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}
.case-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .case-detail-box { padding: 20px; }
    .case-detail-title { font-size: 18px; }
}

/* 案例卡片展开全文 */
.case-card-full {
  margin-top: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #2c5282;
}
.case-card-section {
  margin-bottom: 12px;
}
.case-card-section:last-child {
  margin-bottom: 0;
}
.case-section-label {
  font-size: 13px;
  font-weight: 600;
  color: #2c5282;
  display: block;
  margin-bottom: 4px;
}
.case-card-section p {
  font-size: 14px;
  color: #333;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.case-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.expand-btn, .detail-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.expand-btn {
  background: #edf2f7;
  color: #2d3748;
}
.expand-btn:hover {
  background: #e2e8f0;
}
.detail-btn {
  background: #2c5282;
  color: #fff;
}
.detail-btn:hover {
  background: #1a365d;
}

/* 案例页头部 */
.cases-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cases-page-header h2 {
  margin: 0;
  font-size: 22px;
  color: #1a1a2e;
}
.create-case-btn {
  padding: 8px 18px;
  background: #2c5282;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.create-case-btn:hover {
  background: #1a365d;
}

/* 新建案例表单 */
.create-modal {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}
.create-modal-title {
  font-size: 18px;
  color: #1a1a2e;
  margin: 0 0 20px 0;
  padding-right: 30px;
}
.create-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin: 14px 0 5px 0;
}
.create-form input,
.create-form select,
.create-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}
.create-form input:focus,
.create-form select:focus,
.create-form textarea:focus {
  border-color: #2c5282;
}
.create-form textarea {
  resize: vertical;
  min-height: 60px;
}
.required {
  color: #e53e3e;
  margin-left: 2px;
}
.create-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e8ecf0;
}
.cancel-btn, .submit-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.cancel-btn {
  background: #edf2f7;
  color: #4a5568;
}
.cancel-btn:hover:not(:disabled) {
  background: #e2e8f0;
}
.submit-btn {
  background: #2c5282;
  color: #fff;
}
.submit-btn:hover:not(:disabled) {
  background: #1a365d;
}
.cancel-btn:disabled, .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 原文区块 */
.original-text-body {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.9;
  color: #444;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  font-family: inherit;
}
.original-source {
  font-size: 12px;
  color: #999;
  font-weight: normal;
}

/* 原文文本块（替换旧 pre 样式） */
.original-text-body {
  background: #f5f5f5;
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 2;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 500px;
  overflow-y: auto;
  font-family: inherit;
  text-align: justify;
}
