/**
 * BTS Profile Unlock Styles
 * Base: 1rem = 10px (Zakra theme)
 * Fonts: Lato (titles), Roboto (text)
 * Primary color: #65b891
 */

/* ==========================================================================
   Back to Directory Link
   ========================================================================== */

.bts-profile-back {
    max-width: 800px;
    margin: 0 auto 1.6rem;
}

.bts-profile-back__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Roboto', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: #65b891;
    text-decoration: none;
    transition: color 0.15s;
}

.bts-profile-back__link:hover {
    color: #0f5240;
    text-decoration: underline;
}

.bts-profile-back__arrow {
    font-size: 1.6rem;
    line-height: 1;
}

/* ==========================================================================
   Hide UM Profile Nav (tabs) & Navbar (messaging buttons)
   ========================================================================== */

.um-profile-nav,
.um-profile-navbar {
    display: none !important;
}

/* ==========================================================================
   Profile Unlock Section
   ========================================================================== */

.bts-profile-unlock {
    max-width: 800px;
    margin: 2.4rem auto 0;
    font-family: 'Roboto', sans-serif;
}

/* Hide cover photo (banner) — not used on BTS */
.um .um-cover,
.um-profile .um-cover,
div.um-cover {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
}

/* Force UM header to stack vertically: avatar centered, name centered, then custom section */
.um-profile .um-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.um-profile .um-profile-photo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 0 auto 1.6rem !important;
    float: none !important;
    display: block !important;
}

/* Ensure photo doesn't overlap name */
.um-profile .um-header-cover {
    display: none !important;
}

.um-profile .um-profile-meta {
    width: 100%;
    text-align: center;
    float: none !important;
    padding-left: 0 !important;
}

/* Hide default UM name — we render it in our custom section */
.um-profile .um-name,
.um .um-name {
    display: none !important;
}

/* Custom name rendered in profile section */
.bts-profile-back__name {
    font-family: 'Lato', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin: 0 0 1.6rem;
}

/* Ensure profile meta clears under the avatar */
.um-profile .um-profile-meta {
    margin-top: 2rem !important;
    clear: both !important;
}

/* ==========================================================================
   Public Section
   ========================================================================== */

.bts-profile-unlock__public {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 2.4rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

/* ==========================================================================
   Field Layout
   ========================================================================== */

.bts-profile-unlock__field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.bts-profile-unlock__label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #65b891;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bts-profile-unlock__value {
    font-size: 1.5rem;
    color: #1f2937;
    font-weight: 500;
}

/* ==========================================================================
   Tags (job hierarchy)
   ========================================================================== */

.bts-profile-unlock__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.bts-profile-unlock__tag {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 500;
    background: #dbeafe;
    color: #1d4ed8;
    line-height: 1.4;
}

.bts-profile-unlock__tag-ancestor {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
}

.bts-profile-unlock__tag-separator {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0 0.3rem;
}

.bts-profile-unlock__tag-leaf {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1d4ed8;
    display: block;
    width: 100%;
}

/* ==========================================================================
   Pills (licence, languages, skills)
   ========================================================================== */

.bts-profile-unlock__pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.bts-profile-unlock__pill {
    background: #A6FFE8;
    color: #65b891;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ==========================================================================
   Biography
   ========================================================================== */

.bts-profile-unlock__bio {
    font-size: 1.4rem;
    color: #4b5563;
    line-height: 1.6;
}

.bts-profile-unlock__bio p {
    margin: 0 0 0.8rem;
}

.bts-profile-unlock__bio p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.bts-profile-unlock__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.bts-profile-unlock__gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bts-profile-unlock__gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Private Section
   ========================================================================== */

.bts-profile-unlock__private {
    margin-top: 1.6rem;
    border-radius: 12px;
    overflow: hidden;
}

/* Unlocked state */
.bts-profile-unlock__private--unlocked {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 2.4rem;
    background: #f0fdf9;
    border: 1px solid #65b891;
}

.bts-profile-unlock__private-title {
    font-family: 'Lato', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: #1f2937;
    margin: 0 0 0.4rem;
}

.bts-profile-unlock__link {
    color: #65b891;
    text-decoration: none;
    transition: color 0.15s;
}

.bts-profile-unlock__link:hover {
    color: #0f5240;
    text-decoration: underline;
}

/* Locked state */
.bts-profile-unlock__private--locked {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.bts-profile-unlock__locked-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.2rem 2.4rem;
    text-align: center;
}

.bts-profile-unlock__locked-icon {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
    opacity: 0.6;
}

.bts-profile-unlock__locked-message {
    font-size: 1.4rem;
    color: #6b7280;
    margin: 0 0 2rem;
    max-width: 400px;
    line-height: 1.5;
}

.bts-profile-unlock__locked-message a {
    color: #65b891;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.bts-profile-unlock__locked-message a:hover {
    color: #0f5240;
    text-decoration: underline;
}

/* ==========================================================================
   Unlock Button
   ========================================================================== */

.bts-profile-unlock__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3.2rem;
    background: #65b891;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.bts-profile-unlock__btn:hover {
    background: #0f5240;
    color: #fff;
}

.bts-profile-unlock__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .bts-profile-unlock {
        margin: 1.6rem auto 0;
    }

    .bts-profile-unlock__public,
    .bts-profile-unlock__private--unlocked {
        padding: 1.6rem;
    }

    .bts-profile-unlock__locked-overlay {
        padding: 2.4rem 1.6rem;
    }

    .bts-profile-unlock__btn {
        width: 100%;
    }

    .bts-profile-unlock__gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }
}
