/* ==========================================================================
   ZEISS Store Manager - Store Finder
   ZEISS Brand Color: #1a1f71 (navy), #0065BD (blue accent)
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

/* 컨테이너 */
.zsm-store-finder {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ==========================================================================
   헤더
   ========================================================================== */

.zsm-header {
    padding: 24px 24px 16px;
    flex-shrink: 0;
}

.zsm-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.zsm-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   검색 영역
   ========================================================================== */

.zsm-search-wrap {
    padding: 16px 24px;
    flex-shrink: 0;
}

.zsm-search-box {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #ccc;
    transition: border-color 0.2s ease;
}

.zsm-search-box:focus-within {
    border-color: #0065BD;
}

.zsm-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 15px;
    color: #333;
    background: transparent;
    min-width: 0;
}

.zsm-search-input::placeholder {
    color: #bbb;
}

.zsm-icon-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease;
}

.zsm-icon-btn:hover {
    color: #0065BD;
    background: rgba(0, 101, 189, 0.06);
}

/* ==========================================================================
   로딩 스피너
   ========================================================================== */

.zsm-loading {
    text-align: center;
    padding: 40px 20px;
}

.zsm-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #e0e0e0;
    border-top-color: #0065BD;
    border-radius: 50%;
    animation: zsm-spin 0.7s linear infinite;
}

@keyframes zsm-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   매장 리스트
   ========================================================================== */

.zsm-scroll-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
}

/* 스크롤바 얇게 */
.zsm-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.zsm-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.zsm-scroll-area::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.zsm-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.zsm-scroll-area {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.zsm-store-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zsm-store-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0px 14px 0px 24px;
    padding: 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 12px;
}

.zsm-store-item:hover {
    background: #f3f5f8;
}

.zsm-store-item.active {
    background: #f3f5f8;
}

.zsm-store-info {
    flex: 1;
    min-width: 0;
}

.zsm-store-name {
    font-size: 18px;
    font-weight: 600;
    color: #141E8D;
    margin: 0 0 6px 0;
    line-height: 1.4;
    word-break: keep-all;
}

.zsm-store-phone {
    font-size: 13px;
    color: #888;
    margin: 0 0 3px 0;
    line-height: 1.5;
}

.zsm-store-phone a {
    color: #888;
    text-decoration: none;
}

.zsm-store-phone a:hover {
    color: #0065BD;
}

.zsm-store-address {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.5;
    word-break: keep-all;
}

/* 링크 화살표 아이콘 */
.zsm-store-link {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
    flex-shrink: 0;
    color: #999;
    text-decoration: none;
    transition: color 0.2s ease;
}

.zsm-store-link:hover {
    color: #0065BD;
}

.zsm-store-link svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   무한 스크롤 추가 로딩
   ========================================================================== */

.zsm-loading-more {
    text-align: center;
    padding: 20px;
}

/* ==========================================================================
   검색 결과 없음
   ========================================================================== */

.zsm-no-results {
    text-align: center;
    padding: 50px 20px;
}

.zsm-no-results p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* 에러 메시지 */
.zsm-error {
    text-align: center;
    color: #cc0000;
    padding: 30px 20px;
    font-size: 14px;
}

/* ==========================================================================
   다음 버튼 (하단 고정)
   ========================================================================== */

.zsm-load-more-wrap {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0;
    background: transparent;
    z-index: 10;
}

.zsm-load-more-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #1a1f71;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 0.5px;
}

.zsm-load-more-btn:hover {
    background: #13165a;
}

.zsm-load-more-btn:disabled {
    background: #999;
    cursor: default;
}

/* ==========================================================================
   반응형
   ========================================================================== */

@media (max-width: 768px) {
    .zsm-store-finder {
        max-width: 100%;
    }

    .zsm-header {
        padding: 20px 20px 14px;
    }

    .zsm-search-wrap {
        padding: 14px 20px;
    }

    .zsm-store-item {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .zsm-header {
        padding: 18px 16px 12px;
    }

    .zsm-title {
        font-size: 18px;
    }

    .zsm-subtitle {
        font-size: 12px;
    }

    .zsm-search-wrap {
        padding: 12px 16px;
    }

    .zsm-search-input {
        font-size: 14px;
    }

    .zsm-store-item {
        padding: 14px 16px;
    }

    .zsm-store-name {
        font-size: 14px;
    }

    .zsm-store-phone,
    .zsm-store-address {
        font-size: 12px;
    }

    .zsm-load-more-btn {
        padding: 14px;
        font-size: 14px;
    }
}
