/**
 * 평생교육 시스템 통합 스타일시트
 * 파일명: /theme/lecture/css/lecture.css
 * 포함: 강좌 목록, 강좌 상세, 나의 수강내역, 모달 등
 */

/* ===== 공통 레이아웃 ===== */
.lecture-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
}

.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 16px;
}

/* ===== 브레드크럼 ===== */
.breadcrumb {
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #1e3a5f;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 5px;
    color: #999;
}

/* ===== 버튼 공통 ===== */
.btn {
    display: inline-block;
    padding: 0 16px;
    height: 35px;
    line-height: 35px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-primary {
    background: #1e3a5f;
    color: white;
}

.btn-primary:hover {
    background: #0f2a44;
}

.btn-secondary {
    background: white;
    border-color: #ced4da;
    color: #495057;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== 비회원 섹션 ===== */
.nonmember-section {
    background: #f0f7ff;
    border: 1px solid #d0e2f2;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nonmember-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0;
}

.nonmember-section .btn-nonmember {
    background: #1e3a5f;
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    display: inline-block;
}

.nonmember-section .btn-nonmember:hover {
    background: #0f2a44;
}

/* ===== 검색/필터 영역 ===== */
.lecture-search {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.search-row label {
    font-weight: 500;
    color: #495057;
    min-width: 70px;
    font-size: 14px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex: 1;
}

/* select 박스 스타일 */
.filter-select {
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: white;
    min-width: 140px;
    max-width: 200px;
    font-size: 14px;
    height: 40px;
    line-height: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 30px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.filter-select option {
    padding: 8px 12px;
    font-size: 14px;
    line-height: normal;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    background: white;
    color: #333;
}

.filter-select.search-input {
    min-width: 250px;
    max-width: 300px;
    flex: 2;
    padding: 0 12px;
    line-height: 40px;
    background-image: none;
    padding-right: 12px;
}

.filter-select:disabled {
    background: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

.filter-select:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

.search-btn {
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    border: none;
    background: #1e3a5f;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    background: #0f2a44;
}

/* ===== 정렬 영역 ===== */
.sort-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.sort-label {
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    font-size: 14px;
}

.sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sort-btn {
    padding: 6px 15px;
    border: 1px solid #ced4da;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    height: 36px;
    line-height: 22px;
}

.sort-btn.active {
    background: #1e3a5f;
    color: white;
    border-color: #1e3a5f;
}

/* ===== 요일 버튼 ===== */
.day-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-left: auto;
}

.day-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ced4da;
    background: white;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 38px;
    text-align: center;
    padding: 0;
}

.day-btn.active {
    background: #1e3a5f;
    color: white;
    border-color: #1e3a5f;
}

/* ===== 강좌 목록 테이블 ===== */
.lecture-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    table-layout: fixed;
}

.lecture-table th {
    background: #f8f9fa;
    padding: 15px 8px;
    font-weight: 600;
    color: #495057;
    border-top: 2px solid #1e3a5f;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
    font-size: 14px;
}

.lecture-table td {
    padding: 20px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    word-break: break-word;
}

.lecture-table tr:hover {
    background: #f8f9fa;
}

/* 컬럼 너비 */
.lecture-table th:nth-child(1) { width: 32%; }
.lecture-table th:nth-child(2) { width: 15%; }
.lecture-table th:nth-child(3) { width: 22%; }
.lecture-table th:nth-child(4) { width: 18%; }
.lecture-table th:nth-child(5) { width: 13%; }

/* 강좌명 셀 */
.course-title-cell {
    padding-left: 15px !important;
}

.course-category {
    font-size: 12px;
    color: #1e3a5f;
    font-weight: 500;
    margin-bottom: 5px;
}

.course-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}

.course-target {
    font-size: 12px;
    color: #666;
}

/* 접수인원 셀 */
.enrollment-cell {
    text-align: center;
}

.enrollment-main {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 16px;
    margin-bottom: 5px;
}

.enrollment-current {
    color: #dc3545;
    font-weight: 600;
}

.enrollment-capacity {
    color: #666;
}

.waiting-count {
    font-size: 12px;
    color: #28a745;
    font-weight: 500;
    margin-top: 3px;
}

/* 강좌기간 셀 */
.period-cell {
    text-align: center;
}

.period-date {
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 13px;
}

.period-day {
    color: #666;
    font-size: 12px;
    margin-bottom: 3px;
}

.period-time {
    color: #666;
    font-size: 12px;
}

/* 접수기간 셀 */
.apply-period-cell {
    text-align: center;
}

.apply-start {
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 3px;
}

.apply-tilde {
    color: #999;
    font-size: 12px;
    margin: 2px 0;
}

.apply-end {
    font-weight: 500;
    font-size: 13px;
    margin-top: 3px;
}

/* 접수상태 셀 */
.status-cell {
    text-align: center;
}

.lecture-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 13px;
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}

/* 🟢 강조: 접수중 (활력을 주는 녹색 + 약간의 그림자) */
.lecture-btn-applying {
    background: #28a745;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* 🟠 강조: 추가모집 (눈에 띄는 주황색 계열로 긴급함 부여) */
.lecture-btn-additional {
    background: #fd7e14;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(253, 126, 20, 0.3);
}

/* 🟡 일반: 대기접수, 진행중, 예정 (기존 컬러 유지) */
.lecture-btn-waiting {
    background: #ffc107;
    color: #333;
}

.lecture-btn-ongoing {
    background: #007bff;
    color: white;
}

.lecture-btn-pending {
    background: #6c757d;
    color: white;
}

/* ⚪ 비강조: 마감, 폐강, 종료 (배경과 글자색 모두 무채색으로 톤다운) */
.lecture-btn-closed,
.lecture-btn-canceled,
.lecture-btn-completed {
    background: #f8f9fa; /* 아주 밝은 회색 */
    color: #adb5bd;      /* 흐린 텍스트 */
    border: 1px solid #e9ecef;
    cursor: default;     /* 클릭 안 되는 느낌 부여 */
}

/* ✨ 호버(마우스 오버) 효과: 비강조 버튼들에는 반응하지 않도록 제외 처리 */
.lecture-btn:hover:not(.lecture-btn-closed):not(.lecture-btn-canceled):not(.lecture-btn-completed):not([style*="cursor:default"]) {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* ===== 강좌 상세 테이블 ===== */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-table th {
    width: 180px;
    background: #f8f9fa;
    padding: 15px 20px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 14px;
}

.detail-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
    border-bottom: none;
}

.detail-table .course-name-row th,
.detail-table .course-name-row td {
    background: #f0f7ff;
    font-weight: 600;
}

.detail-table .course-name-row td {
    font-size: 18px;
    color: #1e3a5f;
}

.apply-period {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 8px;
    font-size: 13px;
}

.instructor-link {
    color: #1e3a5f;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    margin-left: 10px;
}

.instructor-link:hover {
    color: #0f2a44;
}

/* ===== 파일 다운로드 버튼 ===== */
.file-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #1e3a5f;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.file-download:hover {
    background: #0f2a44;
}

.file-download i {
    font-size: 16px;
}

.file-size {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    margin-left: 5px;
}

/* ===== 유의사항 박스 ===== */
.notice-box {
    background: #f8f9fa;
    border-left: 4px solid #dc3545;
    padding: 15px 20px;
    border-radius: 0 5px 5px 0;
}

.notice-box ul, .notice-box ol {
	list-style: disc;
    margin: 10px 0 0 20px;
    padding: 0 20px;
}

.notice-box li {
	list-style-type: disc;
    margin-bottom: 5px;
    color: #495057;
}

/* 유의사항 동의 섹션 스타일 */
.form-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-top: 30px;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.form-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e3a5f;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #1e3a5f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.form-section-body {
    padding: 22px;
}

.final-agree-box {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 8px;
    padding: 16px 20px;
}

.final-agree-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}

.final-agree-label input[type="checkbox"] {
    width: 19px;
    height: 19px;
    accent-color: #1e3a5f;
    cursor: pointer;
    flex-shrink: 0;
}

/* 로딩 스피너 스타일 추가 */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 나의 수강내역 카드 ===== */
.application-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.application-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header .course-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.card-header .course-name a {
    color: #333;
    text-decoration: none;
}

.card-header .course-name a:hover {
    color: #1e3a5f;
    text-decoration: underline;
}

.card-header .status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-pending { background: #ffc107; color: #333; }
.status-approved { background: #28a745; color: white; }
.status-waiting { background: #17a2b8; color: white; }
.status-rejected { background: #dc3545; color: white; }
.status-canceled { background: #6c757d; color: white; }
.status-cancel_request { background: #dc3545; color: white; }

.card-body {
    padding: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.info-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.info-value small {
    font-weight: normal;
    color: #666;
    font-size: 13px;
}

.payment-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.payment-item {
    text-align: center;
}

.payment-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.payment-value {
    font-size: 15px;
    font-weight: 600;
}

.payment-value.paid { color: #28a745; }
.payment-value.unpaid { color: #dc3545; }
.payment-value.refund { color: #6c757d; }

.virtual-account {
    grid-column: span 3;
    background: #e9ecef;
    padding: 10px;
    border-radius: 5px;
    font-size: 13px;
    text-align: center;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== 빈 결과 ===== */
.empty-result {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #666;
    font-size: 16px;
    border: 1px solid #e9ecef;
}

.empty-result i {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 20px;
    display: block;
}

.empty-result .btn {
    margin-top: 20px;
}

/* ===== 페이징 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.pagination a,
.pagination strong {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    text-decoration: none;
    color: #495057;
    min-width: 35px;
    text-align: center;
}

.pagination strong {
    background: #1e3a5f;
    color: white;
    border-color: #1e3a5f;
}

.pagination a:hover {
    background: #e9ecef;
}

/* ===== 인증 폼 ===== */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 40px;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.auth-container h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.auth-desc {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.auth-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

.auth-form .btn-submit {
    width: 100%;
    padding: 14px;
    background: #1e3a5f;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.auth-form .btn-submit:hover {
    background: #0f2a44;
}

.auth-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-notice {
    margin-top: 30px;
    padding: 20px;
    background: #e9ecef;
    border-radius: 5px;
    font-size: 14px;
    color: #495057;
}

.auth-notice p {
    margin: 5px 0;
}

.auth-notice i {
    color: #1e3a5f;
    margin-right: 5px;
}

/* ===== 상단 정보 ===== */
.top-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.user-info {
    background: #f0f7ff;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 15px;
    border: 1px solid #d0e2f2;
}

.user-info strong {
    color: #1e3a5f;
    font-weight: 600;
}

.btn-logout {
    background: #6c757d;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.btn-logout:hover {
    background: #5a6268;
}

.result-count {
    font-size: 16px;
    color: #333;
}

.result-count strong {
    color: #1e3a5f;
    font-weight: 600;
}

/* ===== 공통 모달 스타일 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideDown 0.3s ease;
}

@keyframes modalSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a7a 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-desc {
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-left: 3px solid #dc3545;
    font-size: 14px;
    color: #666;
}

.modal-footer {
    padding: 20px 25px 25px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 모달 내 폼 스타일 */
.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.modal .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.modal .form-control:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

/* ===== 강사 프로필 모달 전용 스타일 ===== */
.instructor-profile {
    text-align: center;
}

.instructor-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.instructor-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.instructor-subject {
    font-size: 16px;
    color: #1e3a5f;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.instructor-profile-content {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.8;
    white-space: pre-line;
    font-size: 14px;
    color: #495057;
}

.instructor-contact {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 13px;
    color: #666;
    text-align: left;
}

.instructor-contact div {
    margin-bottom: 5px;
}

.instructor-contact i {
    display: inline-block;
    width: 20px;
    color: #1e3a5f;
    margin-right: 5px;
}

/* ===== 로딩 스피너 ===== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 버튼 영역 ===== */
.btn-area {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
    .lecture-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .lecture-table td {
        white-space: normal;
        min-width: 180px;
    }
    
    .lecture-table td:first-child {
        min-width: 250px;
    }
    
    .lecture-table td:last-child {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .lecture-container,
    .lecture-detail-container {
        padding: 20px 10px;
    }
    
    .page-header h2 {
        font-size: 28px;
    }
    
    .nonmember-section {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .nonmember-section h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .nonmember-section .btn-nonmember {
        width: 100%;
        text-align: center;
    }
    
    .lecture-search {
        padding: 15px;
    }
    
    .search-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-row label {
        margin-bottom: 5px;
    }
    
    .filter-group {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .filter-select {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        font-size: 16px;
        height: 45px;
        line-height: 45px;
        background-position: right 12px center;
    }
    
    .filter-select.search-input {
        min-width: 100%;
        line-height: 45px;
    }
    
    .search-btn {
        width: 100%;
        height: 45px;
        line-height: 45px;
    }
    
    .sort-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-label {
        margin-bottom: 5px;
    }
    
    .sort-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-btn {
        flex: 1;
        text-align: center;
        padding: 8px 5px;
        font-size: 13px;
        height: 40px;
        line-height: 22px;
    }
    
    .day-buttons {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
    
    .day-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
        line-height: 36px;
    }
    
    .lecture-table,
    .detail-table {
        font-size: 13px;
    }
    
    .lecture-table th,
    .detail-table th {
        font-size: 13px;
        padding: 12px 5px;
    }
    
    .lecture-table td,
    .detail-table td {
        padding: 15px 5px;
    }
    
    .detail-table,
    .detail-table tbody,
    .detail-table tr,
    .detail-table th,
    .detail-table td {
        display: block;
    }
    
    .detail-table th {
        width: 100%;
        background: #f8f9fa;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 12px 15px;
    }
    
    .detail-table td {
        padding: 12px 15px;
        border-bottom: 2px solid #dee2e6;
    }
    
    .detail-table tr:last-child td {
        border-bottom: none;
    }
    
    .course-name {
        font-size: 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .payment-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .virtual-account {
        grid-column: span 1;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-footer {
        justify-content: center;
    }
    
    .btn,
    .lecture-btn {
        flex: 1;
        text-align: center;
    }
    
    .auth-container {
        margin: 0 auto;
    }
    
    .btn-area {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-area .btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .instructor-photo {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .page-header h2 {
        font-size: 24px;
    }
    
    .sort-buttons {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .sort-btn {
        flex: 1 0 calc(50% - 5px);
    }
    
    .day-buttons {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .day-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
        line-height: 30px;
    }
    
    .top-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-logout {
        width: 100%;
        text-align: center;
    }
    
    .lecture-table td {
        min-width: 150px;
    }
    
    .lecture-table td:first-child {
        min-width: 200px;
    }
    
    .lecture-table td:last-child {
        min-width: 80px;
    }
    
    .lecture-btn {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 60px;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
    
    .file-download {
        width: 100%;
        justify-content: center;
    }
}

/* 가로 모드 */
@media (max-width: 768px) and (orientation: landscape) {
    .lecture-container,
    .lecture-detail-container {
        padding: 15px;
    }
    
    .filter-group {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filter-select {
        width: calc(50% - 5px);
        min-width: calc(50% - 5px);
    }
    
    .filter-select.search-input {
        width: 100%;
    }
}

/* ===== 수강신청 폼 전용 스타일 ===== */

/* 강좌 요약 */
.apply-course-summary {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #c8e0f4;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 30px;
}
.summary-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
}
.summary-label {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #1e3a5f;
    padding: 3px 10px;
    border-radius: 20px;
}
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.badge-applying  { background: #28a745; color: #fff; }
.badge-waiting   { background: #ffc107; color: #333; }
.badge-additional{ background: #17a2b8; color: #fff; }
.summary-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.summary-item { display: flex; align-items: center; gap: 8px; }
.summary-item.full-width { grid-column: 1 / -1; }
.s-label { font-size: 13px; color: #666; min-width: 60px; font-weight: 500; }
.s-value { font-size: 14px; color: #333; font-weight: 500; }
.fee-amount { color: #1e3a5f !important; font-weight: 700 !important; font-size: 16px !important; }

/* 폼 섹션 */
.form-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.form-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}
.form-section-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #1e3a5f; }
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #1e3a5f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}
.required-note { font-size: 13px; color: #dc3545; font-weight: 500; }
.form-section-body { padding: 22px; }

/* 폼 레이아웃 */
.form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.form-col { flex: 1; min-width: 0; }
.form-col.full-col { flex: 0 0 100%; }
.form-label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; color: #495057; }
.form-hint { display: block; margin-top: 5px; font-size: 12px; color: #888; }

/* 입력 컨트롤 공통 */
.form-control {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 7px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}
.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}

/* =============================================
   [수정] select 화살표 버튼 — 래퍼 방식
   기존 .form-control에 appearance:none이 있어
   lf-select-wrap + lf-select 클래스로 분리
============================================= */
.lf-select-wrap {
    position: relative;
    display: block;
}
.lf-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #555;
    pointer-events: none;
    z-index: 1;
}
.lf-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px; /* 화살표 공간 확보 */
    cursor: pointer;
    background-image: none !important; /* 기존 bg-image 제거 */
}

/* 라디오 그룹 */
.radio-group { display: flex; gap: 20px; height: 42px; align-items: center; }
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; color: #333; }
.radio-label input[type="radio"] { width: 16px; height: 16px; accent-color: #1e3a5f; }

/* 강좌 대상 */
.target-info {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 7px;
    font-size: 14px;
    color: #495057;
}

/* 안내 박스 */
.info-notice {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 7px;
    padding: 12px 15px;
    font-size: 13px;
    color: #664d03;
    margin-bottom: 20px;
}

/* 수강료 요약 */
.fee-summary-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 22px;
    max-width: 400px;
}
.fee-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; }
.fee-row + .fee-row { border-top: 1px dashed #dee2e6; }
.fee-label { color: #666; font-weight: 500; }
.fee-value { font-weight: 600; color: #333; }
.fee-value.discount { color: #28a745; }
.total-row { margin-top: 5px; padding-top: 12px !important; border-top: 2px solid #1e3a5f !important; }
.fee-value.total { font-size: 20px; color: #1e3a5f !important; }

/* 결제 수단 */
.payment-method-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 5px; }
.payment-method-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #495057;
    background: #fff;
}
.payment-method-card input[type="radio"] { display: none; }
.payment-method-card.active,
.payment-method-card:has(input:checked) {
    border-color: #1e3a5f;
    background: #f0f7ff;
    color: #1e3a5f;
    font-weight: 600;
}
.payment-method-card:hover { border-color: #1e3a5f; background: #f0f7ff; }
.pm-icon { font-size: 20px; }

/* 입금 안내 */
.bank-notice {
    margin-top: 10px;
	background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 13px;
    color: #664d03;
}
.bank-notice p { margin: 3px 0; }

/* 환불 계좌 */
.refund-account-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
}
.refund-row { display: flex; align-items: center; gap: 12px; }
.refund-label { width: 70px; font-size: 13px; font-weight: 600; color: #555; flex-shrink: 0; }
.refund-input { flex: 1; height: 38px; }

/* 동의 체크박스 공통 */
.agree-simple-box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}
.agree-simple-item,
.agree-label,
.final-agree-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}
.agree-simple-item input[type="checkbox"],
.agree-label input[type="checkbox"],
.final-agree-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1e3a5f;
    cursor: pointer;
    flex-shrink: 0;
}
.agree-text { font-size: 14px; }

/* 약관 목록 */
.agreements-box { border: 1px solid #e9ecef; border-radius: 10px; overflow: hidden; }
.agreement-item { border-bottom: 1px solid #f0f0f0; }
.agreement-header { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; }
.agree-title { font-size: 14px; color: #333; }
.required-mark { color: #dc3545; font-style: normal; font-size: 12px; margin-left: 4px; }
.optional-mark  { color: #888;    font-style: normal; font-size: 12px; margin-left: 4px; }
.btn-toggle-content {
    font-size: 12px;
    color: #1e3a5f;
    background: none;
    border: 1px solid #1e3a5f;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-toggle-content:hover { background: #1e3a5f; color: #fff; }
.agreement-content {
    padding: 15px 20px;
    font-size: 13px;
    background: #fafafa;
    border-top: 1px dashed #e9ecef;
    line-height: 1.7;
    color: #555;
}

/* [수정] 전체동의 — 약관 목록 맨 아래 */
.agree-all-row {
    padding: 15px 18px;
    background: #f0f7ff;
    border-top: 2px solid #c8e0f4;
}
.agree-all-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #1e3a5f;
}
.agree-all-label input[type="checkbox"] {
    width: 19px;
    height: 19px;
    accent-color: #1e3a5f;
    cursor: pointer;
    flex-shrink: 0;
}

/* 최종 동의 */
.final-agree-box {
    margin-top: 18px;
    padding: 16px 20px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 8px;
}
.final-agree-label { font-size: 15px; color: #333; }

/* form-group */
.form-group { margin-bottom: 22px; }
.form-group .form-label { margin-bottom: 10px; }
.optional-note { font-size: 12px; color: #888; font-weight: 400; }

/* =============================================
   [수정] 하단 버튼 — a태그·button태그 높이 완전 통일
   display:inline-flex + 고정 height로 줄 높이 차이 제거
============================================= */
.btn-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;         /* 버튼이 넘칠 때 줄바꿈 */
    padding: 0 15px;         /* 좌우 여백 */
}

.lf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 140px;            /* 모바일에서 약간 줄임 */
    height: 46px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
    vertical-align: middle;
    -webkit-appearance: none; /* iOS 버튼 기본 스타일 제거 */
    appearance: none;
}

.lf-btn-primary   { background: #1e3a5f; color: #fff; }
.lf-btn-primary:hover { background: #0f2a44; color: #fff; }
.lf-btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }
.lf-btn-secondary { background: #fff; color: #495057; border: 1px solid #ced4da; }
.lf-btn-secondary:hover { background: #e9ecef; }

/* 반응형 */
@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 15px; }
    .summary-info { grid-template-columns: 1fr 1fr; }
    .payment-method-list { flex-direction: column; }
    .payment-method-card { width: 100%; justify-content: flex-start; }
    .fee-summary-box, .refund-account-box { max-width: 100%; }
    .lf-btn { flex: 1; width: auto; }
}
@media (max-width: 480px) {
    .apply-course-summary { padding: 15px; }
    .summary-title { font-size: 15px; }
    .summary-info { grid-template-columns: 1fr; }
    .form-section-body { padding: 15px; }
    .form-section-header { padding: 14px 15px; }
    .agree-simple-box { flex-direction: column; gap: 12px; }

    .btn-area {
        flex-direction: row;   /* 세로 쌓임 방지 */
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 15px;
    }
    .lf-btn {
        width: auto;
        flex: 1;               /* 균등 분할 */
        height: 44px;
        font-size: 14px;
        white-space: nowrap;   /* 텍스트 줄바꿈 방지 */
    }
}

/* 툴팁 컨테이너 */
.tooltip_container {
    position: relative;
    display: inline-block;
}

.tooltip_container:hover .tooltip_text {
    visibility: visible;
    opacity: 1;
}

/* 툴팁 아이콘 */
.tooltip_icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #94a3b8;
    color: white !important;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
}

/* 툴팁 텍스트 */
.tooltip_text {
    visibility: hidden;
    position: absolute;
    background-color: #fff;
    border: 2px solid #00BDCC;
    color: #121212;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.26;
    white-space: normal;
    width: 250px;         
    min-width: 200px;    
    max-width: 300px;    
    word-break: break-word; 
    text-align: left;
    z-index: 9999;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    font-weight: normal;
    top: -30px;
    left: 25px;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    pointer-events: none;
}

/* 툴팁 스타일 */
.tooltip_icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #94a3b8;
    color: white !important;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    margin-left: 6px;
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.tooltip_icon:hover .tooltip_text {
    visibility: visible;
    opacity: 1;
}

.tooltip_text::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent #00BDCC transparent transparent;
}