
/* =========================================================
   LINK NA BIO PRO — PROFILE COVER CARD PRO
   Atua somente no card principal detectado pelo JS.
   ========================================================= */

html.lnbp-pccp-active .lnbp-pccp-card {
    position: relative !important;
    isolation: isolate !important;
    overflow: visible !important;
    min-height: calc(var(--pccp-card-min-h) * 1px) !important;
    border-radius: calc(var(--pccp-card-radius) * 1px) !important;
    border: calc(var(--pccp-border-w) * 1px) solid var(--pccp-border-color) !important;
    padding:
        calc(var(--pccp-pad-top) * 1px)
        calc(var(--pccp-pad-side) * 1px)
        calc(var(--pccp-pad-bottom) * 1px) !important;
    background: transparent !important;
    box-shadow: 0 24px calc((20 + var(--pccp-shadow)) * 1px) rgba(0,0,0,calc(.12 + (var(--pccp-shadow) / 220))) !important;
    text-align: var(--pccp-align) !important;
    box-sizing: border-box !important;
}

/* Camada de fundo real do card — atrás de TODO o conteúdo */
html.lnbp-pccp-active .lnbp-pccp-card > .lnbp-pccp-bg {
    position: absolute !important;
    inset: 0 !important;
    z-index: -3 !important;
    overflow: hidden !important;
    border-radius: inherit !important;
    pointer-events: none !important;
    background: var(--pccp-bg-color) !important;
}

html.lnbp-pccp-active .lnbp-pccp-card > .lnbp-pccp-bg .lnbp-pccp-bg-image {
    position: absolute;
    inset: 0;
    background-image: var(--pccp-bg-image);
    background-repeat: no-repeat;
    background-position:
        calc(var(--pccp-bg-x) * 1%)
        calc(var(--pccp-bg-y) * 1%);
    background-size: var(--pccp-bg-size);
    opacity: calc(var(--pccp-bg-opacity) / 100);
    transform: scale(calc(var(--pccp-bg-zoom) / 100));
    transform-origin:
        calc(var(--pccp-bg-x) * 1%)
        calc(var(--pccp-bg-y) * 1%);
}

html.lnbp-pccp-active .lnbp-pccp-card > .lnbp-pccp-bg .lnbp-pccp-overlay {
    position: absolute;
    inset: 0;
    background: var(--pccp-overlay-color);
    opacity: calc(var(--pccp-overlay-opacity) / 100);
}

html.lnbp-pccp-active .lnbp-pccp-card > .lnbp-pccp-bg .lnbp-pccp-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        calc(var(--pccp-gradient-direction) * 1deg),
        var(--pccp-grad-start) 0%,
        var(--pccp-grad-mid) 48%,
        var(--pccp-grad-end) 100%
    );
}

/* Todos os elementos reais do card ficam acima do fundo */
html.lnbp-pccp-active .lnbp-pccp-card > *:not(.lnbp-pccp-bg) {
    position: relative;
    z-index: 2;
}

/* AVATAR */
html.lnbp-pccp-active .lnbp-pccp-avatar {
    width: calc(var(--pccp-avatar-size) * 1px) !important;
    height: calc(var(--pccp-avatar-size) * 1px) !important;
    max-width: none !important;
    max-height: none !important;
    box-sizing: border-box !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background: var(--pccp-avatar-bg) !important;
    border: calc(var(--pccp-avatar-border-w) * 1px) solid var(--pccp-avatar-border-color) !important;
    overflow: visible !important;
    z-index: 5 !important;
}

html.lnbp-pccp-active .lnbp-pccp-avatar img,
html.lnbp-pccp-active img.lnbp-pccp-avatar {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* MODO CRÍTICO: nunca cortar o avatar */
html.lnbp-pccp-active .lnbp-pccp-avatar.lnbp-pccp-no-crop,
html.lnbp-pccp-active .lnbp-pccp-avatar.lnbp-pccp-no-crop img,
html.lnbp-pccp-active img.lnbp-pccp-avatar.lnbp-pccp-no-crop {
    object-fit: contain !important;
    object-position: center center !important;
    overflow: visible !important;
    clip-path: none !important;
    mask: none !important;
    -webkit-mask: none !important;
}

html.lnbp-pccp-active .lnbp-pccp-avatar-shape-original,
html.lnbp-pccp-active .lnbp-pccp-avatar-shape-original img {
    border-radius: 0 !important;
}

html.lnbp-pccp-active .lnbp-pccp-avatar-shape-rounded,
html.lnbp-pccp-active .lnbp-pccp-avatar-shape-rounded img {
    border-radius: calc(var(--pccp-avatar-radius) * 1px) !important;
}

html.lnbp-pccp-active .lnbp-pccp-avatar-shape-circle,
html.lnbp-pccp-active .lnbp-pccp-avatar-shape-circle img {
    border-radius: 50% !important;
}

/* Quando o usuário escolhe sobreposição, o card continua sem cortar */
html.lnbp-pccp-active .lnbp-pccp-avatar-overlap {
    margin-top: calc(var(--pccp-avatar-overlap) * -1px) !important;
}

/* Título/bio */
html.lnbp-pccp-active .lnbp-pccp-title {
    font-size: calc(var(--pccp-title-size) * 1px) !important;
    line-height: 1.08 !important;
    text-wrap: balance;
}

html.lnbp-pccp-active .lnbp-pccp-bio {
    font-size: calc(var(--pccp-bio-size) * 1px) !important;
    line-height: 1.5 !important;
    text-wrap: pretty;
}

/* A capa antiga pode ser escondida sem ser removida do sistema */
html.lnbp-pccp-active .lnbp-pccp-hide-original-cover {
    display: none !important;
}

/* transparent realmente transparente */
html.lnbp-pccp-active .lnbp-pccp-mode-transparent > .lnbp-pccp-bg {
    background: transparent !important;
}
html.lnbp-pccp-active .lnbp-pccp-mode-transparent > .lnbp-pccp-bg .lnbp-pccp-bg-image,
html.lnbp-pccp-active .lnbp-pccp-mode-transparent > .lnbp-pccp-bg .lnbp-pccp-overlay,
html.lnbp-pccp-active .lnbp-pccp-mode-transparent > .lnbp-pccp-bg .lnbp-pccp-gradient {
    display: none !important;
}

/* cor sólida */
html.lnbp-pccp-active .lnbp-pccp-mode-solid > .lnbp-pccp-bg .lnbp-pccp-bg-image,
html.lnbp-pccp-active .lnbp-pccp-mode-solid > .lnbp-pccp-bg .lnbp-pccp-gradient {
    display: none !important;
}

/* degradê puro */
html.lnbp-pccp-active .lnbp-pccp-mode-gradient > .lnbp-pccp-bg .lnbp-pccp-bg-image {
    display: none !important;
}

@media (max-width: 640px) {
    html.lnbp-pccp-active .lnbp-pccp-card {
        min-height: auto !important;
        padding-left: max(16px, calc(var(--pccp-pad-side) * .7px)) !important;
        padding-right: max(16px, calc(var(--pccp-pad-side) * .7px)) !important;
    }

    html.lnbp-pccp-active .lnbp-pccp-avatar {
        width: calc(var(--pccp-avatar-size-mobile) * 1px) !important;
        height: calc(var(--pccp-avatar-size-mobile) * 1px) !important;
    }

    html.lnbp-pccp-active .lnbp-pccp-title {
        font-size: calc(var(--pccp-title-size-mobile) * 1px) !important;
    }

    html.lnbp-pccp-active .lnbp-pccp-bio {
        font-size: calc(var(--pccp-bio-size-mobile) * 1px) !important;
    }
}
