/* =================================================================
   profile-card.css
   Zastępuje ŁĄCZNIE:
     • sekcję .profile-head w profile.css
     • sekcję .profile-header-navbar w profile.css
   Usuwa zbędne: .main-profile-head, .profile-foot (placeholder),
     .phn-left-side/.phn-right-side, .additional-info, .ai-h
   ================================================================= */

/* ----------------------------------------------------------------
   KARTA — główny kontener
   ---------------------------------------------------------------- */
.profile-card {
    width: 100%;
    background: var(--deep-steel);
    border: 1px solid var(--slate-steel);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    position: relative;
    z-index: 999;
}

/* ----------------------------------------------------------------
   BANER
   ---------------------------------------------------------------- */
.pc-banner {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px 12px 0 0;
    background-color: var(--graphite);
    overflow: hidden;
}

/* Gradient fade na dole — płynne przejście w sekcję identyt. */
.pc-banner::after {
    content: '';
    position: absolute;
    bottom:0;
    height: 120px;
    width: 100%;

    background: linear-gradient(to bottom,
            transparent 40%,
            rgba(26, 29, 36, 0.44) 78%,
            var(--deep-steel) 100%);
    z-index: 2;
    pointer-events: none;
}

.pc-banner__blur {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ← wypełnia całe tło */
    filter: blur(10px) brightness(0.55) saturate(1.1);
    transform: scale(1.1);
    /* ← ukrywa twarde krawędzie blura */
    z-index: 0;
}

.pc-banner__fill {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* ← obraz w oryginalnym ratio, nie przycinany */
    z-index: 1;
}

/* ── Flaga hosta ─────────────────────────────────────────── */
.pc-host-flag {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.pc-host-flag img {
    width: 36px;
    border-radius: 3px;
    pointer-events: all;
}

/* ── Przycisk report ─────────────────────────────────────── */
.pc-report-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
}

.pc-report-btn button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: var(--custom-pointer, pointer);
    opacity: 0.6;
    transition:
        opacity var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.pc-report-btn button:hover {
    opacity: 1;
    background: rgba(224, 85, 85, 0.15);
    border-color: rgba(224, 85, 85, 0.3);
    transform: scale(1.05);
}

.pc-report-btn button img {
    width: 14px;
    filter: invert(0.7);
}

/* ----------------------------------------------------------------
   IDENTITY — jeden flex-row łączący awatar, info i akcje
   Wysuwa się nad baner dzięki ujemnemu margin-top
   ---------------------------------------------------------------- */
.pc-identity {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 28px 18px;
    margin-top: -54px;
    /* awatar wysuwa się nad baner */
    position: relative;
    z-index: 3;
}

/* ----------------------------------------------------------------
   AWATAR
   ---------------------------------------------------------------- */
.pc-pfp {
    position: relative;
    flex-shrink: 0;
    width: 110px;
    height: 110px;
}

.pc-pfp__frame {
    position: absolute;
    inset: -25px;
    /* ← wychodzi poza wrapper */
    z-index: 2;
    pointer-events: none;
}

.pc-pfp__frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pc-pfp__img {
    inset: 8px;
    width: auto;
    height: auto;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.pc-pfp__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Link edycji avatara (isSelf) */
.pc-pfp__edit {
    /* == dawne #chgpfp */
    position: absolute;
    bottom: 4px;
    right: 4px;
    z-index: 3;
    width: 28px;
    height: 28px;
    background: var(--graphite);
    border: 2px solid var(--deep-steel);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: scale(0.8);
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.pc-pfp--editable {
    cursor: pointer;
}

.pc-pfp--editable:hover .pc-pfp__edit {
    opacity: 1;
    transform: scale(1);
}

.pc-pfp__edit img {
    width: 12px;
    filter: invert(0.85);
}

/* Przyciski relacji (add / pending / friend) */
.pc-pfp__action {
    position: absolute;
    bottom: 2px;
    right: 2px;
    z-index: 3;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--deep-steel);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: var(--custom-pointer, pointer);
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.pc-pfp__action:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}

.pc-pfp__action--add {
    background: var(--main-green);
}

.pc-pfp__action--pending {
    background: #3a4050;
}

.pc-pfp__action--friend {
    background: var(--main-green);
}

.pc-pfp__action img {
    width: 14px;
}

/* ----------------------------------------------------------------
   INFO — nazwa + meta
   ---------------------------------------------------------------- */
.pc-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 2px;
    min-width: 0;
}

.pc-info__name {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

/* .username i .gamer-tag pozostają bez zmian — używają globalne klasy */

.pc-info__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 1px;
}

.pc-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #353b4a;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   AKCJE — prawa strona (follow, flagi, socials, share)
   Wcześniej osobna belka .profile-header-navbar
   ---------------------------------------------------------------- */
.pc-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    /* pcha na prawą stronę */
    padding-bottom: 4px;
    /* wyrównanie z pc-info */
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── Flagi + płeć (gracz) ────────────────────────────────── */
.pc-player-tags {
    display: flex;
    align-items: center;
    gap: 7px;
}

.pc-player-tags img {
    height: 18px;
    opacity: 0.8;
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, .4));
}

/* ── Follow group (host) ─────────────────────────────────── */
.pc-follow-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Social media + share ────────────────────────────────── */
.pc-socials {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pc-socials a {
    display: flex;
}

.pc-socials img {
    width: 26px;
    height: 26px;
    opacity: 0.65;
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.pc-socials a:hover img {
    opacity: 1;
    transform: translateY(-2px);
    filter: none;
}

/* Share button — klasy globalne .share-profile-btn bez zmian */

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Na średnich ekranach akcje schodzą pod awatar+info */
    .pc-identity {
        flex-wrap: wrap;
        padding: 0 20px 16px;
    }

    .pc-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        padding-left: 130px;
        /* wcięcie = szerokość awatara + gap */
        margin-top: -8px;
    }
}

@media (max-width: 586px) {
    .pc-banner {
        height: 140px;
    }

    .pc-identity {
        padding: 0 14px 14px;
        margin-top: -40px;
        gap: 12px;
    }

    .pc-pfp,
    .pc-pfp__img {
        width: 82px;
        height: 82px;
    }

    .pc-pfp__frame{
        inset:-18px;
    }

    .pc-actions {
        padding-left: 94px;
    }

    .pc-host-flag img {
        width: 28px;
    }
}