/**
 * alm-frontend.css v9 — Custom Dropdown
 */

/* ── Widget Body ─────────────────────────────────────────────── */
.alm-widget-body {
    direction: rtl;
    font-family: inherit;
}

/* ── صف الموقع الحالي ────────────────────────────────────────── */
.alm-loc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.alm-loc-emoji { font-size: 17px; flex-shrink: 0; }

.alm-loc-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.alm-loc-label {
    font-size: 11px;
    color: #999;
    line-height: 1;
}

.alm-loc-city {
    font-size: 15px;
    font-weight: 700;
    color: #1a5276;
    line-height: 1.3;
}

.alm-loc-empty {
    font-size: 13px;
    color: #bbb;
    font-weight: normal;
}

/* زر ✕ إعادة التعيين */
.alm-reset-x {
    background: none;
    border: none;
    color: #bbb;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}
.alm-reset-x:hover { color: #e74c3c; }

/* ── شارة "مرتبة حسب القرب" ─────────────────────────────────── */
.alm-sorted-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #27ae60;
    margin-bottom: 12px;
    font-weight: 500;
}

.alm-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #27ae60;
    flex-shrink: 0;
    animation: alm-pulse 2s infinite;
}

@keyframes alm-pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.4; transform:scale(.75); }
}

/* ── Dropdown Wrap ───────────────────────────────────────────── */
.alm-dropdown-wrap { margin-top: 2px; }

.alm-cities-label {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    margin: 0 0 7px;
}

/* ── Custom Select ───────────────────────────────────────────── */
.alm-custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

/* الزر الظاهر دائماً */
.alm-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: #fff;
    border: 1.5px solid #d5d8dc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: #2c3e50;
    font-family: inherit;
    text-align: right;
    direction: rtl;
    transition: border-color .2s, box-shadow .2s;
}

.alm-select-trigger:hover,
.alm-select-open .alm-select-trigger {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,.12);
    outline: none;
}

.alm-select-icon  { font-size: 15px; flex-shrink: 0; }
.alm-select-text  { flex: 1; text-align: right; }
.alm-select-arrow { font-size: 11px; color: #999; flex-shrink: 0; transition: transform .2s; }
.alm-select-open .alm-select-arrow { color: #3498db; }

/* ── القائمة المنسدلة ────────────────────────────────────────── */
.alm-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    background: #fff;
    border: 1.5px solid #d5d8dc;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;

    /* Scrollbar أنيق */
    scrollbar-width: thin;
    scrollbar-color: #d5d8dc transparent;
}
.alm-select-dropdown::-webkit-scrollbar { width: 5px; }
.alm-select-dropdown::-webkit-scrollbar-track { background: transparent; }
.alm-select-dropdown::-webkit-scrollbar-thumb { background: #d5d8dc; border-radius: 10px; }

.alm-select-dropdown.alm-dropdown-open { display: block; }

/* كل خيار */
.alm-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13.5px;
    color: #2c3e50;
    direction: rtl;
    transition: background .12s;
    position: relative;
}

.alm-select-option:hover { background: #eaf4fd; }

.alm-select-option.alm-option-active {
    background: #eaf4fd;
    color: #1a5276;
    font-weight: 600;
}

/* نقطة اللون الجانبية */
.alm-option-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d5d8dc;
    flex-shrink: 0;
    transition: background .15s;
}
.alm-dot-active,
.alm-option-active .alm-option-dot { background: #3498db; }

/* علامة الصح */
.alm-option-check {
    margin-right: auto;
    color: #3498db;
    font-size: 13px;
    font-weight: 700;
}

/* ── رسالة "لم يضف البائعون" ────────────────────────────────── */
.alm-no-vendors {
    font-size: 12px;
    color: #e74c3c;
    margin: 4px 0 0;
    background: #fdf2f8;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #fadbd8;
}
