/* Removed @import rules. Ensure base.css, header.css, media-viewer.css, slideshow.css, dialog.css, footer.css, and reactions.css are linked in the HTML where needed. */

body {
    overflow-y: scroll;
}

the-profile {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: 1rem;
}

the-profile div.divider {
    flex: 0 0 1px;
    background-color: rgba(var(--primary-rgb), .25);
}

the-profile .glow-button {
    font-size: 1rem;
}

the-profile div.note {
    flex: 0 0 auto;
    width: 100%;
    max-width: 60rem;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: .5rem;
    padding: 1rem;
    border: 1px solid rgba(var(--primary-rgb), .5);
    background: rgba(0, 0, 0, .75);
    border-radius: .25rem;
    width: calc(100% - 2rem);
    max-width: 60rem;
    align-self: center;
    /* backdrop-filter: blur(1rem); */
    box-shadow: 0px .25rem 1rem 0 rgb(0 0 0 / 50%), inset 0 0 2rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 3));
}
the-profile div.note h1 {
    color: var(--primary-color);
    margin: 0;
    padding: 0;
    font-size: 1rem;
}
the-profile div.note p {
    font-size: .8rem;
    padding: 0;
    margin: 0;
    color: var(--input-color);
    line-height: 1rem;
}
the-profile div.note a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* --- Consolidated Profile Content Block Styles --- */
the-profile .header,
the-profile .profile-content,
the-profile .tabs-content,
the-profile div.note {
    width: calc(100% - 2rem);
    max-width: 60rem;
    align-self: center;
    border: 1px solid rgba(var(--primary-rgb), .5);
    background: rgba(0, 0, 0, .75);
    border-radius: .25rem; /* Applied to all */
    /* backdrop-filter: blur(1rem); */
    box-shadow: 0px .25rem 1rem 0 rgb(0 0 0 / 50%), inset 0 0 2rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 3));
}

the-profile .header {
    /* Specific header styles */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

the-profile .profile-content {
     /* Specific profile-content styles */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

the-profile .tabs-content {
    /* Specific tabs-content styles */
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

the-profile div.note {
     /* Specific note styles */
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: .5rem;
    padding: 1rem;
}
/* --- End Consolidated Profile Content Block Styles --- */


the-profile .profile-info {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
}

the-profile .profile-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--primary-color);
    box-shadow: 0 .5rem 1.5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 2));
}

the-profile .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

the-profile .profile-details {
    display: flex;
    flex-direction: column;
    /* gap: 0.5rem; */
}

the-profile .profile-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    text-shadow: 0 .5rem 1.5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 2));
}

the-profile .profile-username {
    font-size: 1rem;
    color: rgba(var(--secondary-rgb), 0.7);
    font-weight: 600;
    margin: 0;
}

the-profile .profile-stats {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 0.5rem;
}

the-profile .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

the-profile .stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--input-color);
}

the-profile .stat-label {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
}

the-profile .profile-actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

the-profile .profile-actions button {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: #000000;
    border-radius: .25rem;
    padding: .25rem .5rem;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 .25rem .5rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 4));
    text-decoration: none;
    text-shadow: 0 .25rem .75rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 1.5));
    font-size: 1rem;
}

/* Base styles applied above */
/* the-profile .profile-content { ... } */


/* Tabs styling */
/* Base styles applied above */
/* the-profile .tabs-content { ... } */


the-profile .tabs-content .tabs {
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid rgba(var(--primary-rgb), .5);
}

the-profile .tab {
    padding: 1rem 2rem;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0 .5rem 1.5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 2));
}

the-profile .tab.active {
    color: var(--input-color);
    text-shadow: 0 .5rem 1.5rem rgba(var(--input-rgb), calc(var(--glow-intensity) / 2));
}

the-profile .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
    box-shadow: 0 .5rem 1.5rem rgba(var(--secondary-rgb), calc(var(--glow-intensity) / 2));
}

the-profile .tab-content {
    display: none;
    padding: 1rem;
}

the-profile .tab-content.active {
    display: block;
}

/* Grid layout for images */
the-profile .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

the-profile .image-item {
    position: relative;
    border-radius: 0.25rem;
    overflow: hidden;
    aspect-ratio: 1;
}

the-profile .image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .5s;
    opacity: 1;
}

the-profile .image-item.loading img {
    opacity: 0;
}

/* Posts styling */
the-profile .posts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

the-profile .post {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: .25rem;
}

the-profile .post .title {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

the-profile .post .post-context {
    color: rgba(var(--input-rgb), .75);
    font-size: .8rem;
}
the-profile .post .post-context a {
    color: rgba(var(--secondary-rgb), 0.7);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

the-profile .post the-slideshow {
    flex: 0 0 calc(100vh - 14rem);
    max-height: calc(100vh - 14rem);
    margin: .5rem 0;
    object-fit: contain;
    border-radius: .25rem;
    background: #000000;
    border: 1px solid rgba(var(--primary-rgb), .25);
}

the-profile .post .message {
    color: var(--input-color);
}

the-profile .post .meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    margin-top: .25rem;
}

the-profile .post .meta svg {
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0);
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--primary-color);
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), var(--glow-intensity)));
}
the-profile .post .meta svg * {
    pointer-events: none;
}

the-profile .post .meta :not(the-reactions) button {
    padding: .25rem 0;
    margin: 0;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 .5rem 1.5rem rgba(var(--secondary-rgb), calc(var(--glow-intensity) / 2));
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
}

/* --- Consolidated Post Meta Link/Button Styles --- */
the-profile .post .meta :not(the-reactions) button,
the-profile .post .meta a {
    padding: .25rem 0; /* Added from button */
    margin: 0;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 .5rem 1.5rem rgba(var(--secondary-rgb), calc(var(--glow-intensity) / 2));
}
/* Specific button styles */
the-profile .post .meta :not(the-reactions) button {
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
}
/* --- End Consolidated Post Meta Link/Button Styles --- */


the-profile .activity-feed {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1rem;
}

/* Activity feed styling */
the-profile .activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

the-profile .activity-item:last-child {
    border-bottom: none;
}

the-profile .activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), .2);
    color: var(--primary-color);
}

the-profile .activity-details {
    flex: 1;
}
the-profile .activity-action {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
}

the-profile .activity-title {
    color: var(--input-color);
    font-size: 1rem;
    margin: .5rem 0;
}

the-profile .activity-context {
    color: rgba(var(--input-rgb), .75);
    font-size: .8rem;
}
the-profile .activity-context a {
    color: rgba(var(--secondary-rgb), 0.7);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

the-profile .activity-time {
    font-size: 0.8rem;
    color: rgba(var(--input-rgb), 0.7);
    margin-top: 0.25rem;
}

/* Responsive styles */
@media only screen and (max-width: 720px) {

    body {
        gap: .5rem;
    }

    the-profile {
        gap: .5rem;
    }

    the-profile .header {
        width: calc(100% - 1rem);
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
        padding: .5rem;
    }

    the-profile div.note {
        width: calc(100% - 1rem);
        padding: .5rem;
    }

    the-profile .profile-details {
        gap: 0;
    }

    the-profile .profile-name {
        font-size: 1.5rem;
    }

    the-profile .profile-username {
        font-size: .9rem;
    }

    the-profile .profile-stats {
        gap: .5rem;
        margin-top: 0.5rem;
    }

    the-profile .stat-value {
        font-size: 1rem;
    }
    the-profile .stat-label {
        font-size: .65rem;
    }

    the-profile .profile-actions {
        align-self: stretch;
        justify-content: center;
    }

    the-profile .profile-actions button {
        font-size: .8rem;
    }

    the-profile .profile-content {
        width: calc(100% - 1rem);
        padding: .5rem;
    }

    the-profile .tabs-header {
        overflow-x: auto;
    }

    the-profile .tabs-content {
        width: calc(100% - 1rem);
    }

    the-profile .tab-content {
        padding: .5rem;
    }

    the-profile .tab {
        padding: .75rem 1rem;
        white-space: nowrap;
        font-size: .8rem;
    }
    
    the-profile .posts-container {
        gap: .5rem;
    }
    
    the-profile .post-header {
        padding: .5rem;
        gap: .5rem;
    }

    the-profile .post-content {
        padding: .5rem;
        gap: .5rem;
    }

    the-profile .post-footer {
        padding: .5rem;
        gap: .5rem;
    }

    the-profile .post-actions {
        gap: .5rem;
    }

    the-profile .post-action {
        gap: .25rem;
    }

    the-profile .image-grid {
        gap: .5rem;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    the-profile .activity-feed {
        gap: .5rem;
    }
    the-profile .activity-title {
        margin: .25rem 0;
    }
}

@media only screen and (max-width: 480px) {

    the-profile .profile-stats {
        align-self: stretch;
        justify-content: space-around;
    }

    the-profile .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
