/*
 * My profile: identity, security summary, editable fields and photo cropping.
 * Both workspaces load the avatar and crop dialog rules for employee photos.
 * Viewport and motion overrides live in ateam-account-responsive.css.
 */

/* ==========================================================================
   Profile columns and shared card surfaces
   ========================================================================== */

.account-profile-grid {
    display: grid;

    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2fr);

    align-items: start;

    gap: 26px;
}

.account-profile-card,
.account-profile-form-card {
    min-width: 0;
}

.account-profile-column {
    display: grid;

    gap: 22px;

    min-width: 0;
}

.account-profile-card,
.account-security-card,
.account-profile-form-card {
    border: 1px solid #e0e9f2;

    border-radius: 18px;

    box-shadow: 0 5px 18px rgb(8 43 86 / 3%);

    background: #fff;
}

/* ==========================================================================
   Personal identity, role and organization summary
   ========================================================================== */

.account-profile-card {
    padding: 30px 24px 25px;

    text-align: center;
}

.account-profile-card > h2 {
    margin: 15px 0 5px;

    color: var(--color-navy);

    font-size: 19px;

    overflow-wrap: anywhere;
}

.account-profile-card > p {
    margin: 0 0 14px;

    color: var(--color-muted);

    font-size: 12px;

    overflow-wrap: anywhere;
}

.account-profile-role {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 6px;

    background: #edf6ff;

    color: #396f9f;

    font-size: 10px;
}

.account-profile-organization {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    margin: 22px 0;

    color: var(--color-muted);

    font-size: 12px;

    overflow-wrap: anywhere;

    text-align: left;

    background: #f5f9fd;

    border-radius: 10px;

    border: 0;

    padding: 15px;

    margin-top: 25px;
}

.account-profile-organization span {
    line-height: 1.5;

    overflow-wrap: anywhere;
}

.account-profile-organization small {
    display: block;

    color: #61758b;

    font-size: 11px;

    margin-bottom: 2px;
}

/* ==========================================================================
   Circular profile portrait and photo action
   ========================================================================== */

.account-avatar.account-avatar-large {
    width: 124px;

    height: 124px;

    font-size: 42px;

    margin: 0 auto;

    box-shadow: 0 0 0 6px #f0f7fd;
}

.account-avatar {
    position: relative;

    overflow: hidden;
}

.account-avatar img {
    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    object-fit: cover;
}

.account-photo-change {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    margin: 19px auto 22px;

    padding: 7px 10px;

    border: 0;

    border-radius: 7px;

    color: #087ce5;

    background: #fff;

    font: inherit;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;
}

.account-photo-change:hover {
    background: #eff7ff;
}

.account-photo-change:disabled {
    opacity: 0.55;

    cursor: wait;
}

/* ==========================================================================
   Account security summary
   ========================================================================== */

.account-security-icon {
    color: #087ce5;

    font-size: 19px;

    display: flex;

    width: 40px;

    height: 40px;

    align-items: center;

    justify-content: center;

    border-radius: 11px;

    background: #edf6ff;
}

.account-security-card h3 {
    margin: 17px 0 9px;

    color: var(--color-navy);

    font-size: 17px;
}

.account-security-card p {
    margin: 0 0 21px;

    color: #61758b;

    font-size: 13px;

    line-height: 1.7;
}

.account-security-card {
    padding: 25px;
}

.account-security-card .button {
    width: 100%;
}

/* ==========================================================================
   Editable profile form and save feedback
   ========================================================================== */

.account-profile-form-card {
    padding: 30px;
}

.account-profile-form-card .account-form-heading:first-of-type {
    margin-top: 0;
}

.account-form-actions {
    margin-top: 30px;

    padding-top: 23px;
}

.account-form-actions > p.is-dirty {
    color: #9a640c;
}

.account-form-actions > p.is-dirty::before {
    content: "";

    display: inline-block;

    width: 6px;

    height: 6px;

    margin-right: 7px;

    border-radius: 50%;

    background: #d99a2e;

    vertical-align: middle;
}

/* ==========================================================================
   Photo crop dialog, canvas and zoom
   ========================================================================== */

.account-photo-dialog {
    --dialog-width: 480px;
}

.account-photo-crop {
    position: relative;

    overflow: hidden;

    width: min(100%, 320px);

    margin: 23px auto;

    border-radius: 12px;

    aspect-ratio: 1;

    background: #eef3f8;
}

.account-photo-crop canvas {
    display: block;

    width: 100%;

    height: 100%;

    touch-action: none;

    cursor: grab;
}

.account-photo-crop canvas:active {
    cursor: grabbing;
}

.account-photo-crop canvas:focus-visible {
    outline: 3px solid #087ce5;

    outline-offset: -3px;
}

.account-photo-crop > span {
    position: absolute;

    inset: 0;

    border-radius: 50%;

    box-shadow: 0 0 0 80px rgb(8 43 86 / 48%);

    border: 2px solid #fff;

    pointer-events: none;
}

.account-photo-zoom {
    margin-bottom: 24px;

    display: flex;

    align-items: center;

    gap: 16px;

    font-size: 13px;

    color: #61758b;
}

.account-photo-zoom input {
    flex: 1;

    min-width: 0;

    accent-color: #087ce5;
}

/* ==========================================================================
   Assistive labels and startup actions
   ========================================================================== */

.account-visually-hidden {
    position: absolute;

    width: 1px;

    height: 1px;

    padding: 0;

    margin: -1px;

    overflow: hidden;

    clip-path: inset(50%);

    white-space: nowrap;

    border: 0;
}

.account-startup .button {
    margin: 8px;
}
