/* css/center.css - 센터 찾기 전용 스타일 */

.center-search-main {
    background-color: #f8fafc;
}

.search-layout-container {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* 좌측: 리스트 패널 */
.search-sidebar {
    flex: 1;
    min-width: 0; /* flex 자식의 줄바꿈 방지 해제 */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Glassmorphism 검색 바 */
.filter-glass-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 100px; /* 헤더 높이 고려 */
    z-index: 10;
}

.search-input-wrap {
    position: relative;
    margin-bottom: 20px;
}

.search-input-wrap svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.center-search-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: white;
}

.center-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(51, 132, 255, 0.1);
}

/* 칩 필터 (가로 스크롤) */
.district-chips-wrap {
    overflow-x: auto;
    padding-bottom: 8px; /* 스크롤바 영역 확보 */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.district-chips-wrap::-webkit-scrollbar {
    height: 6px;
}

.district-chips-wrap::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.district-chips {
    display: flex;
    gap: 10px;
    min-width: max-content;
}

.chip {
    padding: 8px 18px;
    border-radius: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--color-text-main);
}

.chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(51, 132, 255, 0.25);
}

/* 센터 정보 카드 리스트 */
.center-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.center-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.center-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: #dbeafe;
}

.center-card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge-district {
    background: #f1f5f9;
    color: var(--color-text-main);
}

.badge-status {
    background: #dcfce7;
    color: #166534;
}

.center-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 16px;
    line-height: 1.4;
}

.center-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    flex: 1;
}

.center-info-list p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.center-info-list svg {
    margin-top: 2px;
    flex-shrink: 0;
    color: #94a3b8;
}

.center-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.center-card-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.95rem;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: rgba(51, 132, 255, 0.05);
}

/* 우측: 지도 패널 */
.map-panel {
    flex: 1;
    max-width: 50%;
    position: sticky;
    top: 100px; /* 헤더 높이 반영 */
    height: calc(100vh - 120px);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5; /* placeholder 느낌 */
    transition: opacity 0.3s;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    text-align: center;
    padding: 32px;
}

.map-overlay svg {
    color: var(--color-primary);
    margin-bottom: 16px;
}

.map-overlay h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.map-overlay p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

/* 반응형 처리 */
@media (max-width: 992px) {
    .search-layout-container {
        flex-direction: column-reverse; /* 모바일에서는 지도가 위, 리스트가 아래 */
    }

    .map-panel {
        max-width: 100%;
        position: relative;
        top: 0;
        height: 400px; /* 고정 높이 */
    }

    .search-sidebar {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .center-card-list {
        grid-template-columns: 1fr;
    }
}
