/* Lab Calendar Styles */
#lab-calendar-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.lab-cal-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* 범례 */
.lab-cal-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.lab-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.lab-cal-legend-item::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background-color: var(--color);
}

/* 레이아웃 */
.lab-cal-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .lab-cal-layout {
        grid-template-columns: 1fr;
    }
}

/* 캘린더 */
.lab-cal-calendar-wrap {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#lab-calendar {
    min-height: 600px;
}

/* 캘린더 헤더 */
.lab-fc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.lab-fc-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.lab-fc-nav {
    display: flex;
    gap: 8px;
}

.lab-fc-nav button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.lab-fc-nav button:hover {
    background: #4285F4;
    color: #fff;
    border-color: #4285F4;
}

/* 캘린더 그리드 */
.lab-fc-grid {
    width: 100%;
    border-collapse: collapse;
}

.lab-fc-grid th {
    padding: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.lab-fc-grid td {
    vertical-align: top;
    border: 1px solid #f0f0f0;
    padding: 4px;
    min-height: 90px;
    width: calc(100% / 7);
    cursor: pointer;
    transition: background 0.15s;
}

.lab-fc-grid td:hover {
    background: #f0f7ff;
}

.lab-fc-grid td.other-month {
    background: #fafafa;
    color: #ccc;
}

.lab-fc-grid td.today .day-number {
    background: #4285F4;
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-size: 13px;
    font-weight: 500;
    padding: 2px 4px;
    margin-bottom: 2px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lab-fc-event {
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    cursor: default;
}

/* 예약 폼 */
.lab-cal-form-wrap {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.lab-cal-form-wrap h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.lab-cal-field {
    margin-bottom: 14px;
}

.lab-cal-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.lab-cal-field input,
.lab-cal-field select,
.lab-cal-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.lab-cal-field input:focus,
.lab-cal-field select:focus,
.lab-cal-field textarea:focus {
    outline: none;
    border-color: #4285F4;
    box-shadow: 0 0 0 3px rgba(66,133,244,0.1);
}

#lab-cal-submit {
    width: 100%;
    padding: 10px;
    background: #4285F4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

#lab-cal-submit:hover {
    background: #3367d6;
}

#lab-cal-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* 메시지 */
#lab-cal-message {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    display: none;
}

#lab-cal-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    display: block;
}

#lab-cal-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    display: block;
}

/* 이벤트 팝업 */
.lab-event-popup {
    position: absolute;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    width: 260px;
    z-index: 9999;
    overflow: hidden;
}

.lab-event-popup-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 10px 0;
}

.lab-event-popup-close {
    cursor: pointer;
    color: #666;
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.lab-event-popup-close:hover {
    background: #f0f0f0;
}

.lab-event-popup-body {
    padding: 4px 16px 16px;
    position: relative;
}

.lab-event-popup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.lab-event-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 10px;
    display: inline;
    vertical-align: middle;
}

.lab-event-popup-info {
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
    padding-left: 4px;
}

/* 팝업 취소 버튼 */
.lab-event-popup-cancel {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.lab-popup-cancel-btn {
    width: 100%;
    padding: 7px;
    background: #EA4335;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.lab-popup-cancel-btn:hover {
    background: #c62828;
}

/* 취소 모드 읽기전용 필드 */
.lab-cal-field input[readonly],
.lab-cal-field select[disabled] {
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}
