/* 전체 스타일 */    
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* 타임테이블 래퍼 */
.timetable-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 헤더 컨테이너 */
.header-container {
    background: linear-gradient(135deg, #4a6bff, #2541b2);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-container h1 {
    font-size: 28px;
    font-weight: 700;
}

.session-counter {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 콘텐츠 컨테이너 */
.content-container {
    padding: 30px;
}

/* 검색 컨테이너 */
.search-container {
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.select-styled {
    padding: 0px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    font-size: 14px;
    min-width: 150px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.select-styled:focus {
    border-color: #4a6bff;
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.1);
}

.input-styled {
  font-size: 16px;           /* 원하는 크기 */
  line-height: normal;       /* ← 핵심: 잘림 방지 */
  padding: 8px 12px;         /* 상하 패딩으로 높이 확보 */
  height: auto;              /* 고정 높이 제거 */
  min-height: 38px;          /* 최소 높이 보장 (필요시 숫자 조절) */
  box-sizing: border-box;
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;  /* iOS/Safari */
}

/* 혹시 전역에서 줄 간격을 강제로 1로 고정했다면 이걸로 덮어쓰기 */
select.input-styled { line-height: normal !important; }

/* 드롭다운 목록의 폰트 크기도 맞추고 싶다면(브라우저별 적용 다름) */
#S_TOPIC option { font-size: inherit; }

.input-styled:focus {
    border-color: #4a6bff;
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.1);
}

.textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-search {
    padding: 10px 20px;
    background-color: #4a6bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-search:hover {
    background-color: #3a5ae8;
}

/* 테이블 액션 */
.table-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.btn-add {
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-add:hover {
    background-color: #3d8b40;
}

/* 테이블 컨테이너 */
.table-container {
    overflow-x: auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.timetable-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.timetable-table th {
    background-color: #f0f4f8;
    color: #333;
    font-weight: 600;
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid #ddd;
}

.timetable-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.timetable-table tbody tr {
    transition: background-color 0.3s;
}

.timetable-table tbody tr:hover {
    background-color: #f9fafc;
}

.timetable-table tbody tr.highlight {
    background-color: #fff8e1;
}

/* 테이블 셀 내용 */
.session-code {
    font-weight: 600;
    color: #4a6bff;
}

.session-title {
    font-weight: 500;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-room {
    display: flex;
    flex-direction: column;
}

.room-code {
    font-weight: 600;
    color: #555;
}

.room-name {
    font-size: 13px;
    color: #777;
}

.session-datetime {
    display: flex;
    flex-direction: column;
}

.session-date {
    font-weight: 500;
}

.session-day {
    font-size: 13px;
    color: #777;
}

.session-time {
    font-size: 13px;
    color: #555;
    margin-top: 5px;
}

.session-chair {
    max-width: 200px;
}

.chair-name {
    font-weight: 500;
}

.chair-affiliation {
    font-size: 13px;
    color: #777;
    margin-top: 3px;
}

.session-comment {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #666;
}

/* 테이블 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-view {
    padding: 6px 12px;
    background-color: #4a6bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-view:hover {
    background-color: #3a5ae8;
}

.btn-delete {
    padding: 6px 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.btn-save {
    padding: 10px 20px;
    background-color: #4a6bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-save:hover {
    background-color: #3a5ae8;
}

.btn-cancel {
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-cancel:hover {
    background-color: #e5e5e5;
}

/* 모달 */
#sessionModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

#sessionModal .modal-content {
    background-color: #fff;
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#sessionModal .modal-header {
    background: linear-gradient(135deg, #4a6bff, #2541b2);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#sessionModal .modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

#sessionModal .close-modal {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#sessionModal .modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

#sessionModal .modal-footer {
    padding: 15px 20px;
    background-color: #f5f7fa;
    border-top: 1px solid #eee;
    border-radius: 0 0 10px 10px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 폼 그룹 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    background-color: #f0f8ff; /* 연한 파란색 배경 */
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #d0e4ff;
    flex: 1 1 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
    margin-bottom: 12px;
}

.form-group.half {
    flex: 1 1 calc(50% - 8px); /* 두 칸 분할용 */
}

.form-group:hover {
    background-color: #e6f0ff;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    background-color: #fff;
}

.chair-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-styled.small {
    width: 80px;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    #sessionModal .modal-content {
        width: 95%;  
        margin: 20px auto;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .select-styled, .input-styled {
        width: 100%;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
    }
}
