/* =========================================================
   vendorprofile.css  ->  public/css/vendorprofile.css
   Web vendor profile = Flutter app BigContainer (glass card)
   ========================================================= */

:root {
    --vp-accent: #8e1b55;
    /* corporateHeaderColor */
    --vp-purple: #501d57;
    --vp-crimson: #9d1d53;
    --vp-amber: #ec9806;
    --vp-ring-seen: #c9c9c9;
    --vp-text-muted: rgba(0, 0, 0, .54);
    /* Cover-page geometry. vendorprofile.js measures the real values and overwrites these on .vp-hero;
       the values below are only the no-JS fallback (everything stays proportional to screen height).
       --vp-pull  : how far the banner runs up behind the sticky header (= header height)
       --vp-area  : visible height below the header, down to the bottom of the viewport
       --vp-scale : card scale so the card keeps its share of --vp-area */
    --vp-pull: 0px;
    --vp-area: 70vh;
    --vp-gap-top: calc(var(--vp-area) * .14);
    --vp-gap-bottom: calc(var(--vp-area) * .12);
    --vp-scale: 1;
}

/* ---------- Hero (vendor banner as full background) ---------- */
.vp-hero {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    /* banner = header-overlap + full visible area: ends exactly at the bottom of the viewport.
       Header is sticky (z-index 999), so it simply covers the top --vp-pull of the banner. */
    min-height: calc(var(--vp-area) + var(--vp-pull));
    margin-top: calc(-1 * var(--vp-pull));
    padding: calc(var(--vp-pull) + var(--vp-gap-top)) 30px var(--vp-gap-bottom);
    background-color: #2a0f2e;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.vp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(80, 29, 87, .35) 0%, rgba(0, 0, 0, .12) 45%, rgba(0, 0, 0, .25) 100%);
    pointer-events: none;
}

/* ---------- Header over the banner (only on pages that contain .vp-hero) ----------
   .xc-header has a white background behind its rounded gradient bar. Remove that white
   so the vendor banner shows behind the header (gradient bar itself stays opaque). */
body:has(.vp-hero) .xc-header {
    background: transparent;
}

/* ---------- Glass card (topLeft/topRight/bottomRight = 20, bottomLeft = 0) ---------- */
.vp-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 340px;
    /* app card is ~343dp wide */
    padding-bottom: 12px;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    border-radius: 20px 20px 20px 0;
    box-shadow: 0 0 2.5px 3px rgba(128, 128, 128, .4);
    zoom: var(--vp-scale);
    transition: none;
    will-change: auto;
}

/* top bar : share + (menu) */
.vp-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
}

.vp-card .vp-share {
    background: none;
    border: 0;
    padding: 6px;
    font-size: 0;
    color: #6d1a49;
    cursor: pointer;
    line-height: 1;
}

.vp-card .vp-share i {
    font-size: 26px;
    color: #6d1a49;
}

/* ---------- Avatar ---------- */
.vp-avatar-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    height: 104px;
}

.vp-avatar-ring {
    --vp-dash-n: 8;
    --vp-dash-step: calc(360deg / var(--vp-dash-n));
    --vp-dash-len: calc(var(--vp-dash-step) * .56);
    --vp-ring-fill: transparent;

    position: relative;
    box-sizing: border-box;
    width: 96px;
    height: 96px;
    padding: 6px;
    border-radius: 50%;
    background: transparent;
}

/* story ring = dashed (same technique as home page .xc-story__ring) */
.vp-avatar-ring.has-story-unseen,
.vp-avatar-ring.has-story-seen {
    --vp-ring-fill: var(--vp-ring-seen);
}

.vp-avatar-ring.has-story-unseen {
    --vp-ring-fill: linear-gradient(225deg, var(--vp-amber), var(--vp-crimson));
}

.vp-avatar-ring.has-story-unseen::before,
.vp-avatar-ring.has-story-seen::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background: var(--vp-ring-fill);
    -webkit-mask:
        radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)),
        repeating-conic-gradient(from calc(var(--vp-dash-len) / -2),
            #000 0 var(--vp-dash-len),
            transparent var(--vp-dash-len) var(--vp-dash-step));
    -webkit-mask-composite: source-in;
    mask:
        radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)),
        repeating-conic-gradient(from calc(var(--vp-dash-len) / -2),
            #000 0 var(--vp-dash-len),
            transparent var(--vp-dash-len) var(--vp-dash-step));
    mask-composite: intersect;
}

.vp-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: .5px solid #9e9e9e;
    background: #fff;
    overflow: hidden;
}

.vp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vp-avatar.is-blur img {
    filter: blur(6px);
    transform: scale(1.15);
    /* hide blurred edges, same as ClipOval + ImageFiltered */
}

.vp-gift {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #ffc107;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

/* ---------- Name / badge / category ---------- */
.vp-info {
    text-align: center;
    padding: 0 8px;
}

.vp-name {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(132, 129, 129, 1);
}

.vp-tier {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.vp-tier i {
    font-size: 26px;
}

.vp-deals-in {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--vp-accent);
    text-shadow: 0 1px 4px rgba(132, 129, 129, 1);
}

/* ---------- Connect button ---------- */
.vp-connect-wrap {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.vp-connect {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 38px;
    border: 0;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--vp-purple), var(--vp-crimson));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    cursor: pointer;
    transition: filter .15s ease;
}

.vp-connect:hover {
    filter: brightness(1.08);
}

.vp-connect p {
    margin: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* the old subscribe gif / grey png is not used in the app style */
.vp-connect img {
    display: none !important;
}

.vp-connect.is-connected,
.vp-connect.is-self {
    background: linear-gradient(45deg, #bdbdbd, #9e9e9e);
}

.vp-connect.is-self {
    cursor: default;
}

.vp-connect.is-connected::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background: url('../images/icon/connected_star_icon.png') center / contain no-repeat;
}

/* Loading state (while follow/unfollow request is running) */
.vp-connect.is-loading {
    pointer-events: none;
    cursor: wait;
    opacity: .85;
}

.vp-connect.is-loading p {
    visibility: hidden;
    /* keep button width, hide label */
}

.vp-connect.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    transform: none;
    background: none;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vp-spin .7s linear infinite;
}

@keyframes vp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Connect state: always show the purple gradient (overrides any inline/JS grey) */
.vp-connect:not(.is-connected):not(.is-self) {
    background: linear-gradient(90deg, var(--vp-purple), var(--vp-crimson)) !important;
}

/* ---------- Stats ---------- */
.vp-stats {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    padding: 23px 8px 18px;
    text-align: center;
}

.vp-stat strong,
.vp-stat strong span {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--vp-accent) !important;
}

.vp-stat>span {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #000;
}

/* elements that open the download modal on tap */
.vp-card .is-tappable {
    cursor: pointer;
}

/* ---------- Location + contact ---------- */
.vp-loc-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 0 12px 0 20px;
}

.vp-ride,
.vp-ride:link,
.vp-ride:visited,
.vp-ride:hover {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--vp-accent) !important;
    text-decoration: none;
    white-space: nowrap;
}

.vp-ride.is-disabled {
    pointer-events: none;
}

.vp-ride .vp-open {
    color: #4caf50;
    font-size: 11px;
}

.vp-ride .vp-pin {
    color: #ea4335;
    font-size: 15px;
}

.vp-branch {
    display: block;
    margin-top: 1px;
    font-size: 9px;
    font-weight: 600;
    color: #000;
}

.vp-contact {
    text-align: center;
}

.vp-contact small {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--vp-accent);
}

.vp-contact a {
    font-size: 9px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
}

/* ---------- Bottom pill (image) ---------- */
.vp-pill {
    display: block;
    margin: 20px 22px 8px;
    line-height: 0;
    text-decoration: none;
}

.vp-pill img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- About text (kept for SEO) ---------- */
.vp-about {
    max-width: 760px;
    margin: 24px auto 8px;
    padding: 0 16px;
    font-family: 'Inter', system-ui, sans-serif;
}

.vp-about h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vp-accent);
}

.vp-about p {
    font-size: .9rem;
    color: #444;
    margin: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 420px) {
    .vp-hero {
        padding-left: 12px;
        padding-right: 12px;
    }

    .vp-name {
        font-size: 21px;
    }
}


/* ---------- Three-dot menu ---------- */
.vp-menu {
    position: relative;
}

.vp-menu-btn {
    background: none;
    border: 0;
    padding: 6px 10px;
    color: #6d1a49;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.vp-menu-list {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 5;
    min-width: 130px;
    padding: 6px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.vp-menu-list[hidden] {
    display: none;
}

.vp-menu-list--left {
    left: 0;
    right: auto;
}

.vp-menu-list button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

.vp-menu-list button:hover {
    background: #f5eef3;
}

/* membership icon image (app: 80 x 30) */
.vp-tier-img {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.vp-tier-img img {
    height: 30px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* make sure theme button styles cannot hide / restyle the dots */
.vp-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #6d1a49 !important;
    background: transparent !important;
}