/* =============================================
   대관 신청 모듈 스타일
   ============================================= */

/* ---- 공통 ---- */
#rental-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 15px;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

#rental-wrap h2.rental-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #222;
}

#rental-wrap h3.rental-sub {
    font-size: 18px;
    font-weight: bold;
    margin: 25px 0 12px;
    padding-left: 10px;
    border-left: 4px solid #0B0C0C;
}

.rental-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.rental-btn-primary {
    background: #0B0C0C;
    color: #fff;
}

.rental-btn-primary:hover { background: #2a2b2b; color: #fff; }

.rental-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.rental-btn-secondary:hover { background: #e0e0e0; }

/* ---- 시설 목록 ---- */
#rental-list .space-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

#rental-list .space-item h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 8px;
}

#rental-list .space-item .space-meta {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
}

#rental-list .space-item .space-desc {
    color: #444;
    margin-bottom: 16px;
}

#rental-list .space-notice {
    background: #f8f8f8;
    border-left: 3px solid #0B0C0C;
    padding: 10px 14px;
    font-size: 13px;
    color: #555;
    margin-bottom: 16px;
}

/* 요금표 */
#rental-list .price-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 14px;
}

#rental-list .price-table th,
#rental-list .price-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: center;
}

#rental-list .price-table th {
    background: #f0f4f8;
    font-weight: 600;
    color: #333;
}

#rental-list .space-apply-btn {
    text-align: right;
}

/* ---- 대관 신청 폼 ---- */
#rental-apply {}

/* 캘린더 */
#rental-calendar-wrap {
    margin-bottom: 24px;
}

#rental-calendar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}

#rental-calendar .cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0B0C0C;
    color: #fff;
    padding: 12px 16px;
}

#rental-calendar .cal-header .cal-nav {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

#rental-calendar .cal-header .cal-nav:hover {
    background: rgba(255,255,255,0.2);
}

#rental-calendar .cal-header .cal-title {
    font-size: 16px;
    font-weight: bold;
}

#rental-calendar table {
    width: 100%;
    border-collapse: collapse;
}

#rental-calendar table th {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

#rental-calendar table td {
    padding: 0;
    text-align: center;
    border: 1px solid #f0f0f0;
    height: 44px;
    vertical-align: middle;
}

#rental-calendar table th:first-child { color: #e44; }
#rental-calendar table th:last-child  { color: #44c; }

#rental-calendar .cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
    position: relative;
}

#rental-calendar .cal-day:hover:not(.disabled):not(.past) {
    background: #f0f0f0;
}

#rental-calendar .cal-day.today {
    font-weight: bold;
    color: #0B0C0C;
}

#rental-calendar .cal-day.selected {
    background: #0B0C0C;
    color: #fff;
}

#rental-calendar .cal-day.selected:hover {
    background: #2a2b2b;
}

#rental-calendar .cal-day.past,
#rental-calendar .cal-day.disabled {
    color: #bbb;
    cursor: not-allowed;
    background: #f8f8f8;
}

#rental-calendar .cal-day.closed {
    background: #fff0f0;
    color: #c00;
    cursor: not-allowed;
    text-decoration: line-through;
}

#rental-calendar .cal-day.full {
    color: #999;
    cursor: not-allowed;
}

#rental-calendar .cal-day.partial::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #f60;
    border-radius: 50%;
}

#rental-calendar .cal-day.sun { color: #e44; }
#rental-calendar .cal-day.sat { color: #44c; }

#rental-calendar .cal-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

/* 시간 슬롯 */
#rental-slot-wrap {
    margin-bottom: 24px;
}

#rental-slot-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

#rental-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rental-slot {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    background: #fff;
    min-width: 90px;
    text-align: center;
}

.rental-slot:hover:not(.booked) {
    border-color: #0B0C0C;
    background: #f0f0f0;
}

.rental-slot.selected {
    background: #0B0C0C;
    border-color: #0B0C0C;
    color: #fff;
    font-weight: bold;
}

.rental-slot.booked {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: #e0e0e0;
}

#rental-slot-msg {
    color: #888;
    font-size: 13px;
    padding: 10px 0;
}

/* 신청 폼 테이블 */
#rental-apply-form table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#rental-apply-form table th,
#rental-apply-form table td {
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    font-size: 14px;
}

#rental-apply-form table th {
    background: #f5f7fa;
    font-weight: 600;
    width: 25%;
    white-space: nowrap;
}

#rental-apply-form table td {
    background: #fff;
}

.rental-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border 0.2s;
}

.rental-input:focus {
    border-color: #0B0C0C;
    outline: none;
    box-shadow: 0 0 0 2px rgba(11,12,12,0.1);
}

.rental-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    transition: border 0.2s;
}

.rental-textarea:focus {
    border-color: #0B0C0C;
    outline: none;
    box-shadow: 0 0 0 2px rgba(11,12,12,0.1);
}

.rental-req { color: #e44; margin-left: 2px; }

.rental-hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* 주소검색 */
.address-wrap { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.address-wrap .rental-input { flex: 1; }
.address-wrap .rental-btn   { white-space: nowrap; }

/* 가격 미리보기 */
#rental-price-preview {
    background: #f5f5f5;
    border: 1px solid #0B0C0C;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    color: #0B0C0C;
    margin-bottom: 16px;
}

#rental-price-preview strong {
    font-size: 16px;
}

/* 선택 요약 */
#rental-selection-summary {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    margin-bottom: 16px;
}

/* 제출 버튼 */
.rental-submit-wrap {
    text-align: center;
    margin-top: 24px;
}

.rental-submit-wrap button {
    padding: 12px 36px;
    font-size: 16px;
}

/* ---- 나의 신청 내역 ---- */
#rental-history {}

#rental-history table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
}

#rental-history table th,
#rental-history table td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: center;
}

#rental-history table th {
    background: #f0f4f8;
    font-weight: 600;
}

#rental-history table td.tal { text-align: left; }

#rental-history .history-nodata {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

/* 상태 배지 */
.status-wait    { color: #856404; background: #fff3cd; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.status-approve { color: #0c5460; background: #d1ecf1; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.status-done    { color: #155724; background: #d4edda; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.status-reject  { color: #721c24; background: #f8d7da; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.status-cancel  { color: #555;    background: #e9ecef; padding: 2px 8px; border-radius: 10px; font-size: 12px; }

/* 취소 버튼 */
.cancel-btn {
    background: none;
    border: 1px solid #ccc;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.cancel-btn:hover { background: #f5f5f5; }

/* 페이징 */
#rental-wrap #list-paging,
#rental-wrap #board-paging {
    text-align: center;
    margin-top: 20px;
}

/* ---- 반응형 ---- */
@media screen and (max-width: 768px) {
    #rental-wrap {
        padding: 20px 10px;
    }

    #rental-wrap h2.rental-title {
        font-size: 20px;
    }

    /* 캘린더 */
    #rental-calendar .cal-day {
        height: 36px;
        font-size: 12px;
    }

    #rental-calendar table td {
        height: 36px;
    }

    /* 슬롯 */
    .rental-slot {
        min-width: 70px;
        font-size: 13px;
        padding: 6px 10px;
    }

    /* 신청 폼 */
    #rental-apply-form table th,
    #rental-apply-form table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #rental-apply-form table th {
        background: #f5f7fa;
        border-bottom: none;
        padding-bottom: 4px;
    }

    #rental-apply-form table td {
        border-top: none;
    }

    /* 내역 표 */
    #rental-history .col-hide { display: none; }
}
