/**
 * GPU Reservation System Styles
 *
 * @package isl_2025
 * @since 1.0.0
 */

/* ==========================================================================
   테이블 기본 스타일
   ========================================================================== */
#calendar table {
    border-collapse: collapse;
    font-size: 12px;
    width: auto;
    margin: 20px auto;
    border-top: none;
}

#calendar tbody {
    display: block;
}

#calendar th,
#calendar td {
    border: 1px solid #ccc;
    text-align: center;
    padding: 5px;
}

#calendar th {
    font-size: 14px;
}

/* ==========================================================================
   날짜 및 시간 스타일
   ========================================================================== */
.week_row {
    background-color: #f9f9f9;
    display: flex;
    flex-direction: row;
    width: fit-content;
}

.week_day {
    background-color: rgb(202, 201, 201);
    font-weight: bold;
    text-align: center;
    width: 50px;
    min-width: 50px;
    font-size: 11px;
    user-select: none;
    padding: 2px;
}

.week_day.highlight {
    background-color: #ffdd57;
    font-weight: bold;
}

.week_name {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: center;
    width: 120px;
    min-width: 120px;
    font-size: 14px;
    user-select: none;
}

.week_day_name {
    background-color: rgb(202, 201, 201);
    font-weight: bold;
    text-align: center;
    width: 120px;
    min-width: 120px;
    font-size: 14px;
    user-select: none;
}

/* ==========================================================================
   GPU 헤더 및 컨테이너
   ========================================================================== */
.gpu-container {
    display: none;
    margin-top: 10px;
}

.gpu-header {
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
    user-select: none;
    margin-top: 25px;
    margin-bottom: 4px;
    font-size: 22px;
    font-weight: 500;
}

.gpu-header_box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40%;
    margin: 0 auto;
}

.gpu-header:hover {
    background: rgba(213, 237, 252, 0.88);
}

/* ==========================================================================
   타임 슬롯 스타일
   ========================================================================== */
.day-cell {
    padding: 0;
    width: 50px;
    min-width: 50px;
}

.day-cell.highlight {
    background-color: #fff9c4;
}

.slot {
    width: 100%;
    height: 30px;
    cursor: pointer;
    border-right: 1px solid #eee;
    box-sizing: border-box;
}

.slot:hover {
    background-color: #ffaaaa !important;
}

.slot.selected {
    background-color: #6ca8ff;
}

/* ==========================================================================
   예약된 슬롯 스타일
   ========================================================================== */
.reserved {
    background-color: #ffcccb !important;
    color: black;
    font-size: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.reserved-text {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
    pointer-events: auto;
}

.reserved:hover::after {
    content: attr(data-text);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 1000;
    max-width: 250px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.reserved::after {
    content: "";
    visibility: hidden;
    opacity: 0;
}

/* ==========================================================================
   예약 캘린더 레이아웃
   ========================================================================== */
.reservation-calendar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 88%;
    margin: auto;
}

#calendar {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

/* ==========================================================================
   제목 및 안내 문구
   ========================================================================== */
#title_reserv {
    text-align: center;
    font-size: 30px;
    font-weight: 500;
    margin-top: 60px;
}

#title_info {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
}

/* ==========================================================================
   예약 버튼 영역
   ========================================================================== */
.resercation_btn_area {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

#reservation-reason {
    margin: 0 30px 0 30px;
    flex: 1;
    height: 40px;
    padding: 10px;
    font-size: 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease-in-out;
    max-width: 500px;
}

#reservation-reason:focus {
    border-color: #003876;
    background-color: #f3fff3;
}

#res_btn {
    padding: 0;
    width: 120px;
    height: 40px;
    font-size: 16px;
    font-weight: bold;
    background-color: #003876;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

#res_btn:hover {
    background-color: #003876;
}

#res_btn:active {
    transform: scale(0.95);
}