/* ==========================================================================
   Phorum - Member Profile Component Styles
   ========================================================================== */

.phc-profile-card {
    background: var(--phc-canvas);
    border: 1px solid var(--phc-border);
    border-radius: var(--phc-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.phc-profile-cover {
    height: 140px;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2), rgba(168, 85, 247, 0.25), rgba(15, 23, 42, 0.95)),
                radial-gradient(circle at 20% 50%, rgba(56, 189, 248, 0.15), transparent 40%);
    position: relative;
    border-bottom: 1px solid var(--phc-border);
}

.phc-profile-header {
    padding: 0 24px 20px 24px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: -52px;
}

.phc-profile-user-group {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.phc-profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.phc-profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 14px;
    object-fit: cover;
    border: 4px solid var(--phc-canvas);
    background: var(--phc-canvas);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    display: block;
}

.phc-profile-online-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--phc-canvas);
    background: #64748b;
}

.phc-profile-online-badge.is-online {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.phc-profile-identity {
    min-width: 0;
    margin-bottom: 4px;
}

.phc-profile-username {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--phc-text);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    word-break: break-word;
}

.phc-profile-badge-link {
    text-decoration: none;
    display: inline-block;
}

.phc-profile-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    flex-shrink: 0;
}

/* Profile Stats Grid */
.phc-profile-stats {
    border-top: 1px solid var(--phc-border);
    background: var(--phc-card);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    text-align: center;
    border-collapse: collapse;
}

.phc-profile-stat-box {
    padding: 14px 10px;
    border-right: 1px solid var(--phc-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.phc-profile-stat-box:last-child {
    border-right: none;
}

.phc-profile-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--phc-text);
    line-height: 1.2;
}

.phc-profile-stat-label {
    font-size: 10.5px;
    color: var(--phc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    font-weight: 600;
}

/* Tabs Navigation */
.phc-profile-tabs {
    display: flex;
    background: var(--phc-card);
    border: 1px solid var(--phc-border);
    border-radius: var(--phc-radius);
    padding: 4px;
    margin-bottom: 18px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.phc-profile-tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--phc-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.phc-profile-tab-btn:hover {
    color: var(--phc-text);
    background: rgba(255, 255, 255, 0.04);
}

.phc-profile-tab-btn.is-active {
    background: var(--phc-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 168, 255, 0.3);
}

.phc-profile-tab-badge {
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
}

.phc-profile-tab-content {
    display: none;
}

.phc-profile-tab-content.is-active {
    display: block;
    animation: fadeInProfileTab 0.2s ease;
}

@keyframes fadeInProfileTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
    .phc-profile-cover {
        height: 110px;
    }

    .phc-profile-header {
        padding: 0 16px 16px 16px;
        flex-direction: column;
        align-items: flex-start;
        margin-top: -42px;
        gap: 12px;
    }

    .phc-profile-user-group {
        width: 100%;
        align-items: flex-end;
    }

    .phc-profile-avatar {
        width: 82px;
        height: 82px;
        border-radius: 12px;
    }

    .phc-profile-username {
        font-size: 20px;
    }

    .phc-profile-actions {
        width: 100%;
        justify-content: stretch;
    }

    .phc-profile-actions > * {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .phc-profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .phc-profile-stat-box:nth-child(3) {
        border-right: none;
    }

    .phc-profile-stat-box:nth-child(4),
    .phc-profile-stat-box:nth-child(5),
    .phc-profile-stat-box:nth-child(6) {
        border-top: 1px solid var(--phc-border);
    }
}

@media (max-width: 480px) {
    .phc-profile-user-group {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .phc-profile-identity {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .phc-profile-header {
        align-items: center;
    }

    .phc-profile-tab-btn {
        min-width: 100px;
        font-size: 12px;
        padding: 8px 10px;
    }
}
