/* =============================================================================
   Profile modal (profile-modal.js) + the header avatar's "add a photo" badge
   -----------------------------------------------------------------------------
   Scoped under `.profile-modal` / `.header-actions .user-avatar` (CLAUDE.md
   rule 2). The shell, header, footer and the avatar picker are the shared Teams
   modal styles; only the settings rows and the phone sheet are declared here.
   ============================================================================= */

.profile-modal .profile-modal__name {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.profile-modal .profile-modal__rows {
    margin-top: 18px;
    border-top: 1px solid var(--tm-border, #d8d3c8);
}

.profile-modal .profile-modal__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 2px;
    border-bottom: 1px solid var(--tm-border, #d8d3c8);
}

.profile-modal .profile-modal__row-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.profile-modal .profile-modal__row-label i {
    width: 18px;
    text-align: center;
    color: var(--tm-text-3, #8a8987);
}

.profile-modal .profile-modal__link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 55%;
    padding: 4px 8px;
    border: 0;
    border-radius: var(--tm-r, 8px);
    background: transparent;
    color: var(--tm-accent, #2d5f84);
    font-size: 13.5px;
    font-weight: 600;
    text-align: right;
    cursor: pointer;
}
.profile-modal .profile-modal__link:hover { background: var(--tm-bg-alt, #f0ede6); }
.profile-modal .profile-modal__detail {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--tm-text-3, #8a8987);
    font-size: 12px;
    font-weight: 400;
}

.profile-modal .profile-modal__lang {
    display: inline-flex;
    border: 1px solid var(--tm-border, #d8d3c8);
    border-radius: 999px;
    overflow: hidden;
}
.profile-modal .profile-modal__lang button {
    padding: 5px 14px;
    border: 0;
    background: transparent;
    color: var(--tm-text-2, #6f6e6d);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.profile-modal .profile-modal__lang button.is-active {
    background: var(--tm-accent, #2d5f84);
    color: #fff;
}

/* A phone gets the whole screen, not a card floating over it. */
@media (max-width: 640px) {
    .teams-modal-overlay.profile-modal { padding: 0; align-items: stretch; }
    .teams-modal-overlay.profile-modal .teams-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* ── Header avatar: no photo yet → show how to add one ───────────────────── */

.header-actions .user-avatar .user-avatar__face { position: relative; }

.header-actions .user-avatar .user-avatar__camera {
    position: absolute;
    right: -4px;
    bottom: -3px;
    padding: 3px;
    border-radius: 50%;
    background: var(--tm-accent, #2d5f84);
    color: #fff;
    font-size: 7px;
    line-height: 1;
    pointer-events: none;
}
.header-actions .user-avatar:hover .user-avatar__camera { color: #fff; }

/* ── Personal assistant card (profile-assistant-row.js) ─────────────────────
   One block: a header with the on/off switch, and a body that exists only while
   the assistant is on. Every selector hangs off `.profile-modal .pa-card`. */

.profile-modal [data-assistant-host] { margin: 14px 0; }

.profile-modal .pa-card {
    border: 1px solid var(--tm-border, #d8d3c8);
    border-radius: 12px;
    background: var(--tm-bg, #fff);
    overflow: hidden;
}
.profile-modal .pa-card[data-open="true"] { border-color: var(--tm-accent, #2d5f84); }

.profile-modal .pa-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}
.profile-modal .pa-card__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tm-accent-subtle, #e6eef4);
    color: var(--tm-accent, #2d5f84);
}
.profile-modal .pa-card__titles { min-width: 0; flex: 1; }
.profile-modal .pa-card__titles h4 { margin: 0; font-size: 14.5px; font-weight: 600; }
.profile-modal .pa-card__titles p {
    margin: 2px 0 0;
    color: var(--tm-text-3, #8a8987);
    font-size: 12.5px;
    line-height: 1.35;
}

/* The switch: a real checkbox (role=switch), drawn as a track. The knob is
   positioned absolutely so no inherited line-height or inline layout can shift it. */
.profile-modal .pa-switch {
    position: relative;
    display: block;
    flex: none;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.profile-modal .pa-switch input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.profile-modal .pa-switch__track {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--tm-border-strong, #bdb8ab);
    transition: background 0.15s ease;
}
.profile-modal .pa-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}
.profile-modal .pa-switch input:checked + .pa-switch__track { background: var(--tm-accent, #2d5f84); }
.profile-modal .pa-switch input:checked + .pa-switch__track::after { transform: translateX(20px); }
.profile-modal .pa-switch input:focus-visible + .pa-switch__track {
    outline: 2px solid var(--tm-accent, #2d5f84);
    outline-offset: 2px;
}
.profile-modal .pa-switch input:disabled + .pa-switch__track { opacity: 0.6; }

.profile-modal .pa-card__body { border-top: 1px solid var(--tm-border, #d8d3c8); }
.profile-modal .pa-section { padding: 12px 14px; border-bottom: 1px solid var(--tm-border, #d8d3c8); }
.profile-modal .pa-section h5 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}
.profile-modal .pa-section h5 label { cursor: pointer; }
.profile-modal .pa-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 8px;
}
.profile-modal .pa-section__head h5 { margin: 0; }

.profile-modal .pa-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

/* "Draft for me / Reply automatically": a segmented control over real radios. */
.profile-modal .pa-segment {
    display: flex;
    border: 1px solid var(--tm-border-strong, #bdb8ab);
    background: var(--tm-input-bg, var(--tm-real-white, #fff));
    border-radius: 999px;
    overflow: hidden;
}
.profile-modal .pa-segment__opt { position: relative; flex: 1; cursor: pointer; }
.profile-modal .pa-segment__opt input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.profile-modal .pa-segment__opt span {
    display: block;
    padding: 7px 10px;
    text-align: center;
    color: var(--tm-text-2, #6f6e6d);
    font-size: 13px;
    font-weight: 600;
}
.profile-modal .pa-segment__opt input:checked + span {
    background: var(--tm-accent, #2d5f84);
    color: #fff;
}
.profile-modal .pa-segment__opt input:focus-visible + span { outline: 2px solid var(--tm-accent, #2d5f84); outline-offset: -2px; }

.profile-modal .pa-hint,
.profile-modal .pa-fine {
    margin: 6px 0 0;
    color: var(--tm-text-3, #8a8987);
    font-size: 12.5px;
    line-height: 1.4;
}
.profile-modal .pa-fine { padding: 0 14px 12px; margin: 0; }

/* Editable fields use the input surface, NOT the card's: on the card's own
   background they disappear into it. */
.profile-modal .pa-textarea,
.profile-modal .pa-select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--tm-border-strong, #bdb8ab);
    border-radius: var(--tm-r, 8px);
    background: var(--tm-input-bg, var(--tm-real-white, #fff));
    color: var(--tm-text-2);
    font: inherit;
    font-size: 13.5px;
}
.profile-modal .pa-textarea { resize: vertical; }
.profile-modal .pa-card__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 14px;
}
.profile-modal .pa-saved { color: var(--tm-success, #2e7d32); font-size: 12.5px; font-weight: 600; }

.profile-modal .pa-btn {
    padding: 6px 14px;
    border: 1px solid var(--tm-border, #d8d3c8);
    border-radius: 999px;
    background: transparent;
    color: var(--tm-text-2, #4a4947);
    font: 600 12.5px var(--tm-font-ui, inherit);
    cursor: pointer;
}
.profile-modal .pa-btn:hover:not(:disabled) { background: var(--tm-bg-alt, #f0ede6); }
.profile-modal .pa-btn:disabled { opacity: 0.5; cursor: default; }
.profile-modal .pa-btn--primary { border-color: var(--tm-accent, #2d5f84); background: var(--tm-accent, #2d5f84); color: #fff; }
.profile-modal .pa-btn--primary:hover:not(:disabled) { background: var(--tm-accent, #2d5f84); filter: brightness(1.08); }
.profile-modal .pa-btn--danger { border-color: var(--tm-danger, #b42318); background: var(--tm-danger, #b42318); color: #fff; }
.profile-modal .pa-btn--danger:hover:not(:disabled) { background: var(--tm-danger, #b42318); filter: brightness(1.08); }

.profile-modal .pa-confirm {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--tm-danger, #b42318);
    border-radius: var(--tm-r, 8px);
    background: var(--tm-bg-alt, #f0ede6);
    font-size: 13px;
    line-height: 1.4;
}
.profile-modal .pa-confirm p { margin: 0 0 8px; }
.profile-modal .pa-confirm__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.profile-modal .pa-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 14px 0;
    padding: 8px 12px;
    border-radius: var(--tm-r, 8px);
    background: var(--tm-warning-subtle, #fff4d6);
    font-size: 12.5px;
    line-height: 1.4;
}
.profile-modal .pa-notice[hidden],
.profile-modal .pa-card [hidden] { display: none; }

.profile-modal .pa-error {
    margin: 0;
    padding: 8px 14px 10px;
    color: var(--tm-danger, #b42318);
    font-size: 12.5px;
}
