/* ==========================================================
   search.css — 팀 검색 페이지 전용 스타일
   /teample/team/search.php 에서만 로드됨
   ========================================================== */

/* ── 페이지 래퍼 */
.ts-page {
    background: #F5F6F8;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ── 헤더 */
.ts-header {
    padding: 20px 20px 0;
}

.ts-header__title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 4px;
}

.ts-header__sub {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 0;
}

.ts-header__sub strong {
    color: #16A34A;
    font-weight: 700;
}

/* ── 지역 칩 스크롤 바 */
.ts-region {
    padding: 14px 20px 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ts-region::-webkit-scrollbar {
    display: none;
}

.ts-region__chips {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.ts-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid #E5E7EB;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    flex-shrink: 0;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.ts-chip:active {
    background: #DCFCE7;
    border-color: #86EFAC;
}

.ts-chip.is-active {
    background: #16A34A;
    border-color: #16A34A;
    color: #fff;
}

.ts-chip__cnt {
    font-size: 11px;
    opacity: 0.7;
}

.ts-chip--all {
    font-weight: 700;
    border-color: #D1D5DB;
}

/* ── 검색 필터 폼 */
.ts-filter {
    padding: 12px 20px 0;
}

.ts-filter__row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.ts-filter__row:last-child {
    margin-bottom: 0;
}

.ts-filter__select,
.ts-filter__input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
    color: #111827;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color .12s;
}

.ts-filter__select:focus,
.ts-filter__input:focus {
    border-color: #16A34A;
}

.ts-filter__input::placeholder {
    color: #9CA3AF;
}

.ts-filter__btn {
    height: 44px;
    padding: 0 22px;
    background: #16A34A;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .12s;
    -webkit-tap-highlight-color: transparent;
}

.ts-filter__btn:active {
    background: #15803D;
}

/* ── 결과 영역 */
.ts-results {
    padding: 14px 20px 0;
}

.ts-results__count {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 12px;
    min-height: 18px;
}

.ts-results__count strong {
    color: #111827;
    font-weight: 700;
}

/* ── 팀 카드 그리드 (ajax.list.php 가 #item_area.grid 출력) */
.ts-page #item_area.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ts-page #item_area.grid .li_empty,
.ts-page #item_area.grid .nodata {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #9CA3AF;
    font-size: 14px;
}

/* ── 팀 카드 개별 (ajax.list.php: li > .round > a > .thum + .info) */
.ts-page #item_area.grid > li {
    list-style: none;
}

.ts-page #item_area.grid .round {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
    height: 100%;
}

.ts-page #item_area.grid .round:active {
    transform: scale(0.97);
}

.ts-page #item_area.grid .round > a {
    display: block;
    padding: 14px 12px;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* 로고 썸네일 */
.ts-page #item_area.grid .thum {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.ts-page #item_area.grid .thum img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 팀 이름 */
.ts-page #item_area.grid .info > p {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* 멤버 수 / 다음 일정 */
.ts-page #item_area.grid .s-info {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
}

.ts-page #item_area.grid .s-info i {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #6B7280;
    font-style: normal;
}

.ts-page #item_area.grid .s-info .material-symbols-outlined {
    font-size: 14px;
    color: #9CA3AF;
}

/* 지역 정보 */
.ts-page #item_area.grid .location-info {
    margin-top: 2px;
}

.ts-page #item_area.grid .location-info i {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #6B7280;
    font-style: normal;
}

.ts-page #item_area.grid .location-info .material-symbols-outlined {
    font-size: 14px;
    color: #9CA3AF;
}

/* 가입 상태 뱃지 */
.ts-page #item_area.grid .join-status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #DCFCE7;
    color: #16A34A;
    margin-left: 4px;
    vertical-align: middle;
}

.ts-page #item_area.grid .join-status.pending {
    background: #FEF9C3;
    color: #B45309;
}

/* ── 팀 만들기 CTA (하단 고정) */
.ts-fab {
    position: fixed;
    bottom: 76px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: #16A34A;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
}

.ts-fab:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    color: #fff;
    text-decoration: none;
}

.ts-fab .material-symbols-outlined {
    font-size: 18px;
}

/* ── 반응형: 태블릿 이상 3열 */
@media (min-width: 640px) {
    .ts-page #item_area.grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .ts-page {
        max-width: 800px;
        margin: 0 auto;
    }

    .ts-page #item_area.grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
