@charset "utf-8";

/* 
 * 유원대 식단관리 앱 통합 CSS (v2.0)
 * - Part 1: CMS 공통/목록/등록 스타일 (클래스명 b-* 매핑 완료)
 * - Part 2: 주간 식단표(Main) 공식 스타일 (inline-flex, float 적용)
 */

/* ==========================================================================
   Part 1. CMS 공통/목록/등록 스타일 (Corrected for list.jsp & write.jsp)
   ========================================================================== */

/* 1. 기본 박스 스타일 */
.bn-list-common01, .bn-write-common01 {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: #ffffff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

/* 2. 상단 검색 영역 (list_search_box) */
.list_search_box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.b-srch-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* 3. 상단 버튼/카운트 영역 (.cafeteria-top-flex) */
.cafeteria-top-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.total-wrap {
    font-size: 15px;
    font-weight: 600;
    color: #475569;
}
.total-wrap span {
    color: #2563eb;
    font-weight: 800;
    margin: 0 4px;
}

/* 4. 공통 입력 요소 (b-input, b-select) */
.b-input, .b-select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    vertical-align: middle;
    outline: none;
    transition: all 0.2s;
}

.b-input:focus, .b-select:focus, .b-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.b-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
    font-size: 14px;
}

/* 5. 버튼 스타일 (b-btn-*) */
.b-btn-srch, .b-btn-reset {
    height: 40px;
    padding: 0 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.b-btn-srch {
    background: #3b82f6;
    color: white;
}
.b-btn-srch:hover { background: #2563eb; }

.b-btn-reset {
    background: #e2e8f0;
    color: #475569;
}
.b-btn-reset:hover { background: #cbd5e1; }

.b-btn-type01 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.b-btn-c-blue { background: #3b82f6; color: white; }
.b-btn-c-blue:hover { background: #2563eb; }
.b-btn-c-white { background: #fff; border: 1px solid #d1d5db; color: #374151; }
.b-btn-c-white:hover { background: #f9fafb; border-color: #9ca3af; }
.b-btn-c-gray { background: #64748b; color: white; }
.b-btn-c-gray:hover { background: #475569; }
.b-btn-c-red { background: #ef4444; color: white; }
.b-btn-c-red:hover { background: #dc2626; }

.b-btn-s {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.b-btn-group {
    display: flex;
    gap: 4px;
    justify-content: center;
}

/* 6. 리스트 테이블 (.board-table) */
.board-table {
    width: 100%;
    border-top: 2px solid #334155;
    border-collapse: collapse;
}

.board-table th {
    padding: 15px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 14px;
}

.board-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 14px;
    text-align: center;
}

.board-table tbody tr:hover td {
    background: #f1f5f9;
}

.b-td-left { text-align: left !important; padding-left: 20px !important; }
.b-no-post { text-align: center; padding: 50px 0; color: #94a3b8; }
.b-ico-img { margin-left: 5px; font-size: 16px; }

/* 7. 페이징 (.b-paging-box) */
.b-paging-box {
    margin-top: 30px;
    text-align: center;
}

.b-paging-box ul {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.b-paging-box li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.b-paging-box li a:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.b-paging-box li a.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    font-weight: 700;
}

/* 페이징 화살표 아이콘 */
.b-paging-box li.first a { background: url(../img/btn_first.svg) no-repeat center; background-size: 12px; }
.b-paging-box li.prev a { background: url(../img/btn_prev.svg) no-repeat center; background-size: 8px; }
.b-paging-box li.next a { background: url(../img/btn_next.svg) no-repeat center; background-size: 8px; }
.b-paging-box li.last a { background: url(../img/btn_last.svg) no-repeat center; background-size: 12px; }

/* 호버 시 배경색 변경 (이미지 유지) */
.b-paging-box li.first a:hover { background-color: #eff6ff; background-image: url(../img/btn_first.svg); }
.b-paging-box li.prev a:hover { background-color: #eff6ff; background-image: url(../img/btn_prev.svg); }
.b-paging-box li.next a:hover { background-color: #eff6ff; background-image: url(../img/btn_next.svg); }
.b-paging-box li.last a:hover { background-color: #eff6ff; background-image: url(../img/btn_last.svg); }

/* 8. 글쓰기 폼 (.b-table-wrap) */
.b-table-wrap {
    border-top: 2px solid #334155;
    border-bottom: 1px solid #cbd5e1;
}

.b-table-box {
    border-bottom: 1px solid #e2e8f0;
}
.b-table-box:last-child { border-bottom: none; }

.b-row-box {
    display: flex;
    align-items: stretch;
}

.b-title-box {
    width: 140px;
    background: #f8fafc;
    padding: 15px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #334155;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.b-con-box {
    flex: 1;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.b-required label::after {
    content: '*';
    color: #ef4444;
    margin-left: 4px;
    font-weight: 700;
}

.b-btn-wrap {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* hide 클래스 */
.hide {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* datepicker 스타일 보정 */
.ui-datepicker-trigger {
    margin-left: 5px;
    cursor: pointer;
}

/* 9. 반응형 처리 */
@media screen and (max-width: 768px) {
    .cafeteria-list-table, .board-table {
        display: block;
        overflow-x: auto;
    }
    
    .b-row-box {
        flex-direction: column;
    }
    
    .b-title-box {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 10px 15px;
    }
    
    .b-con-box {
        padding: 15px;
    }
}


/* ==========================================================================
   Part 2. 주간 식단표 (Main) 공식 스타일 (Confirmed & Restored)
   ========================================================================== */
/* 공식 사이트: https://www.u1.ac.kr/_res/u1/u1/css/cafeteria.content.css */
/* 이미지 경로: https://www.u1.ac.kr/_res/u1/u1/img/ */

.cafeteria-user-container {
    max-width: 100%;
    font-family: 'NanumSquare', 'Noto Sans KR', sans-serif;
}

.year_select {width:auto; background:#f3f5f9; border:1px solid #e3e6f0; margin:0 0 30px 0; padding:10px 0 11px; text-align:center; position:relative;}
.year_select span {display:inline-block; vertical-align:top;}
.year_select a {display:inline-block; vertical-align:top;font-size: 18px;font-weight:600; color:#676767;transition: all .2s ease; text-decoration: none;}
.year_select span.current {font-family:'NanumSquare', sans-serif; font-weight: 800;font-size: 36px;color: #4d5876;display: inline-block;vertical-align: top;line-height: 1.5;}

.year_select .prev {position:absolute; left:30px;top: 50%;transform: translateY(-50%); padding:5px 0 5px 15px; background:url(https://www.u1.ac.kr/_res/u1/u1/img/common/year_prev_bul.png) no-repeat left 50%;}
.year_select .prev:hover, .year_select .prev:active, .year_select .prev:focus {left:20px;}
.year_select .next {position:absolute; right:30px;top: 50%;transform: translateY(-50%); padding:5px 15px 5px 0; background:url(https://www.u1.ac.kr/_res/u1/u1/img/common/year_next_bul.png) no-repeat right 50%;}
.year_select .next:hover, .year_select .next:active, .year_select .next:focus {right:20px;}
 
.food_list {width:100%; list-style:none; padding:0; margin:0;}
.food_list li {border-bottom:1px solid #e5e5e5; padding:30px 0 30px 200px; position:relative; min-height:76px; width:auto; box-sizing: content-box;}
.food_list li:first-child {padding-top:0;}
.food_list li span.date {
    display:flex; align-items:center; justify-content:center;
    width:76px;height: 76px; background:#0068B7; color:#fff; overflow:hidden; text-align:center; font-family:'NanumSquare', sans-serif; font-size: 20px; font-weight:700;
    position:absolute; left:0; top:30px;border-radius:38px;
}
.food_list li span.day {color:#0068B7; font-weight:700; position:absolute; left:100px; top:56px; font-family:'NanumSquare', sans-serif;}
.food_list li:first-child span.date {top:0;}
.food_list li:first-child span.day {top:26px;}  

/* [FIX] 공식 CSS의 inline-flex 및 float 속성 복원 */
.food_list li ul {width:100%; height:auto; overflow:hidden; padding-top:16px;display: inline-flex;gap: 10px;flex-wrap: wrap; list-style:none; margin:0; padding-left:0;}
.food_list li ul li {min-height:10px; border:0; border:1px solid #e5e5e5; width:auto; float:left; padding:10px 15px !important;font-size: 16px;line-height: 1.5;color: #222; margin-bottom: 0; background:#fff;}

/* 오늘 날짜 하이라이트 (커스텀 추가) */
.food_list li.is-today span.date {
    background: #e53e3e; /* 빨간색 포인트 */
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.3);
}
    
@media screen and (max-width:768px) {	
	.year_select {margin: 0 0 25px 0;} 
	.year_select span.current {font-size: 30px;} 
	.year_select a {font-size: 16px;}
	
	.year_select .prev {left: 10px;}
	.year_select .prev:hover, .year_select .prev:active, .year_select .prev:focus {left:10px;}
	.year_select .next {right: 10px;}
	.year_select .next:hover, .year_select .next:active, .year_select .next:focus {right:10px;}
	
	.food_list li {padding:80px 0 25px 0;} 
	.food_list li:first-child {padding:60px 0 25px 0;} 
	.food_list li span.date {width:66px; height:66px;font-size: 18px;}
	.food_list li span.date {top:20px;}
	.food_list li span.day {top:41px; left:80px;}
	.food_list li:first-child span.day {top:21px;}
	.food_list li ul li {font-size: 14px; padding: 12px 15px !important;}
}

@media screen and (max-width:400px) {	 
	.year_select span.current {font-size: 26px;}
	.year_select a {font-size: 14px;}
}

@media screen and (max-width:350px) {	 
	.year_select span.current {font-size: 22px;} 
}

/* 관리자 접속 버튼 (커스텀) */
.admin-access-wrap {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px dashed #ddd;
}
