/* PandaSale CityDetection — storefront widget / banner / picker.
 * Namespaced under .pscity-* and scoped to its own elements so it never
 * collides with the theme. No external font / icon dependency. */

.pscity-widget {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: inherit;
    white-space: nowrap;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background-color .15s ease;
}
.pscity-widget:hover { background: rgba(0, 0, 0, .06); }
.pscity-widget:focus { outline: 2px solid rgba(51, 122, 183, .5); outline-offset: 1px; }
.pscity-pin { display: inline-flex; color: #e74c3c; }
.pscity-prefix { opacity: .7; }
.pscity-name {
    font-weight: 600;
    border-bottom: 1px dashed currentColor;
}

/* ---------------- Confirmation banner ---------------- */
.pscity-banner {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translate(-50%, 140%);
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 94vw;
    padding: 12px 16px;
    background: #fff;
    color: #222;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
    font-size: 14px;
    transition: transform .28s ease;
}
.pscity-banner.pscity-banner-in { transform: translate(-50%, 0); }
.pscity-banner-q { margin-right: 4px; }
.pscity-banner-q b { white-space: nowrap; }
.pscity-banner-close {
    background: none;
    border: 0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0 2px;
}
.pscity-banner-close:hover { color: #333; }

.pscity-btn {
    border: 0;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 14px;
    cursor: pointer;
}
.pscity-btn-primary { background: #2e8b57; color: #fff; }
.pscity-btn-primary:hover { background: #287049; }
.pscity-btn-link {
    background: none;
    color: #337ab7;
    text-decoration: underline;
    padding: 7px 6px;
}
.pscity-btn-link:hover { color: #23527c; }

/* ---------------- Picker modal ---------------- */
.pscity-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .45);
    align-items: flex-start;
    justify-content: center;
}
.pscity-modal.pscity-modal-open { display: flex; }
body.pscity-noscroll { overflow: hidden; }

.pscity-dialog {
    background: #fff;
    width: 480px;
    max-width: 94vw;
    margin-top: 8vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .3);
    animation: pscity-pop .18s ease;
}
@keyframes pscity-pop { from { transform: translateY(-8px); opacity: .6; } to { transform: none; opacity: 1; } }

.pscity-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}
.pscity-dialog-title { font-size: 17px; font-weight: 600; color: #222; }
.pscity-dialog-close {
    background: none;
    border: 0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #999;
}
.pscity-dialog-close:hover { color: #333; }
.pscity-dialog-body { padding: 16px 18px 20px; }

.pscity-search {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    color: #222;
}
.pscity-search:focus { border-color: #2e8b57; outline: none; }

.pscity-results { margin-top: 8px; max-height: 260px; overflow-y: auto; }
.pscity-result {
    display: flex;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    border-bottom: 1px solid #f1f1f1;
    padding: 9px 4px;
    cursor: pointer;
    font-size: 14px;
    color: #222;
}
.pscity-result:hover { background: #f6fbf7; }
.pscity-result-city { font-weight: 600; }
.pscity-result-region { color: #999; font-size: 12px; }
.pscity-empty { padding: 12px 4px; color: #999; font-size: 14px; }

.pscity-popular-title { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #999; }
.pscity-popular { display: flex; flex-wrap: wrap; gap: 8px; }
.pscity-chip {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 6px 13px;
    font-size: 13px;
    cursor: pointer;
    color: #333;
}
.pscity-chip:hover { background: #e7f3ec; border-color: #2e8b57; color: #1f5e3c; }

@media (max-width: 480px) {
    .pscity-banner { flex-wrap: wrap; bottom: 0; border-radius: 10px 10px 0 0; left: 0; transform: translateY(140%); max-width: 100vw; width: 100%; }
    .pscity-banner.pscity-banner-in { transform: none; }
    .pscity-dialog { margin-top: 0; border-radius: 0; min-height: 100vh; width: 100vw; }
}
