/* v7/company/index.css - 업소록 목록 페이지 스타일 */

.v7-company-list-page {
    padding: 0;
}

/* 헤더 */
.company-list-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 2px solid #7f1d1d;
    margin-bottom: 16px;
}

.company-list-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #7f1d1d;
    margin: 0;
    white-space: nowrap;
}

.company-list-meta {
    font-size: 0.8em;
    color: #888;
    white-space: nowrap;
}

/*
 * 업소 등록/수정 버튼 — wa-button 컴포넌트
 * 사이트 테마(빨강)에 맞춰 배경은 와인 레드, 글자/아이콘은 파란색.
 * size="small" + 추가 padding 축소로 컴팩트하게 표시한다.
 */
.company-edit-btn {
    margin-left: auto;
    white-space: nowrap;
}

.company-edit-btn::part(base) {
    background-color: #7f1d1d;
    border-color: #7f1d1d;
    color: #ffffff;
    padding: 6px 14px;
    min-height: auto;
    height: auto;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}

.company-edit-btn::part(base):hover {
    background-color: #991b1b;
    border-color: #991b1b;
    color: #ffffff;
}

.company-edit-btn::part(base):focus-visible {
    background-color: #991b1b;
    border-color: #991b1b;
    color: #ffffff;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* 카테고리 필터 */
.company-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding: 10px 0;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.78em;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-chip:hover {
    border-color: #7f1d1d;
    color: #7f1d1d;
    background: rgba(127, 29, 29, 0.05);
}

.category-chip-active {
    background: #7f1d1d;
    color: #fff;
    border-color: #7f1d1d;
}

.category-chip-active:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

/* 업소 목록 그리드 — 데스크탑 3칼럼, 모바일 2칼럼 */
.company-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 업소 카드 */
.company-card {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.company-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(127, 29, 29, 0.15);
}

.company-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.company-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.company-card:hover .company-card-image img {
    transform: scale(1.03);
}

.company-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: #d1d5db;
    background: #f9fafb;
}

.company-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.company-card-name {
    font-size: 0.95em;
    font-weight: 700;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.company-card-title {
    font-size: 0.8em;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.company-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.73em;
    color: #9ca3af;
    margin-top: 2px;
    flex-wrap: wrap;
}

.company-card-category,
.company-card-location {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.company-card-category i,
.company-card-location i {
    font-size: 0.9em;
}

/* 에러/빈 상태 */
.company-list-error {
    padding: 2rem;
    text-align: center;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 8px;
}

.company-list-empty {
    padding: 3rem;
    text-align: center;
    color: #999;
}

.company-list-empty p {
    margin-top: 12px;
}

/* 페이지네이션 (post/list.css와 동일 패턴) */
.company-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
    padding: 16px 0;
}

.company-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    font-size: 0.85em;
    transition: all 0.2s;
}

.company-pagination .page-link:hover {
    border-color: #7f1d1d;
    color: #7f1d1d;
}

.company-pagination .page-current {
    background: #7f1d1d;
    color: #fff;
    border-color: #7f1d1d;
}

/* 반응형 — 태블릿 이하 2칼럼 */
@media (max-width: 991px) {
    .company-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .company-card-image {
        height: 150px;
    }

    .company-list-header {
        flex-wrap: wrap;
    }
}

/* 작은 모바일 — 2칼럼 유지, 간격/크기 축소 */
@media (max-width: 480px) {
    .company-list-grid {
        gap: 10px;
    }

    .company-card-image {
        height: 110px;
    }

    .company-card-body {
        padding: 10px 12px 12px;
    }

    .company-card-name {
        font-size: 0.85em;
    }

    .company-card-title {
        font-size: 0.75em;
    }

    .company-card-meta {
        flex-direction: column;
        gap: 2px;
    }
}
