/* CSS 변수 정의 */
:root {
    --z-index-dropdown: 1000;
    --z-index-context-menu: 1001;
    --z-index-fullscreen: 9999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #4a5568 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move 20s linear infinite;
    pointer-events: none;
}

/* Login page theme (from Figma) */
body.login-page {
    background: #334155;
}

body.login-page::before {
    background: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    animation: move 24s linear infinite;
}

@keyframes move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    animation: slideUp 0.6s ease-out;
}

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

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    height: 72px;
    width: auto;
    display: block;
    margin: 0 auto 28px;
}

.logo-section h1 {
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
}

.login-form {
    margin-top: 0;
    display: flex;
    justify-content: center;
}

.input-group {
    margin-bottom: 24px;
    text-align: left;
}

.input-group label {
    display: block;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #2d3748;
}

.input-group input:focus {
    outline: none;
    border-color: #3182ce;
    background: white;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.input-group input::placeholder {
    color: #a0aec0;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 10px 26px rgba(59, 130, 246, 0.28);
}

.login-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(90deg, #2563eb 0%, #0891b2 100%);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.35);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn svg {
    transition: transform 0.3s ease;
}

.login-btn:hover .login-btn-arrow {
    transform: translateX(4px);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 44px;
    border: 1px solid #e2e8f0;
}

.input-with-icon:focus-within .input-icon {
    color: #64748b;
}

.input-with-icon input:focus {
    border-color: #94a3b8;
    box-shadow: none;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -8px 0 8px;
    padding-top: 4px;
}

.remember-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.remember-id input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.footer-text {
    margin-top: 32px;
    text-align: center;
}

.footer-text p {
    color: #a0aec0;
    font-size: 12px;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
    
    .logo-icon {
        font-size: 48px;
    }
}

/* ============================================
   메인 애플리케이션 스타일 (구글맵 포함)
   ============================================ */

/* 메인 컨테이너 */
.main-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 헤더 섹션 */
.header-section {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-top-row {
    display: flex;
    align-items: center;
    position: relative;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 101;
}

.header-content h1 {
    color: black;
    font-size: 24px;
    margin: 0;
    font-weight: 700;
    text-align: left;
    flex-shrink: 0;
    position: absolute;
    left: 20px;
}

.header-brand h1,
.header-content .header-brand h1 {
    position: static;
    left: auto;
}

.app-nav-link {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    z-index: 101;
}
.app-nav-link:hover {
    background: #eee;
    color: #333;
}

.search-bar {
    display: flex;
    gap: 10px;
    flex: 1;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    color: black;
    background: #f5f5f5;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 12px 24px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #000;
}

/* 드롭다운 메뉴 */
.dropdown-menu-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-self: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: black;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
    min-width: 150px;
    white-space: nowrap;
}

.dropdown-btn:hover {
    background: #f5f5f5;
}

.dropdown-btn svg {
    transition: transform 0.3s;
    stroke: black;
}

.dropdown-btn.active svg {
    transform: rotate(180deg);
}

.dropdown-wrapper {
    position: relative;
}

/* 자동완성 입력 필드 스타일 */
.autocomplete-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.autocomplete-input {
    width: 100%;
    padding: 10px 40px 10px 20px;
    background: white;
    color: black;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    min-width: 150px;
    transition: border-color 0.3s;
}

.autocomplete-input:focus {
    outline: none;
    border-color: #4a90e2;
}

.autocomplete-input:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.autocomplete-icon {
    position: absolute;
    right: 12px;
    pointer-events: none;
    stroke: #666;
    transition: transform 0.3s;
}

.autocomplete-menu.show ~ .autocomplete-wrapper .autocomplete-icon {
    transform: rotate(180deg);
}

/* 자동완성 메뉴 하이라이트 항목 */
.dropdown-item.highlight {
    background: #e3f2fd;
    font-weight: 600;
    border-top: 2px solid #4a90e2;
}

.autocomplete-divider {
    height: 1px;
    background: #e6e6e6;
    margin: 4px 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: var(--z-index-dropdown);
}

.dropdown-menu.show {
    display: block;
}

.autocomplete-menu {
    min-width: 100%;
    left: 0;
    transform: none;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* 콘텐츠 섹션 */
.content-section {
    display: flex;
    flex: 1;
    overflow: hidden;
    width: 100%;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* 사이드바 */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e6e6e6;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-content h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 700;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-checkbox {
    display: block;
    padding: 8px 0;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.filter-checkbox input {
    margin-right: 8px;
}

.filter-checkbox:hover {
    color: #d32323;
}

/* 레스토랑 패널 */
.restaurant-panel {
    flex: 3;
    background: white;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #e6e6e6;
    min-width: 300px;
}

.restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e6e6e6;
}

.restaurant-header h2 {
    font-size: 22px;
    color: #333;
    font-weight: 700;
}

/* 페이지당 아이템 개수 선택 */
.items-per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.items-per-page-selector label {
    font-size: 13px;
    color: #666;
}

.items-per-page-selector select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.items-per-page-selector select:hover {
    border-color: #d32323;
}

/* 페이지네이션 공통 스타일 */
.pagination-top,
.pagination-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e6e6e6;
    margin-bottom: 15px;
}

.pagination-bottom {
    border-bottom: none;
    border-top: 1px solid #e6e6e6;
    margin-top: 15px;
    margin-bottom: 0;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.pagination-info strong {
    color: #333;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #d32323;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-number {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination-number:hover {
    background: #f5f5f5;
    border-color: #d32323;
}

.pagination-number.active {
    background: #d32323;
    color: white;
    border-color: #d32323;
    font-weight: 600;
}

.pagination-number.ellipsis {
    border: none;
    cursor: default;
    background: transparent;
}

.pagination-number.ellipsis:hover {
    background: transparent;
}

/* 로딩 인디케이터 */
.pagination-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* 빈 데이터 메시지 */
.empty-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.restaurant-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.restaurant-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    padding-bottom: 50px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 120px;
}

.restaurant-item:hover {
    border-color: #d32323;
    box-shadow: 0 2px 8px rgba(211, 35, 35, 0.1);
}

.restaurant-image {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.place-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.place-item-icon {
    font-size: 60px;
    line-height: 1;
    display: block;
}

.restaurant-info {
    flex: 1;
}

.restaurant-info h4 {
    font-size: 18px;
    color: #0073bb;
    margin-bottom: 8px;
    font-weight: 600;
}

.place-local-name {
    color: #0073bb;
    font-size: 14px;
    margin-bottom: 4px;
}

.restaurant-info h4:hover {
    text-decoration: underline;
}

.restaurant-rating {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.restaurant-address {
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
}

.restaurant-category {
    color: #999;
    font-size: 12px;
}

/* 지도 패널 */
.map-panel {
    flex: 7;
    position: relative;
    background: #e6e6e6;
    min-width: 300px;
}

/* 지도 상단 장소 필터 오버레이 */
.map-place-filters {
    position: absolute;
    top: 110px;
    left: 12px;
    right: auto;
    z-index: var(--z-index-dropdown);
    display: none;
    width: max-content;
    max-width: calc(100% - 140px);
    pointer-events: none;
}

.map-place-filters.visible {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.map-place-filters-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    pointer-events: auto;
}

.map-place-filters-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    padding-right: 6px;
}

.map-place-filters-close {
    border: none;
    background: transparent;
    color: #666;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}

.map-place-filters-close:hover {
    background: #eee;
    color: #111;
}

.map-place-filters-body {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.map-place-type-filters-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.map-place-filters-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-place-filters .filter-btn {
    height: 32px;
    padding: 6px 12px;
    font-size: 13px;
}

.map-place-filters .apply-filter-btn {
    height: 32px;
    padding: 6px 12px;
    font-size: 13px;
}

.map-radius-control {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px 8px;
}

.map-radius-control label {
    font-size: 12px;
    color: #333;
}

.map-radius-control input {
    width: 90px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 6px;
    font-size: 12px;
}

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

.fullscreen-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: var(--z-index-dropdown);
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.fullscreen-toggle-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.fullscreen-toggle-btn svg {
    color: #333;
}

.map-panel.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-index-fullscreen);
}

.map-panel.fullscreen #map {
    width: 100%;
    height: 100%;
}

/* 컨텍스트 메뉴 */
.context-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: var(--z-index-context-menu);
    display: none;
    min-width: 180px;
}

.context-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: #f5f5f5;
}

/* 경로 세부정보 패널 */
.route-details-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: var(--z-index-dropdown);
    min-width: 320px;
    max-width: 400px;
    display: none;
}

.route-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e6e6e6;
}

.route-details-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.route-details-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.route-summary {
    margin-bottom: 20px;
}

.route-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.route-summary-item strong {
    color: #333;
    min-width: 80px;
}

.route-summary-item span {
    color: #666;
}

.route-steps {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e6e6e6;
}

.route-step {
    padding: 12px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* 이동수단 버튼 */
.travel-mode-buttons-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.travel-mode-btn-inline {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    white-space: nowrap;
}

.travel-mode-btn-inline:hover:not(:disabled) {
    background: #e6e6e6;
}

.travel-mode-btn-inline.active {
    background: #d32323;
    color: white;
    border-color: #d32323;
}

.travel-mode-btn-inline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #d0d0d0;
    color: #666;
    border-color: #bbb;
    pointer-events: none;
}

/* ============================================
   필터 버튼 스타일 (TheFork 스타일 참고)
   ============================================ */

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #E3F2FD;
    color: #1976D2;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    height: 36px;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #BBDEFB;
}

/* Place Type 버튼 선택 상태 */
.filter-btn.active {
    background: #2196F3; /* 더 진한 파란색 - 선택된 상태 */
    color: white;
    border: 1px solid #1976D2;
}

.filter-btn.active:hover {
    background: #1976D2;
}

.filter-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 드롭다운 화살표 기본 스타일 - 항상 아래를 향함 */
.filter-btn .dropdown-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transform: rotate(180deg); /* 항상 아래를 향함 */
}

/* 필터 드롭다운 메뉴 */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 330px;
    max-height: 400px;
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.filter-dropdown.show {
    display: flex;
}

.filter-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e6e6e6;
}

.filter-dropdown-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.clear-btn {
    background: none;
    border: none;
    color: #1976D2;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.clear-btn:hover {
    background: #f5f5f5;
}

.filter-list {
    padding: 8px 0;
    max-height: 320px;
    overflow-y: auto;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-item:hover {
    background: #f5f5f5;
}

.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1976D2;
}

.filter-item label {
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    color: #333;
    user-select: none;
}

/* 적용 버튼 */
.apply-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    height: 36px;
    transition: all 0.2s;
    white-space: nowrap;
}

.apply-filter-btn:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.apply-filter-btn:active:not(:disabled) {
    transform: translateY(0);
}

.apply-filter-btn:disabled {
    background: #d0d0d0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.reset-filter-btn {
    background: #666;
}

.reset-filter-btn:hover {
    background: #555;
    transform: translateY(-1px);
}

.add-place-btn {
    background: #28a745;
    border-radius: 8px;
}

.add-place-btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Place Type 필터 컨테이너 */
.place-type-filters-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* 세부 필터 컨테이너 (사용 안 함, 호환성 유지) */
.detailed-filters-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* 세부 필터 버튼 (Place Type 필터와 동일한 스타일) */
.detailed-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #E3F2FD;
    color: #1976D2;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    height: 36px;
    transition: all 0.2s;
    white-space: nowrap;
}

.detailed-filter-btn:hover {
    background: #BBDEFB;
}

.detailed-filter-btn.active {
    background: #90CAF9;
    border: 1px solid #2196F3;
}

.detailed-filter-btn .dropdown-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.detailed-filter-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Place 아이템 스타일 */
.place-closed {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.place-hours {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.place-fee {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.place-guests {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.place-amenities {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.place-parking {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

/* 에러 메시지 스타일 */
.empty-data-message.error {
    color: #c33;
}

/* 모달 오버레이 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f8f8;
    gap: 10px;
}

.modal-footer .btn-cancel {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.modal-footer .btn-save {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.modal-footer .btn-cancel:hover {
    background: #5a6268;
}

.modal-footer .btn-save:hover {
    background: #0056b3;
}

/* 폼 그룹 스타일 */
.form-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #fdfdfd;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.required {
    color: #dc3545;
    margin-left: 4px;
}

/* 편의시설 선택 UI 스타일 */
.amenity-selector-wrapper {
    margin-top: 10px;
}

.amenity-sub-category-select,
.amenity-type-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.amenity-sub-category-select:disabled,
.amenity-type-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.btn-add-amenity {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.btn-add-amenity:hover:not(:disabled) {
    background-color: #0056b3;
}

.btn-add-amenity:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.selected-amenities-list {
    margin-top: 15px;
    min-height: 40px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-amenities-list:empty::before {
    content: "선택된 편의시설이 없습니다.";
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.selected-amenity-item {
    display: inline-block;
}

.amenity-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    border-radius: 20px;
    font-size: 13px;
    gap: 8px;
}

.amenity-name {
    white-space: nowrap;
}

.amenity-remove-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.amenity-remove-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 모달 내 자동완성 드롭다운 위치 조정 */
.modal-body .autocomplete-wrapper {
    position: relative;
}

.modal-body .autocomplete-menu {
    position: absolute;
    width: calc(100% - 24px);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    left: 12px;
    top: calc(100% + 5px);
}

/* 전화번호 입력 필드 스타일 (prefix + input) */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

.phone-prefix {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-right: 1px solid #ccc;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
}

.phone-input-wrapper input[type="text"] {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    outline: none;
}

.phone-input-wrapper input[type="text"]:focus {
    border: none;
    box-shadow: none;
}

.phone-input-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Place 아이템 액션 버튼 */
.place-item-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 10;
}

.place-action-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.place-action-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.place-action-btn:active {
    transform: translateY(0);
}

.place-action-btn.btn-view {
    color: #007bff;
    border-color: #007bff;
}

.place-action-btn.btn-view:hover {
    background: #007bff;
    color: white;
}

.place-action-btn.btn-edit {
    color: #28a745;
    border-color: #28a745;
}

.place-action-btn.btn-edit:hover {
    background: #28a745;
    color: white;
}

.place-action-btn.btn-pin {
    color: #ffc107;
    border-color: #ffc107;
}

.place-action-btn.btn-pin:hover {
    background: #ffc107;
    color: white;
}

/* 더보기 모달 읽기 전용 필드 스타일 */
.view-field-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.view-field-group:last-child {
    border-bottom: none;
}

.view-field-group-with-image {
    /* 이미지 포함 필드는 특별 처리 */
}

.view-label {
    display: block;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-value {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
}

/* 이미지가 포함된 값 영역 (이름 필드용) */
.view-value-with-image {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-image-wrapper {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.view-place-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-place-icon {
    font-size: 48px;
    line-height: 1;
}

.view-name-text {
    flex: 1;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
}

.view-name-subtext {
    color: #666;
    font-size: 13px;
    font-weight: 400;
    margin-top: 2px;
}

.view-value.empty {
    color: #999;
    font-style: italic;
}

.view-value img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 8px;
}

.view-value a {
    color: #007bff;
    text-decoration: none;
}

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

.view-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.view-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

/* 지도 검색창 스타일 */
.map-panel {
    position: relative;
}

.map-search-input {
    position: absolute;
    top: 61px;
    left: 11px;
    width: 240px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    --gmp-text-color: #333;
    --gmp-placeholder-color: #999;
    --gmp-background-color: #fff;
    --gmp-border-color: #ccc;
    --gmp-border-radius: 4px;
}


