/**
 * Hello Middleton - Global Professional Refinements
 * Premium styling for directory, profiles, and utility pages.
 *
 * @package BuddyX_Child
 * @since 3.4.0
 */

@layer components {

    /* Neighbor-Owned Badge */
    .hm-neighbor-owned-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: var(--hm-primary-100);
        color: var(--hm-primary-900);
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 0.65rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-top: 8px;
    }

    /* =========================================================================
       BUDDYPRESS PROFILE "SOCIAL ID" CARDS
       ========================================================================= */

    #buddypress #item-header {
        background: var(--hm-bg-elevated);
        border: 1px solid var(--hm-border);
        border-radius: var(--radius-xl);
        padding: var(--space-8);
        box-shadow: var(--shadow-lg);
        position: relative;
        overflow: hidden;
        margin-bottom: var(--space-8);
    }

    #buddypress #item-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, var(--hm-primary), var(--hm-accent));
    }

    #buddypress #item-header-avatar {
        border: 4px solid var(--hm-bg-elevated);
        box-shadow: var(--shadow-md);
        border-radius: 50%;
    }

    #buddypress #item-header-content {
        margin-left: var(--space-6);
    }

    #buddypress h2.user-nicename {
        font-family: var(--font-display);
        font-size: var(--text-3xl);
        color: var(--hm-text);
        margin-bottom: var(--space-2);
    }

    /* Profile Status Dashboard */
    .hm-profile-stats {
        display: flex;
        gap: var(--space-6);
        margin-top: var(--space-4);
        padding-top: var(--space-4);
        border-top: 1px solid var(--hm-border);
    }

    .hm-profile-stat-item {
        display: flex;
        flex-direction: column;
    }

    .hm-profile-stat-value {
        font-family: var(--font-mono);
        font-weight: 700;
        font-size: var(--text-lg);
        color: var(--hm-primary);
    }

    .hm-profile-stat-label {
        font-size: var(--text-xs);
        color: var(--hm-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    /* =========================================================================
       HIGH-END FORM INTERACTIONS
       ========================================================================= */

    .hm-form-intake input:focus,
    .hm-form-intake textarea:focus {
        background: white !important;
        border-color: var(--hm-primary) !important;
        box-shadow: 0 0 0 4px var(--hm-primary-100) !important;
        transform: translateY(-1px);
    }

    /* Animated Checkmarks for Success States */
    .hm-success-check {
        width: 80px;
        height: 80px;
        margin: 0 auto var(--space-4);
    }

    .hm-success-check path {
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
        animation: checkmark-draw 0.6s ease-in-out forwards;
    }

    @keyframes checkmark-draw {
        to { stroke-dashoffset: 0; }
    }

    /* =========================================================================
       UTILITY PAGES (Privacy, Terms)
       ========================================================================= */

    .page-template-default .entry-title,
    .page .entry-title {
        font-family: var(--font-display);
        font-size: var(--text-4xl);
        text-align: center;
        margin-bottom: var(--space-10);
        position: relative;
    }

    .page-template-default .entry-title::after {
        content: '';
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: var(--hm-primary);
        border-radius: var(--radius-full);
    }

    @media (max-width: 768px) {
        #buddypress #item-header {
            padding: var(--space-6);
            text-align: center;
        }
        
        #buddypress #item-header-content {
            margin-left: 0;
            margin-top: var(--space-4);
        }

        .hm-profile-stats {
            justify-content: center;
            gap: var(--space-4);
        }
    }
}
