/* assets/css/study.css
 * SV209: 학습 자료실(자격증 자료) 전용 스타일 - study/*.php 에서만 불러온다.
 * 표·다운로드 상자 등 공통 모양은 서식 자료실과 같은 클래스(common.css)를 그대로 쓴다. */

.fw-study { max-width: 980px; }

.fw-study-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: linear-gradient(135deg, #f0fdfa 0%, #eff6ff 100%);
    border: 1px solid var(--fw-teal-light); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px;
}
.fw-study-hero h1 { font-size: 22px; font-weight: 800; color: var(--fw-navy); margin-bottom: 4px; }
.fw-study-hero h1 small { font-size: 13px; font-weight: 600; color: var(--fw-teal-dark); margin-left: 6px; }
.fw-study-hero p { color: var(--fw-text-sub); font-size: 14px; margin: 0; }

/* 자격증 선택 + 검색 */
.fw-study-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.fw-study-cert-select { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--fw-text); }
.fw-study-cert-select select {
    padding: 8px 10px; border: 1px solid var(--fw-border-light); border-radius: 8px; font-size: 14px; background: #fff; max-width: 260px;
}
.fw-study-filter input[type="text"] {
    flex: 1; min-width: 160px; padding: 8px 12px; border: 1px solid var(--fw-border-light); border-radius: 8px; font-size: 14px;
}
.fw-study-reset { font-size: 13px; color: var(--fw-text-sub); text-decoration: underline; }

/* 자료 종류 칩(둥근 버튼) - 좁은 화면에서는 줄바꿈 */
.fw-study-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fw-study-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 999px; border: 1px solid var(--fw-border-light);
    background: #fff; color: var(--fw-text); font-size: 13.5px; font-weight: 600;
}
.fw-study-chip span { font-size: 12px; color: var(--fw-text-sub); font-weight: 700; }
.fw-study-chip:hover { border-color: var(--fw-teal); color: var(--fw-teal-dark); }
.fw-study-chip.active { background: var(--fw-teal); border-color: var(--fw-teal); color: #fff; }
.fw-study-chip.active span { color: #ccfbf1; }

.fw-study-exam-link {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 10px 14px; margin: 0 0 14px;
    font-size: 13.5px; color: var(--fw-text);
}
.fw-study-exam-link a { color: var(--fw-blue); font-weight: 700; }

/* 자격증·종류 배지 */
.fw-study-cert-badge, .fw-study-type-badge {
    display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.fw-study-cert-badge { background: #e0e7ff; color: #3730a3; }
.fw-study-type-badge { background: #f1f5f9; color: #475569; }
.fw-study-type-summary { background: #dcfce7; color: #166534; }
.fw-study-type-past    { background: #fee2e2; color: #991b1b; }
.fw-study-type-formula { background: #fef3c7; color: #92400e; }
.fw-study-type-lecture { background: #dbeafe; color: #1e40af; }
.fw-study-type-tip     { background: #fce7f3; color: #9d174d; }
.fw-study-badges { display: flex; flex-wrap: wrap; gap: 4px; min-width: 110px; }
.fw-ext-badge.fw-ext-jpg, .fw-ext-badge.fw-ext-jpeg, .fw-ext-badge.fw-ext-png { background: #ede9fe; color: #5b21b6; }
.fw-study-table td, .fw-study-table th { vertical-align: middle; }
.fw-study-table .fw-col-title a { font-weight: 600; }
.fw-view-header .fw-study-cert-badge, .fw-view-header .fw-study-type-badge { font-size: 12.5px; padding: 3px 10px; }

/* 올리기 화면 */
.fw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fw-study-agree { margin: 4px 0 14px; font-size: 13.5px; }
.fw-study-notice {
    background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 10px;
    padding: 10px 14px; font-size: 13px; line-height: 1.6; margin: 16px 0;
}
.fw-study-notice a { color: var(--fw-blue); text-decoration: underline; }

/* 상세 화면 */
.fw-study-breadcrumb { font-size: 13px; color: var(--fw-text-sub); margin-bottom: 8px; }
.fw-study-breadcrumb a { color: var(--fw-text-sub); }
.fw-study-breadcrumb a:hover { color: var(--fw-blue); }
.fw-view-actions .fw-study-report { margin-left: auto; color: var(--fw-text-sub); font-size: 13px; }
.fw-study-related { max-width: 900px; margin: 22px auto 0; background: #fff; border: 1px solid var(--fw-border-light); border-radius: 12px; padding: 14px 18px; }
.fw-study-related h3 { font-size: 15px; margin-bottom: 8px; }
.fw-study-related li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--fw-border-light); font-size: 14px; }
.fw-study-related li:last-child { border-bottom: none; }
.fw-study-related li a { flex: 1; min-width: 0; color: var(--fw-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
    .fw-study-hero { padding: 16px; }
    .fw-study-hero h1 { font-size: 19px; }
    .fw-field-row { grid-template-columns: 1fr; gap: 0; }
    .fw-study-table .fw-col-file, .fw-study-table .fw-col-date { display: none; }
    .fw-study-cert-select { width: 100%; }
    .fw-study-cert-select select { flex: 1; max-width: none; }
}
.fw-study .fw-form-box { max-width: 680px; }
