/* PH Dealer System v1.1.1 */

.ph-dealer-wrap { margin: 0 0 14px; }

.ph-dealer-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ph-dealer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.08);
    border-radius: 20px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* ── Modal ─────────────────────────────────────────── */
#ph-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    font-family: inherit;
}
#ph-modal.ph-open { display: block; }

.ph-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
}

.ph-modal-box {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    background: #fff;
    border-radius: 14px;
    width: 820px;
    max-width: 96vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

.ph-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid #efefef;
    flex-shrink: 0;
}
.ph-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    font-family: inherit;
}
.ph-modal-close {
    background: #f5f5f5; border: none;
    width: 32px; height: 32px; border-radius: 50%;
    font-size: 20px; cursor: pointer; color: #555;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}
.ph-modal-close:hover { background: #e0e0e0; }

.ph-modal-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* ── Sol panel ────────────────────────────────────── */
.ph-modal-list {
    width: 250px;
    border-right: 1px solid #efefef;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #fafafa;
}

/* Tip tabları – sade, ikonsuz */
.ph-type-tabs {
    display: flex;
    border-bottom: 1px solid #efefef;
    flex-shrink: 0;
    background: #fff;
}

.ph-tab {
    flex: 1;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 11px 4px;
    font-size: 12px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: color .15s, border-color .15s;
    font-family: inherit;
    text-align: center;
    line-height: 1.3;
    margin-bottom: -1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ph-tab:hover { color: #333; }

.ph-tab.ph-tab-active {
    color: var(--wd-btn-bg, #2c6e49);
    border-bottom-color: var(--wd-btn-bg, #2c6e49);
    font-weight: 700;
}

/* Arama */
.ph-search-wrap {
    padding: 10px 12px;
    border-bottom: 1px solid #efefef;
    flex-shrink: 0;
}
.ph-search-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px 7px 30px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 9px center;
    color: #333; outline: none;
}
.ph-search-wrap input:focus { border-color: var(--wd-btn-bg,#2c6e49); }

.ph-modal-list-inner { overflow-y: auto; flex: 1; }

.ph-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12.5px; font-family: inherit; color: #333;
    transition: background .15s, color .15s;
}
.ph-list-item:last-child { border-bottom: none; }

.ph-list-item .ph-list-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: #e8e8e8; color: #666;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.ph-list-item:hover { background: #f0f7f3; color: var(--wd-btn-bg,#2c6e49); }
.ph-list-item.ph-active { background: #e8f5ee; color: var(--wd-btn-bg,#2c6e49); font-weight: 600; }
.ph-list-item.ph-active .ph-list-num { background: var(--wd-btn-bg,#2c6e49); color: #fff; }

.ph-no-results { padding: 20px 14px; font-size: 12px; color: #aaa; text-align: center; }

/* ── Sağ panel ────────────────────────────────────── */
.ph-modal-detail { flex: 1; overflow-y: auto; min-width: 0; display: flex; flex-direction: column; }
.ph-modal-detail-inner { padding: 22px 26px; flex: 1; }

.ph-hint { color: #bbb; text-align: center; margin-top: 60px; font-size: 14px; }

.ph-detail-logo { max-width: 150px; max-height: 70px; object-fit: contain; display: block; margin-bottom: 14px; }

.ph-detail-name { font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 0 0 6px; font-family: inherit; }

.ph-type-badge {
    display: inline-block;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    margin-bottom: 14px; line-height: 1.5;
}
.ph-type-badge.beauty   { background: #fce4ec; color: #c2185b; }
.ph-type-badge.pharmacy { background: #e3f2fd; color: #1565c0; }

.ph-detail-row {
    display: flex; gap: 10px; align-items: flex-start;
    margin-bottom: 12px; font-size: 13.5px; font-family: inherit; color: #444; line-height: 1.5;
}
.ph-detail-row svg { flex-shrink: 0; color: var(--wd-btn-bg,#2c6e49); margin-top: 2px; }

.ph-map-wrap { margin-top: 18px; border-radius: 10px; overflow: hidden; border: 1px solid #e5e5e5; }
.ph-map-wrap iframe { display: block; width: 100%; height: 220px; border: none; }

.ph-loading { text-align: center; padding: 40px; color: #888; font-size: 14px; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
    .ph-modal-box { width:100%; max-width:100%; max-height:100%; border-radius:0; top:0; left:0; transform:none; }
    .ph-modal-body { flex-direction: column; }
    .ph-modal-list { width:100%; border-right:none; border-bottom:1px solid #efefef; max-height:200px; }
    .ph-map-wrap iframe { height: 170px; }
}
