/* ============================================================
 * pharmacy-section.css
 * .list-box 안에 인라인으로 표시되는 약국찾기 UI
 * 한독 메인 find_ph_pop 스타일과 완전 동일하게 맞춤
 * ============================================================ */

/* list-box 내부 전체 감싸는 박스 */
.list-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ─── find_ph_pop 동일 스타일 ─── */
.list-box h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
    padding: 20px 20px 0;
}

.list-box .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    grid-template-rows: auto;
    gap: 12px;
    margin: 0 20px 16px;
    align-items: end;
}

.list-box .form-group {
    display: flex;
    flex-direction: column;
}

.list-box .form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
}

.list-box select {
    padding: 9px 10px;
    height: 36px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

.list-box input[type="text"] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

.list-box input[type="text"]:focus,
.list-box select:focus {
    outline: none;
    border-color: #999;
}

.list-box .search-btn {
    grid-column: 3;
    grid-row: 1 / 2;
    height: 44px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.list-box .search-btn:hover {
    background: #333;
}

.list-box .result-info {
    font-size: 14px;
    color: #444;
    margin: 0 20px 10px;
}

.list-box .table-container {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid #ddd;
    margin: 0;
}

.list-box .result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.list-box .result-table th {
    position: sticky;
    top: 0;
    background-color: #f5f5f5;
    z-index: 1;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: #1E1E1E;
    border-bottom: 1px solid #ddd;
}

.list-box .result-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    color: #333;
}

.list-box .pharmacy-name {
    font-weight: 600;
}

.list-box .pharmacy-address {
    font-size: 12px;
    text-align: left;
}

.list-box .pharmacy-address a {
    color: #1a73e8;
    text-decoration: none;
}

.list-box .pharmacy-address a:hover {
    text-decoration: underline;
}

.list-box .pharmacy-phone {
    font-size: 12px;
}

.list-box .pharmacy-product {
    font-size: 12px;
}

/* 빈 결과 */
.ph-empty {
    text-align: center !important;
    padding: 24px !important;
    color: #888;
}

/* 페이징 — 한독 메인 .paging-container 동일 */
#ph_paging {
    clear: both;
    text-align: center;
    font-size: 0;
    margin: 0;
    padding: 8px 0;
    position: relative;
    border-top: 1px solid #eee;
}

#ph_paging > a {
    font-weight: 400;
    display: inline-block;
    vertical-align: middle;
    height: 26px;
    line-height: 26px;
    width: 26px;
    text-align: center;
    font-size: 11px;
    text-indent: -100px;
    overflow: hidden;
}

#ph_paging > a.prev {
    background: url(../images/common/board_btn_prev.svg) no-repeat center center;
}

#ph_paging > a.prev:hover {
    background-image: url(../images/common/board_btn_prev_hover.svg);
}

#ph_paging > a.next {
    background: url(../images/common/board_btn_next.svg) no-repeat center center;
}

#ph_paging > a.next:hover {
    background-image: url(../images/common/board_btn_next_hover.svg);
}

#ph_paging > ul {
    display: inline;
    margin: 0 5px;
    vertical-align: middle;
}

#ph_paging > ul li {
    display: inline-block;
    font-size: 14px;
    margin: 0 1px;
}

#ph_paging > ul li a {
    display: block;
    padding: 0 10px;
    line-height: 30px;
    height: 30px;
    color: #1E1E1E;
    font-weight: 500;
    text-decoration: none;
}

#ph_paging > ul li.selected a {
    font-weight: bold;
    color: #fff;
    background: #1E1E1E;
    border-radius: 15px;
}

#ph_paging > ul li:hover a {
    text-decoration: underline;
}

/* 모바일 반응형 */
@media (max-width: 600px) {
    .list-box .form-grid {
        grid-template-columns: 1fr;
        margin: 0 12px 12px;
    }

    .list-box .search-btn {
        grid-column: 1;
        width: 100%;
        grid-row: auto;
    }

    .list-box h2 {
        padding: 12px 12px 0;
        font-size: 16px;
    }

    .list-box .result-info {
        margin: 0 12px 8px;
    }

    .list-box .result-table th:nth-child(4),
    .list-box .result-table td:nth-child(4) {
        display: none;
    }
}
