/* ==========================================================================
   NivaasMart plan rings — the ring around a member's photo / logo shows the
   plan they bought (no "Gold member" text needed):

     no plan   → no ring at all (plain photo)
     Silver    → polished steel ring        + small ✦ silver badge
     Gold      → shining gold ring          + ★ gold badge
     Diamond   → icy, glowing diamond ring  + 💎 badge
     Custom    → royal purple-pink-amber    + 👑 badge (the biggest plan)
     Plus      → coral sunset (rose-orange)  + ✚ badge (a plan + ADD-ONS — the member's own
                 plan made from add-ons; told apart from a real Custom plan)

   Brokers & professionals: smooth ROUND ring.
   Developers (.nm-ring-dev): their OWN colours, on a rounded SQUARE logo
   with a smooth, still metallic ring (no moving stripes) — told apart from a broker at a glance:
     Silver  → Titanium   (steel-blue)
     Gold    → Rose gold  (copper-pink)
     Diamond → Sapphire   (bright blue, glowing)
     Custom  → Royal      (navy + gold, glowing)
   The logo always sits fully INSIDE the ring on white (never cut, never under the ring).

   The ring is drawn by ::after on top of the photo edge, so it shows even
   when the photo fills the whole circle; the badge is ::before.
   ========================================================================== */

.nm-ring { --rw: 4px; --ring: transparent; --c1: transparent; --c2: transparent; }
.nm-ring-silver  { --ring: conic-gradient(from 210deg, #6B7280, #F9FAFB, #9CA3AF, #FFFFFF, #4B5563, #E5E7EB, #6B7280);
                   --c1: #6B7280; --c2: #D1D5DB; --bd-bg: linear-gradient(135deg, #F9FAFB, #9CA3AF); --bd-fg: #374151; --bd: "✦"; }
.nm-ring-gold    { --ring: conic-gradient(from 200deg, #A16207, #FDE68A, #D4A017, #FFF7D1, #B8860B, #FCD34D, #A16207);
                   --c1: #B8860B; --c2: #FDE68A; --bd-bg: linear-gradient(135deg, #FDE68A, #D4A017); --bd-fg: #fff; --bd: "★"; }
.nm-ring-diamond { --ring: conic-gradient(from 20deg, #E0F7FF, #38BDF8, #A5B4FC, #F0ABFC, #22D3EE, #E0F7FF);
                   --c1: #0EA5E9; --c2: #C7D2FE; --bd-bg: #fff; --bd-fg: #0EA5E9; --bd: "💎"; }
.nm-ring-custom  { --ring: conic-gradient(from 0deg, #7C3AED, #DB2777, #F59E0B, #7C3AED);
                   --c1: #7C3AED; --c2: #F59E0B; --bd-bg: #fff; --bd-fg: #7C3AED; --bd: "👑"; }
.nm-ring-plus    { --ring: conic-gradient(from 0deg, #E11D48, #FB7185, #F97316, #FDBA74, #E11D48);
                   --c1: #E11D48; --c2: #F97316; --bd-bg: linear-gradient(135deg, #F43F5E, #F97316); --bd-fg: #fff; --bd: "✚"; }

/* the ring itself */
.nm-ring-silver::after, .nm-ring-gold::after, .nm-ring-diamond::after, .nm-ring-custom::after, .nm-ring-plus::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: var(--rw);
    background: var(--ring); pointer-events: none; z-index: 3;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
/* developer: striped ring (same plan colours), rounded square */
/* developer plan colours (different from brokers / professionals) */
.nm-ring-dev.nm-ring-silver  { --c1: #1E3A5F; --c2: #A5C8F0; --c3: #E8F1FB; --bd-bg: linear-gradient(135deg, #E8F1FB, #5B84B1); --bd-fg: #fff; --bd: "✦"; --glow: rgba(91, 132, 177, .28); }
.nm-ring-dev.nm-ring-gold    { --c1: #9F4A3C; --c2: #F2B8A0; --c3: #FFE9DE; --bd-bg: linear-gradient(135deg, #FFD9C7, #C46A55); --bd-fg: #fff; --bd: "★"; --glow: rgba(196, 106, 85, .3); }
.nm-ring-dev.nm-ring-diamond { --c1: #1D4ED8; --c2: #93C5FD; --c3: #EFF6FF; --bd-bg: #fff; --bd-fg: #1D4ED8; --bd: "💎"; --glow: rgba(37, 99, 235, .3); }
.nm-ring-dev.nm-ring-plus    { --c1: #BE123C; --c2: #FB923C; --c3: #FFF1F2; --bd-bg: linear-gradient(135deg, #E11D48, #F97316); --bd-fg: #fff; --bd: "✚"; --glow: rgba(244, 63, 94, .22); }
.nm-ring-dev.nm-ring-custom  { --c1: #1E1B4B; --c2: #4F46E5; --c3: #C7D2FE; --bd-bg: linear-gradient(135deg, #312E81, #4F46E5); --bd-fg: #fff; --bd: "★"; --glow: rgba(79, 70, 229, .14); }
.nm-ring-dev.nm-ring-silver::after, .nm-ring-dev.nm-ring-gold::after,
.nm-ring-dev.nm-ring-diamond::after, .nm-ring-dev.nm-ring-custom::after, .nm-ring-dev.nm-ring-plus::after {
    background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
    animation: none !important;
}
.nm-ring-dev.nm-ring-silver, .nm-ring-dev.nm-ring-gold, .nm-ring-dev.nm-ring-diamond, .nm-ring-dev.nm-ring-custom, .nm-ring-dev.nm-ring-plus {
    box-shadow: 0 4px 14px rgba(15, 23, 42, .12), 0 0 0 1px var(--glow) !important;
}
.nm-ring-dev { border-radius: 22% !important; --rw: 3px; }
.nm-ring-dev img { border-radius: inherit; object-fit: contain !important; background: #fff; }
/* with a plan ring: keep the whole logo inside the ring line */
.nm-ring-dev.nm-ring-silver img, .nm-ring-dev.nm-ring-gold img, .nm-ring-dev.nm-ring-diamond img, .nm-ring-dev.nm-ring-custom img, .nm-ring-dev.nm-ring-plus img {
    padding: calc(var(--rw) + 1px) !important; box-sizing: border-box !important;
}

/* the plan badge (corner) */
.nm-ring-silver::before, .nm-ring-gold::before, .nm-ring-diamond::before, .nm-ring-custom::before, .nm-ring-plus::before {
    content: var(--bd); position: absolute; right: 2%; bottom: 2%; z-index: 4;
    width: 22px; height: 22px; border-radius: 50%; background: var(--bd-bg); color: var(--bd-fg);
    display: flex; align-items: center; justify-content: center; font: 700 12px/1 system-ui, sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22); border: 2px solid #fff; box-sizing: border-box;
}
.nm-ring-dev::before { border-radius: 7px !important; }

/* extra glow for the two top plans */
.nm-ring-diamond { box-shadow: 0 8px 22px rgba(23, 37, 84, .18), 0 0 0 3px rgba(56, 189, 248, .22) !important; }
.nm-ring-custom  { box-shadow: 0 8px 22px rgba(23, 37, 84, .18), 0 0 0 3px rgba(219, 39, 119, .2) !important; }
.nm-ring-gold    { box-shadow: 0 8px 20px rgba(161, 98, 7, .18) !important; }
.nm-ring-plus    { box-shadow: 0 8px 22px rgba(23, 37, 84, .16), 0 0 0 3px rgba(244, 63, 94, .16) !important; }

/* elements that were not positioned yet need it for the ring layer */
.bkp-hero-photo.nm-ring, .dvp-hero-logo.nm-ring, .dvn-logo-box.nm-ring, .hv2-tp-dev-logo.nm-ring { position: relative; }

/* sizes: smaller photos get a thinner ring and smaller (or no) badge */
.hv2-spot-av.nm-ring, .hv2-tp-dev-logo.nm-ring { --rw: 2px; }
/* small photos keep the plan badge too (✚ add-ons, 👑, 💎 …) — same ring + badge everywhere, just smaller */
.hv2-spot-av.nm-ring::before, .hv2-tp-dev-logo.nm-ring::before { width: 15px; height: 15px; font-size: 8px; right: -4px; bottom: -4px; border-width: 1.5px; }
.hv2-spot-av.nm-ring, .hv2-tp-dev-logo.nm-ring { overflow: visible !important; }
.nld-av.nm-ring, .hv2-handpick-logo.nm-ring, .dvr-card-logo.nm-ring { --rw: 3px; }
.hv2-handpick-logo.nm-ring::before, .dvr-card-logo.nm-ring::before, .hv2-devshow2-logo.nm-ring::before {
    width: 18px; height: 18px; font-size: 10px; right: -2px; bottom: -2px;
}
/* "Brokers / Professionals in <city>" cards: ring on the outer edge, white gap, photo;
   the plan badge is centred ON the ring line (45° bottom-right) so it looks fixed to it */
.nld-av.nm-ring::after { inset: 0; }
.nld-av.nm-ring::before { width: 24px; height: 24px; font-size: 12px; right: -1px; bottom: -1px; border-width: 2.5px; }
.bkp-hero-photo.nm-ring, .dvn-logo-box.nm-ring, .dvp-hero-logo.nm-ring { --rw: 5px; }
.bkp-hero-photo.nm-ring::before, .dvn-logo-box.nm-ring::before, .dvp-hero-logo.nm-ring::before { width: 28px; height: 28px; font-size: 15px; }
/* let the badge sit on the edge where the box allows it */
.nld-av.nm-ring, .abp-ava.nm-ring, .bkr-person-avatar.nm-ring { overflow: visible !important; }
.bkr-person-avatar.nm-ring img { border-radius: 50%; }

/* "Plan" chip for list cards / profiles (optional) */
.nm-plan-chip { display: inline-flex; align-items: center; gap: 4px; font: 700 11px/1 Inter, system-ui, sans-serif; padding: 4px 9px; border-radius: 99px; }
.nm-plan-chip.silver  { background: #F3F4F6; color: #374151; border: 1px solid #D1D5DB; }
.nm-plan-chip.gold    { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.nm-plan-chip.diamond { background: #E0F2FE; color: #0369A1; border: 1px solid #7DD3FC; }
.nm-plan-chip.plus    { background: linear-gradient(90deg, #FFF1F2, #FFF7ED); color: #BE123C; border: 1px solid #FDA4AF; }
.nm-plan-chip.custom  { background: linear-gradient(90deg, #F5F3FF, #FDF2F8); color: #6D28D9; border: 1px solid #C4B5FD; }
.pd2-dev-logo.nm-ring, .nmpd-dev-logo.nm-ring { position: relative; overflow: visible !important; --rw: 3px; }
.pd2-dev-logo.nm-ring img, .nmpd-dev-logo.nm-ring img { border-radius: inherit; }
.pd2-dev-logo.nm-ring::before, .nmpd-dev-logo.nm-ring::before { width: 18px; height: 18px; font-size: 10px; right: -4px; bottom: -4px; }
.hv2-devshow2-logo.nm-ring, .hv2-handpick-logo.nm-ring, .dvr-card-logo.nm-ring { overflow: visible !important; }
.hv2-devshow2-logo.nm-ring img, .hv2-handpick-logo.nm-ring img, .dvr-card-logo.nm-ring img, .hv2-tp-dev-logo.nm-ring img { border-radius: inherit; }

/* developer plan chips follow the developer colours */
.nm-plan-chip.dev.silver  { background: #E8F1FB; color: #1E3A5F; border-color: #A5C8F0; }
.nm-plan-chip.dev.gold    { background: #FFF1EA; color: #9F4A3C; border-color: #F2B8A0; }
.nm-plan-chip.dev.diamond { background: #EFF6FF; color: #1D4ED8; border-color: #93C5FD; }
.nm-plan-chip.dev.custom  { background: linear-gradient(90deg, #1E3A8A, #312E81); color: #FBBF24; border-color: #1E3A8A; }

/* Prominent Properties (homepage): the agent's small photo — thin ring, small badge on the edge */
.hv2-prop2-broker-avatar.nm-ring { position: relative; overflow: visible !important; --rw: 2px; }
.hv2-prop2-broker-avatar.nm-ring img { border-radius: 50%; }
.hv2-prop2-broker-avatar.nm-ring::before { width: 15px; height: 15px; font-size: 8px; right: -5px; bottom: -5px; border-width: 1.5px; }
