.bottom-sheet { display: none; position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 1100; }
.bottom-sheet::before { content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: -1; }
.bottom-sheet.active { display: block }

/* Golf Club & Course Information Styles */
.golf-club-section, .golf-course-section {
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: bold;
    color: #2c5aa0;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.section-title i {
    font-size: 24px;
    color: #2c5aa0;
}

.info-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
	border: 1px solid #dee2e6;
    border-radius: 5px;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: #212529;
    line-height: 1.4;
}

.info-value a {
    color: #2c5aa0;
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.subsection-title {
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 16px;
    margin-top: 24px;
}

.facilities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.facility-item:hover {
    border-color: #2c5aa0;
    box-shadow: 0 2px 4px rgba(44, 90, 160, 0.1);
}

.facility-item i {
    font-size: 18px;
    color: #2c5aa0;
    width: 20px;
    text-align: center;
}

.facility-item span {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #495057;
}

.facility-status {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.facility-status:contains("Available") {
    background: #d4edda;
    color: #155724;
}

/* Since CSS doesn't support :contains, we'll use JavaScript to add classes */
.facility-available {
    background: #d4edda !important;
    color: #155724 !important;
}

.facility-unavailable {
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* Responsive design for larger screens */
@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
		justify-content: center;
    }
}

.bottom-sheet .player-name { font-size: 16px; font-weight: bold }
.bottom-sheet .finish-round { width: auto }


.bottom-sheet-content { 
    display: flex;
    flex-direction: column;
    position: fixed; 
    top: 10%; 
	z-index:1101;
	width: 90%; /* PC에서 화면의 90% 너비 사용 */
	max-width: 600px; /* 최대 600px로 제한 */
    left: 50%;
    transform: translateX(-50%) translateY(100%); /* 가운데 정렬 */
	text-align:center;
    height: calc(90% - 70px); /* PC에서도 fixed-ul 높이만큼 빼기 */
    background: #fff; 
    border-radius: 12px 12px 0 0; 
    transition: transform 0.3s ease-in-out;
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom); /* iOS 안전 영역 대응 */
}

/* 모바일에서는 전체 너비 사용 */
@media (max-width: 768px) {
    .bottom-sheet-content {
        width: 100%; /* 모바일에서는 전체 너비 */
        max-width: none;
        left: 0;
        transform: translateY(100%); /* 모바일에서는 X축 변환 제거 */
    }
}

@media (max-width: 768px) {
    .bottom-sheet-content {
        height: calc(90% - 70px); /* 90% 높이에서 fixed-ul 높이 빼기 */
        bottom: 70px; /* fixed-ul 높이만큼 올리기 */
    }
}

.bottom-sheet.active .bottom-sheet-content {
    transform: translateX(-50%) translateY(0) !important; /* PC에서 가운데 정렬 유지, 인라인 스타일 우선순위 */
}

/* 모바일에서는 X축 변환 없이 */
@media (max-width: 768px) {
    .bottom-sheet.active .bottom-sheet-content {
        transform: translateY(0) !important; /* 모바일에서는 인라인 스타일 덮어쓰기 */
    }
}

.bottom-sheet-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 24px; 
    border-bottom: 1px solid #ccc; 
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none;
    user-select: none; 
    flex-shrink: 0;
}

.bottom-sheet-header h3 { font-size: 18px; font-weight: bold; margin: 0; }
.bottom-sheet-header button { border: none; background: none; cursor: pointer; padding: 8px; border-radius: 4px; }
.bottom-sheet-header button:hover { background: #f0f0f0 }
.bottom-sheet-header button:active { background: #e0e0e0 }
.bottom-sheet-header button:focus { outline: none }

.bottom-sheet-body { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0 10px;
    display: flex;
    flex-direction: column;
}

.bottom-sheet-body-content {
    flex: 1;
    padding: 12px 0;
}

.bottom-sheet-footer { 
    flex-shrink: 0; 
    padding: 12px 24px 24px 24px;
    border-top: 1px solid #eee;
    background: #fff;
}

@media (max-width: 768px) {
    .bottom-sheet-body {
        padding-bottom: 80px; /* fixed-ul 높이 + 여유 공간 */
    }
    
    .bottom-sheet-footer {
        padding-bottom: 24px;
    }
}

/* bottom-sheet-style2 overrides for back button and centered title */
.bottom-sheet.bottom-sheet-style2 .bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid #ccc;
    position: relative;
    flex-shrink: 0;
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none;
    user-select: none; 
}

.bottom-sheet.bottom-sheet-style2 .bottom-sheet-header button:first-child {
    /* Back button - positioned on the left */
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
	display: flex;
    align-items: center;
    z-index: 1;
}

.bottom-sheet.bottom.sheet-style2 .bottom-sheet-header h3 {
    /* Title - centered */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    width: calc(100% - 120px); /* Account for button space on both sides */
}

.bottom-sheet.bottom-sheet-style2 .bottom-sheet-header button:last-child {
    /* Preserve existing right-side button positioning for navigation styles */
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}



    /* bottom-sheet-style2 overrides for back button and centered title */
    .bottom-sheet.bottom-sheet-style2 .bottom-sheet-header {
        height: 50px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        border-bottom: 1px solid #ccc;
        position: relative;
    }

    .bottom-sheet.bottom.sheet-style2 .bottom-sheet-header button:first-child {
        /* Back button - positioned on the left */
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
    }

    .bottom-sheet.bottom.sheet-style2 .bottom-sheet-header h3 {
        /* Title - centered */
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        font-size: 18px;
        font-weight: bold;
        text-align: center;
        width: calc(100% - 120px); /* Account for button space on both sides */
    }

    .bottom-sheet.bottom.sheet-style2 .bottom-sheet-header button:last-child {
        /* Preserve existing right-side button positioning for navigation styles */
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
    }

    /* Ensure quick-input-bottom-sheet2 style (left/right navigation) is preserved */
    .bottom-sheet#quick-input-bottom-sheet2 .bottom-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        border-bottom: 1px solid #ccc;
    }

    .bottom-sheet#quick-input-bottom-sheet2 .bottom-sheet-header h3 {
        flex: 1;
        text-align: center;
        margin: 0;
        font-size: 18px;
        font-weight: bold;
    }

/* Golf Course Fullscreen Styles */
.golf-fullscreen-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1200; /* .fixed-ul(99)보다 충분히 높게 설정 */
    display: none;
}

/* Bottom sheet 및 fullscreen layer 내부 버튼들이 .fixed-ul에 가려지지 않도록 추가 설정 */
.bottom-sheet button,
.bottom-sheet .btn,
.golf-fullscreen-layer button,
.golf-fullscreen-layer .btn {
    position: relative;
    z-index: 10; /* 상위 컨테이너의 z-index를 상속받으면서 추가 우선순위 확보 */
}

/* Navigation buttons in bottom sheets */
.bottom-sheet .hole-navigation button,
.bottom-sheet .action-buttons button,
.bottom-sheet .score-buttons-grid button,
.bottom-sheet .score-selection-grid button {
    z-index: 15; /* 중요한 인터랙션 버튼들은 더 높은 우선순위 */
}

.golf-fullscreen-layer.active {
    display: flex;
    flex-direction: column;
}

.golf-course-image-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.golf-course-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.golf-course-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1201;
    pointer-events: none; /* 오버레이는 클릭 이벤트를 받지 않도록 */
}

/* 닫기 버튼을 오버레이 내부에 배치 */
.golf-course-overlay .btn-close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    pointer-events: auto; /* 버튼은 클릭 가능하도록 */
}

.btn-close-fullscreen {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7); /* 배경을 조금 더 진하게 */
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    /* 버튼이 확실히 클릭 가능한 영역에 있도록 최소 크기 보장 */
    min-width: 44px;
    min-height: 44px;
    /* 터치 디바이스에서 더 나은 접근성을 위한 여백 */
    margin: 0;
    /* 브라우저별 호환성을 위한 추가 스타일 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-close-fullscreen:hover {
    background: rgba(0, 0, 0, 0.9); /* 호버 시 더 진한 배경 */
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* 호버 시 그림자 추가 */
}

.btn-close-fullscreen:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-close-fullscreen:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 골프 코스 하단 컨트롤 영역 - 화면 중앙으로 이동 */
.golf-course-bottom-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1201;
}

/* Scorecard Actions */
#view-scorecard-bottom-sheet .scorecard-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #fff;
}

#view-scorecard-bottom-sheet .scorecard-actions .btn {
    flex: 1; /* 버튼들이 동일한 크기로 전체 너비를 채움 */
    min-width: 120px; /* 최소 너비 보장 */
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
    font-size: 14px; /* 적절한 폰트 크기 */
    padding: 12px 16px; /* 충분한 패딩 */
}

/* 모바일에서 버튼 크기 조정 */
@media (max-width: 480px) {
    #view-scorecard-bottom-sheet .scorecard-actions .btn {
        font-size: 12px;
        padding: 10px 12px;
        min-width: 100px;
    }
}

/* btn-secondary-outline 버튼 스타일 정의 및 텍스트 정렬 수정 */
.btn-secondary-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: var(--btn-secondary-color, #3d5afe);
    border: 1px solid var(--btn-secondary-color, #3d5afe);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
    vertical-align: middle;
}

.btn-secondary-outline:hover {
    background: var(--btn-secondary-color, #3d5afe);
    color: #fff;
}

.btn-secondary-outline:active {
    background: var(--btn-secondary-color-active, #3d5afe);
    color: #fff;
    transform: scale(0.98);
}

.btn-secondary-outline:focus {
    outline: 2px solid var(--btn-secondary-color-focus, #3d5afe);
    outline-offset: 2px;
}

/* scorecard-actions 내부의 버튼들을 위한 추가 스타일 */
#view-scorecard-bottom-sheet .scorecard-actions .btn-secondary-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 44px; /* 모바일 터치 타겟 최소 높이 */
}

/* Hole Scoring Bottom Sheet Header Fix */
#hole-scoring-bottom-sheet.bottom-sheet-style2 .bottom-sheet-header {
    height: 60px; /* 높이를 늘려서 버튼과 타이틀이 겹치지 않도록 */
    padding: 8px 16px;
}

#hole-scoring-bottom-sheet.bottom-sheet-style2 .bottom-sheet-header button:first-child {
    /* Prev button - 더 명확한 위치 지정 */
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* 타이틀보다 위에 */
    background: rgba(0, 0, 0, 0.05); /* 약간의 배경색으로 가시성 향상 */
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 44px;
    min-height: 44px;
}

#hole-scoring-bottom-sheet.bottom-sheet-style2 .bottom-sheet-header button:last-child {
    /* Next button - 더 명확한 위치 지정 */
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* 타이틀보다 위에 */
    background: rgba(0, 0, 0, 0.05); /* 약간의 배경색으로 가시성 향상 */
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 44px;
    min-height: 44px;
}

#hole-scoring-bottom-sheet.bottom-sheet-style2 .bottom-sheet-header h3 {
    /* Title - 버튼 공간을 더 확실히 확보 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    justify-content: center;
    width: calc(100% - 140px); /* 버튼 공간을 더 확보 */
    z-index: 5; /* 버튼보다 아래에 */
}

/* 버튼 호버 효과 */
#hole-scoring-bottom-sheet.bottom-sheet-style2 .bottom-sheet-header button:hover {
    background: rgba(0, 0, 0, 0.1);
}

#hole-scoring-bottom-sheet.bottom-sheet-style2 .bottom-sheet-header button:active {
    background: rgba(0, 0, 0, 0.15);
}