/**
 * Shared styles for the career/position "compass" circles.
 * Used by both [user_demand_circle] (careers) and [user_positions_circle] (positions).
 */

.gb-element-a7eed7a6 {
    row-gap: 5px !important;
}

/* ── Title ─────────────────────────────────────────────────────────── */
.nhp-title {
    text-align: center;
    direction: rtl;
    padding: 8px 20px 8px;
    line-height: 1.35;
}
.nhp-title-top,
.nhp-title-bottom {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
}
.nhp-underline {
    text-decoration: underline;
    text-decoration-color: #E60D64;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.nhp-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    cursor: help;
    vertical-align: baseline;
}
.nhp-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}
.nhp-tooltip-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    padding: 10px 14px;
    background: #1e293b;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 100;
}
.nhp-tooltip-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}
.nhp-tooltip:hover .nhp-tooltip-popup,
.nhp-tooltip:focus-within .nhp-tooltip-popup {
    opacity: 1;
    visibility: visible;
}
.nhp-title-main {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: #E60D64;
    margin: 2px 0 2px;
    letter-spacing: -0.02em;
}

/* ── Compass wrapper ─────────────────────────────────────────────── */
.nhp-compass-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 12px 8px;
    direction: rtl;
}

.nhp-compass {
    position: relative;
    width: 480px;
    height: 480px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 40px rgba(15, 23, 42, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

/* ── Outer ring (thin, elegant) ──────────────────────────────────── */
.nhp-ring {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(226, 232, 240, 0.95);
    pointer-events: none;
    z-index: 2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* ── Center avatar / login ───────────────────────────────────────── */
.nhp-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow:
        0 0 0 3px rgba(230, 13, 100, 0.12),
        0 8px 24px rgba(15, 23, 42, 0.1);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.28s ease, transform 0.28s ease;
    z-index: 4;
}
.nhp-center:hover {
    box-shadow:
        0 0 0 3px rgba(230, 13, 100, 0.2),
        0 10px 32px rgba(15, 23, 42, 0.14);
    transform: translate(-50%, -50%) scale(1.05);
}
.nhp-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.25s ease;
}
.nhp-center:hover img {
    opacity: 0.2;
}
.nhp-center-hover-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    padding: 0 8px;
    line-height: 1.35;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.nhp-center:hover .nhp-center-hover-label {
    opacity: 1;
}
.nhp-center-label {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    padding: 4px 8px 0;
    line-height: 1.3;
}
.nhp-center-icon {
    width: 28px;
    height: 28px;
    color: #94a3b8;
    margin-bottom: 2px;
}

/* ── Sector SVG overlay ──────────────────────────────────────────── */
.nhp-sectors {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 0;
}
.nhp-sector {
    cursor: pointer;
    pointer-events: fill;
    fill-opacity: 0.09;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1;
    stroke-linejoin: round;
    transform-origin: 230px 230px;
    transition: fill-opacity 0.28s ease, transform 0.28s ease;
}
.nhp-compass:has([data-idx="0"]:hover) #nhp-s0,
.nhp-compass:has([data-idx="1"]:hover) #nhp-s1,
.nhp-compass:has([data-idx="2"]:hover) #nhp-s2,
.nhp-compass:has([data-idx="3"]:hover) #nhp-s3,
.nhp-compass:has([data-idx="4"]:hover) #nhp-s4,
.nhp-sector:hover {
    fill-opacity: 0.13;
    transform: scale(1.05);
}

/* Scale node when its sector is hovered */
.nhp-compass:has(#nhp-s0:hover) [data-idx="0"],
.nhp-compass:has(#nhp-s1:hover) [data-idx="1"],
.nhp-compass:has(#nhp-s2:hover) [data-idx="2"],
.nhp-compass:has(#nhp-s3:hover) [data-idx="3"],
.nhp-compass:has(#nhp-s4:hover) [data-idx="4"] {
    transform: translate(-50%, -50%) scale(1.05);
}

/* ── Career node ─────────────────────────────────────────────────── */
.nhp-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 108px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    padding: 2px 6px;
    transition: transform 0.28s ease, filter 0.28s ease,
                left 0.65s cubic-bezier(0.34, 1.4, 0.5, 1),
                top 0.65s cubic-bezier(0.34, 1.4, 0.5, 1);
    z-index: 3;
}
.nhp-node:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Gentle "settle" pop applied to each node as it arrives at its new spot */
@keyframes nhp-node-settle {
    0%   { transform: translate(-50%, -50%) scale(1); }
    45%  { transform: translate(-50%, -50%) scale(1.12); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
.nhp-node.is-resorting {
    animation: nhp-node-settle 0.55s ease;
    z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
    .nhp-node {
        transition: transform 0.28s ease, filter 0.28s ease;
    }
    .nhp-node.is-resorting {
        animation: none;
    }
}

/* SVG progress ring */
.nhp-node-ring {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.06));
    transition: filter 0.28s ease;
}
.nhp-node:hover .nhp-node-ring {
    filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.1));
}
.nhp-ring-track {
    stroke: #e8ecf1;
    stroke-width: 1.75;
}
.nhp-ring-fill {
    transition: stroke-dasharray 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-linecap: round;
    stroke-width: 1.75;
}
.nhp-ring-green  { stroke: #22c55e; }
.nhp-ring-yellow { stroke: #eab308; }
.nhp-ring-red    { stroke: #ef4444; }
.nhp-ring-gray   { stroke: #cbd5e1; }
.nhp-ring-text {
    font-size: 9.5px;
    font-weight: 800;
    text-anchor: middle;
    dominant-baseline: middle;
    letter-spacing: -0.02em;
}
.nhp-ring-subtext {
    font-size: 8px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    fill: #94a3b8;
}
.nhp-ring-text--green  { fill: #16a34a; }
.nhp-ring-text--yellow { fill: #ca8a04; }
.nhp-ring-text--red    { fill: #dc2626; }
.nhp-ring-text--gray   { fill: #94a3b8; }

.nhp-node-name {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: -0.02em;
}
.nhp-node-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nhp-node-offers {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 48%, #2563eb 100%);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow:
        0 1px 2px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.nhp-node:hover .nhp-node-offers {
    box-shadow:
        0 4px 12px rgba(37, 99, 235, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.nhp-node-salary {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.1;
    margin: 0;
    white-space: nowrap;
}

/* ── More (+) node ───────────────────────────────────────────────── */
.nhp-node-more .nhp-node-name { color: #64748b; font-weight: 700; }
.nhp-node-more .nhp-node-offers {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    box-shadow: 0 1px 2px rgba(100, 116, 139, 0.2);
}

/* ── Sort bar ────────────────────────────────────────────────────── */
.nhp-sortbar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    padding: 6px 16px 0;
    z-index: 6;
}
.nhp-sort-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.nhp-sort-btn {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.nhp-sort-btn:hover {
    border-color: #E60D64;
    color: #E60D64;
}
.nhp-sort-btn.is-active {
    background: #E60D64;
    border-color: #E60D64;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(230, 13, 100, 0.25);
}
.nhp-sort-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.nhp-sort-toggle svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Pencil / edit button ────────────────────────────────────────── */
.nhp-edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15,23,42,.08);
    transition: border-color .18s, color .18s, box-shadow .18s, transform .18s;
    padding: 0;
}
.nhp-edit-btn svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}
.nhp-edit-btn:hover {
    border-color: #E60D64;
    color: #E60D64;
    box-shadow: 0 2px 10px rgba(230,13,100,.18);
    transform: scale(1.08);
}

/* ── Career picker overlay ───────────────────────────────────────── */
.nhp-picker {
    position: fixed;
    inset: 0;
    z-index: 9000;
    direction: rtl;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.nhp-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(2px);
}
.nhp-picker-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 82vh;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(15,23,42,.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: nhp-panel-up .28s cubic-bezier(.34,1.3,.5,1);
}
@keyframes nhp-panel-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Header */
.nhp-picker-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    flex-shrink: 0;
}
.nhp-picker-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
}
.nhp-picker-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}
.nhp-picker-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 30px;
    height: 30px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    padding: 0;
    transition: background .18s, color .18s;
}
.nhp-picker-close svg { width: 14px; height: 14px; pointer-events: none; }
.nhp-picker-close:hover { background: #fee2ec; color: #E60D64; }

/* List */
.nhp-picker-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    overflow-y: auto;
    flex: 1;
}
.nhp-picker-item { margin: 0; padding: 0; }
.nhp-picker-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background .15s;
    user-select: none;
}
.nhp-picker-label:hover { background: #f8fafc; }

/* Hide native checkbox */
.nhp-picker-cb { position: absolute; opacity: 0; width: 0; height: 0; }

/* Custom checkbox */
.nhp-picker-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
    order: 1; /* show on left in RTL */
}
.nhp-picker-check::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
    opacity: 0;
    transition: opacity .12s;
}
.nhp-picker-cb:checked ~ .nhp-picker-check {
    border-color: #E60D64;
    background: #E60D64;
}
.nhp-picker-cb:checked ~ .nhp-picker-check::after { opacity: 1; }

.nhp-picker-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    order: 2;
}
.nhp-picker-offers {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg,#60a5fa,#2563eb);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
    order: 3;
}

/* Disabled item (over limit) */
.nhp-picker-label.is-disabled .nhp-picker-name { color: #94a3b8; }
.nhp-picker-label.is-disabled .nhp-picker-check { border-color: #e2e8f0; background: #f8fafc; }
.nhp-picker-label.is-disabled { cursor: not-allowed; }

/* Footer */
.nhp-picker-footer {
    padding: 14px 20px calc(env(safe-area-inset-bottom,0px) + 14px);
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.nhp-picker-apply {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: #E60D64;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .18s;
}
.nhp-picker-apply:hover {
    background: #c50b55;
    box-shadow: 0 4px 16px rgba(230,13,100,.3);
    transform: translateY(-1px);
}
.nhp-picker-apply:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Responsive (mobile / tablet — keep smaller circle) ───────────── */
@media (max-width: 768px) {
    .nhp-compass {
        width: min(92vw, 400px);
        height: min(92vw, 400px);
    }
    .nhp-center {
        width: 72px;
        height: 72px;
    }
    .nhp-node {
        width: 78px;
        padding: 2px 4px;
        gap: 2px;
    }
    .nhp-node-name {
        font-size: 11px;
    }
    .nhp-node-offers {
        padding: 1px 7px;
    }
    .nhp-node-salary {
        font-size: 10px;
    }
    .nhp-node-ring {
        width: 40px !important;
        height: 40px !important;
    }
    .nhp-ring-text { font-size: 8px; }
    .nhp-ring-subtext { font-size: 6px; }
    .nhp-title {
        overflow: visible;
        padding: 60px 16px 8px;
        line-height: 1.2;
    }
    .nhp-title-bottom {
        position: relative;
        overflow: visible;
    }
    .nhp-title-main {
        font-size: 26px;
    }
    .nhp-tooltip {
        position: static;
    }
    .nhp-tooltip-popup {
        left: 50%;
        right: auto;
        bottom: calc(100% - 20px);
        transform: translateX(-50%);
        width: min(260px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
    }
    .floating-btn {
        display: none !important;
    }

    /* Sort bar collapses into a hamburger dropdown */
    .nhp-sort-toggle {
        display: inline-flex;
    }
    .nhp-sort-options {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        flex-direction: column;
        gap: 4px;
        min-width: 220px;
        padding: 8px;
        background: #ffffff;
        border: 1px solid #eef2f7;
        border-radius: 16px;
        box-shadow: 0 10px 34px rgba(15, 23, 42, 0.16);
        z-index: 30;
    }
    .nhp-sortbar.is-open .nhp-sort-options {
        display: flex;
    }
    .nhp-sort-btn {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
    }
}
