/* Google Places Search Container */
#google-places-search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}



/* Map Container */
#map-container {
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

#map {
    width: 100%;
    height: 400px;
}

/* Places Results */
#places-results {
    margin-bottom: 20px;
}

.place-result {
    border: 1px solid #e1e5e9;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    display: none !important; /* 강제로 숨김 */
}

.place-result.active {
    display: block !important; /* JavaScript 제어 강화 */
    animation: fadeInUp 0.5s ease-out;
}
/* 페이지네이션 강제 제어 */
.place-result.hidden,
.place-result:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.place-result.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    margin-bottom: 16px !important;
    padding: 20px !important;
    animation: fadeInUp 0.5s ease-out;
}
/* 페이지네이션용 컨테이너 */
.places-container {
    position: relative;
    width: 100%;
}

.place-result:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #4285f4;
}

.place-result.highlight {
    background-color: #f8f9ff;
    border: 2px solid #4285f4;
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.2);
    transform: translateY(-2px);
}

.place-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.place-header h3 {
    margin: 0;
    color: #202124;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.place-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Favorite Button */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 8px;
    transition: all 0.2s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.favorite-btn:hover {
    background-color: rgba(255, 68, 68, 0.1);
    transform: scale(1.1);
}

.favorite-btn .heart-icon {
    color: #ccc;
    transition: color 0.2s ease;
}

.favorite-btn.active .heart-icon {
    color: #ff4444;
}

/* Place Information */
.place-result p {
    margin: 8px 0;
    color: #5f6368;
    line-height: 1.5;
}

.place-result p:first-of-type {
    font-weight: 500;
    color: #202124;
}

/* Reviews */
.review {
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: 12px;
}

.review p:first-child {
    font-weight: 600;
    color: #202124;
    margin-bottom: 8px;
}

/* 페이지네이션 컨트롤 - JavaScript 제어 */
.pagination-controls {
    display: none; /* 기본 숨김 */
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding: 20px 0;
}

.pagination-controls.active {
    display: flex; /* JavaScript로 활성화 */
}

.pagination-controls button {
    padding: 10px 20px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #3367d6;
    transform: translateY(-1px);
}

.pagination-controls button:disabled {
    background-color: #e8eaed;
    color: #9aa0a6;
    cursor: not-allowed;
    transform: none;
}

#page-info {
    font-weight: 600;
    color: #202124;
    min-width: 80px;
    text-align: center;
}

/* Google Maps Buttons */
.google-maps-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: white;
    border: 2px solid #4285f4;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    color: #4285f4;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 8px 0;
}

.google-maps-save-btn:hover {
    background-color: #4285f4;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.google-maps-save-btn img {
    margin-right: 8px;
    transition: filter 0.3s ease;
}

.google-maps-save-btn:hover img {
    filter: brightness(0) invert(1);
}

/* Agoda Button */
.agoda-btn {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #5392f9 0%, #3a7ae0 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    text-decoration: none;
    margin: 8px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(83, 146, 249, 0.3);
}

.agoda-btn:hover {
    background: linear-gradient(135deg, #3a7ae0 0%, #2851a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(83, 146, 249, 0.4);
}

.agoda-btn img {
    margin-right: 8px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #google-places-search-container {
        padding: 16px;
    }
    
    .place-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .place-header-right {
        align-self: flex-end;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-controls button {
        width: 120px;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info Window Styles */
.gm-style-iw-d {
    overflow: visible !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
}

.gm-style-iw-c {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    max-height: 70vh !important;
    min-height: auto !important;
}

/* 모바일 정보창 최적화 */
@media (max-width: 768px) {
    .gm-style-iw {
        max-height: 75vh !important;
    }
    
    .gm-style-iw-d {
        overflow-y: auto !important;
        padding-bottom: 15px !important;
    }
    
    .gm-style-iw-c {
        max-height: 75vh !important;
        min-height: auto !important;
    }
}
/* 🆕 아고다 위젯 스타일 */
#agoda-widget-auto {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 아고다 위젯 반응형 */
@media (max-width: 768px) {
    #agoda-widget-auto {
        margin: 16px -16px 0 -16px;
        border-radius: 0;
    }
}
/* 아고다 위젯 반응형 */
@media (max-width: 768px) {
    #agoda-widget-auto {
        margin: 16px -16px 0 -16px;
        border-radius: 0;
    }
}

/* ✅ 함수형 검색 로딩 스타일 */
.direct-search-loading {
    animation: fadeInUp 0.5s ease-out;
    border: 1px solid #e3f2fd;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.direct-search-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

/* 함수형 검색 로딩 반응형 */
@media (max-width: 768px) {
    .direct-search-loading {
        margin: 16px -16px 20px -16px;
        border-radius: 8px;
        padding: 30px 20px;
    }
    
    .direct-search-loading div:first-child {
        font-size: 18px !important;
    }
    
    .direct-search-loading div:last-child {
        font-size: 13px !important;
        margin-top: 8px !important;
    }
}

/* 1km 반경 호텔 검색 결과 스타일 강화 */
.radius-hotels-container {
    animation: slideInFromTop 0.6s ease-out;
}

.radius-hotel-item {
    transition: all 0.3s ease;
}

.radius-hotel-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 호텔 사진 슬라이더 최적화 */
.hotel-photo-slider .photo-container img {
    transition: transform 0.3s ease;
}

.hotel-photo-slider:hover .photo-container img {
    transform: scale(1.02);
}

/* 슬라이더 도트 개선 */
.slider-dots .dot:hover {
    background-color: #1976d2 !important;
    transform: scale(1.2);
}

/* 추가 애니메이션 */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 함수형 검색 성공 상태 */
.search-success {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 오류 메시지 스타일 개선 */
.radius-hotels-error {
    animation: shakeX 0.5s ease-out;
}

@keyframes shakeX {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* =================================== */
/* 슬라이더 스타일 완전 제거 */
/* =================================== */
.places-slider-container,
.places-slider-wrapper,
.place-result.slider-item {
    display: none !important;
}

/* 슬라이더 네비게이션 완전 제거 */
.slider-navigation,
.prev-slide,
.next-slide,
.slide-info,
.slide-indicators,
.slide-dot {
    display: none !important;
}

.prev-slide:hover, .next-slide:hover {
    background: #3367d6;
    transform: translateY(-1px);
}

.prev-slide:disabled, .next-slide:disabled {
    background: #e8eaed;
    color: #9aa0a6;
    cursor: not-allowed;
    transform: none;
}

.slide-info {
    font-weight: 600;
    color: #202124;
    font-size: 14px;
}

.slide-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 8px;
    line-height: 1;
    color: transparent;
}

.slide-dot:hover {
    background: #4285f4;
    transform: scale(1.2);
}

.slide-dot.active {
    background: #4285f4;
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .slider-navigation {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .slide-indicators {
        order: -1;
    }
    
    .prev-slide, .next-slide {
        min-width: 100px;
        padding: 10px 20px;
    }
}

/* 🆕 진행바 툴팁 및 숫자 표시 완전 제거 */
.progress-segment {
    /* 툴팁 및 텍스트 표시 방지 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 브라우저 기본 툴팁 완전 제거 */
.progress-segment::after,
.progress-segment::before {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
}

/* 진행바 및 모든 슬라이더 관련 스타일 제거 */
.progress-bar,
.progress-segment,
.slider-navigation-minimal,
.nav-btn,
.slide-counter {
    display: none !important;
}

.progress-segment:hover {
    background: #d1d5db;
    transform: scaleY(1.5);
}

.progress-segment.active {
    background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
    box-shadow: 0 0 8px rgba(66, 133, 244, 0.4);
    transform: scaleY(1.2);
}

/* 현재 위치 표시 화살표 */
.progress-segment.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid white;
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 미니멀 네비게이션 (진행바 바로 아래) */
.slider-navigation-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.nav-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.nav-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.nav-btn:disabled {
    background: #e8eaed;
    color: #9aa0a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.slide-counter {
    font-weight: 600;
    color: #1976d2;
    font-size: 16px;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #e1e5e9;
}

/* 슬라이더 래퍼 */
.places-slider-wrapper {
    display: flex;
    transition: transform 0.4s ease;
    width: 100%;
    height: auto;
    align-items: flex-start;
}

/* 슬라이더 아이템 */
.place-result.slider-item {
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: white;
    height: auto;
    overflow: visible;
    display: block;
    box-sizing: border-box;
    padding: 20px;
}

/* 🆕 모바일 최적화 */
@media (max-width: 768px) {
    .progress-bar {
        padding: 20px 15px;
    }
    
    .progress-segment {
        height: 5px;
        min-height: 5px;
        cursor: pointer;
        position: relative;
    }
    
    /* 모바일에서 터치 영역 확대 */
    .progress-segment::before {
        content: '';
        position: absolute;
        top: -15px;
        left: -2px;
        right: -2px;
        bottom: -15px;
        cursor: pointer;
    }
    
    .slider-navigation-minimal {
        padding: 18px 15px;
        gap: 15px;
    }
    
    .nav-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
        min-width: 100px;
        border-radius: 24px;
        font-weight: 600;
    }
    
    .slide-counter {
        font-size: 18px;
        padding: 10px 18px;
        font-weight: 700;
    }
    
    /* 진행바 숫자 표시 추가 (모바일) */
    .progress-segment.active::before {
        content: attr(data-slide);
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        color: #1976d2;
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 10px;
        font-weight: bold;
        border: 1px solid #1976d2;
    }
}

/* 기존 슬라이더 네비게이션 숨김 */
.slider-navigation {
    display: none !important;
}

/* 🆕 리뷰 더보기 기능 */
.reviews-container {
    max-height: 400px; /* 리뷰 영역 최대 높이 제한 */
    overflow: hidden;
    position: relative;
}

.more-reviews {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.show-more-btn {
    transition: all 0.2s ease;
    width: 100%;
    margin: 15px 0;
}

.show-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 리뷰 텍스트 말줄임 처리 */
.review-text-short {
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .reviews-container {
        max-height: 300px;
    }
    
    .show-more-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* 진행바 관련 모든 스타일이 위에서 display: none으로 처리되어 불필요함 */

.progress-segment:hover::after,
.progress-segment:hover::before {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
}

/* title 속성으로 나타나는 툴팁 제거 */
.progress-segment[title]:hover::after {
    display: none !important;
}

/* 모든 가상 요소 숨김 */
.progress-segment * {
    pointer-events: none;
}

/* 데이터 속성 툴팁 방지 */
.progress-segment[data-slide]:hover {
    position: relative;
}

.progress-segment[data-slide]:hover::after {
    content: none !important;
    display: none !important;
}

/* 추가 안전장치: 모든 텍스트 콘텐츠 숨김 */
.progress-segment::before,
.progress-segment::after {
    content: "" !important;
    display: none !important;
}

/* =================================== */
/* 페이지네이션 전용 스타일 */
/* =================================== */

/* 페이지네이션 컨트롤 기본 숨김 */
.pagination-controls {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding: 20px 0;
}

.pagination-controls.active {
    display: flex !important;
}

/* 현재 페이지 하이라이트 강화 */
.place-result.highlight {
    background-color: #f8f9ff !important;
    border: 2px solid #4285f4 !important;
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.2) !important;
    transform: translateY(-2px) !important;
}

/* 페이지 전환 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모바일 페이지네이션 최적화 */
@media (max-width: 768px) {
    .places-container {
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .place-result.active {
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
    }
    
    .pagination-controls.active {
        padding: 15px 0;
        gap: 15px;
    }
}

/* 강제 슬라이더 스타일 무효화 */
.places-slider-container,
.places-slider-wrapper,
.slider-navigation,
.progress-bar,
.slider-navigation-minimal,
.place-result.slider-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
