/* ==========================================================================
   HireAccord — Profile page (WPUM redesign)
   Matches Figma "Candidate Profile / Redesign".
   Colours, spacing, type and radius all reference design-tokens.css so the
   page stays consistent with the rest of the site. Scoped to #wpum-profile
   and enqueued only on the /profile/ page.
   ========================================================================== */

/* Constrain + center the WPUM output, add breathing room */
#wpum-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 56px;
    box-sizing: border-box;
}

#wpum-profile #profile-header-container {
    margin: 0;
}

/* Force WPUM intermediate wrappers to full width so the card isn't constrained */
#wpum-profile #profile-header-container,
#wpum-profile #header-profile-details {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Profile card (header.php)
   -------------------------------------------------------------------------- */
#wpum-profile .td-profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    background: var(--color-white);
    border: 1px solid var(--color-grey-medium-border);
    /* All four corners — overrides WPUM's default #header-profile-details radius */
    border-radius: var(--border-radius-lg) !important;
    padding: 28px 32px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    overflow: hidden;
    box-sizing: border-box;
}

.td-profile-card__identity {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.td-profile-card__avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(6, 57, 112, 0.10); /* light tint of --color-navy */
    color: var(--color-navy);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.td-profile-card__meta {
    min-width: 0;
}

.td-profile-card__name {
    margin: 0 0 4px;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-grey-dark);
}

.td-profile-card__subline {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--color-grey-medium-text);
    word-break: break-word;
}

.td-profile-card__dot {
    color: var(--color-grey-medium-text);
}

.td-profile-card__edit {
    flex-shrink: 0;
    display: inline-block;
    background: var(--color-navy);
    color: var(--color-white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 26px;
    border: none;
    border-radius: 8px !important; /* fixed radius — beats WPUM default anchor radius */
    box-shadow: none;
    transition: box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

/* Hover: keep navy fill, lift with a soft shadow (no outline / border change).
   Also reset text-decoration on every interaction state — a global
   `a:hover { text-decoration: underline }` was adding an underline on tap/hover
   that the block-button CTAs don't have, making the interaction inconsistent. */
.td-profile-card__edit,
.td-profile-card__edit:hover,
.td-profile-card__edit:focus,
.td-profile-card__edit:focus-visible,
.td-profile-card__edit:active,
.td-profile-card__edit:visited {
    text-decoration: none !important;
}
.td-profile-card__edit:hover,
.td-profile-card__edit:focus-visible {
    background: var(--color-navy);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(6, 57, 112, 0.28);
    outline: none;
}

/* --------------------------------------------------------------------------
   About section + Primary Fields (about.php)
   -------------------------------------------------------------------------- */
.td-profile-about__intro {
    margin: 40px 0 20px;
}

.td-profile-about__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-grey-dark);
}

.td-profile-about__subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--color-grey-medium-text);
}

.td-profile-fields {
    background: var(--color-white);
    border: 1px solid var(--color-grey-medium-border);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.td-profile-fields__heading {
    margin: 0 0 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-grey-border);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-grey-dark);
}

.td-profile-fields__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 32px;
}

.td-profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.td-profile-field__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-grey-medium-text);
}

.td-profile-field__value {
    font-size: var(--font-size-base);
    color: var(--color-grey-dark);
    word-break: break-word;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 782px) {
    #wpum-profile {
        padding-left: 12px;
        padding-right: 12px;
    }
    .td-profile-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .td-profile-card__edit {
        width: 100%;
        text-align: center;
    }
    .td-profile-fields__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Narrow phones: the identity card was too tight — a large avatar + 24px name
   squeezed the meta column so the name wrapped to two lines and the email broke
   mid-word. Slim the avatar, ease the padding, and size the name down so the
   name sits on one line and the email reads cleanly. */
@media (max-width: 600px) {
    #wpum-profile {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 24px;
        padding-bottom: 40px;
    }
    #wpum-profile .td-profile-card {
        padding: 22px 18px;
    }
    .td-profile-card__identity {
        gap: 14px;
    }
    .td-profile-card__avatar {
        width: 56px;
        height: 56px;
        font-size: var(--font-size-lg);
    }
    .td-profile-card__name {
        font-size: var(--font-size-xl);
        line-height: 1.25;
    }
    .td-profile-card__subline {
        /* only break the email if it truly cannot fit — no forced mid-word breaks */
        word-break: normal;
        overflow-wrap: anywhere;
    }
}