/* Ticket 18 (D-10): the Projects-list share icon's menu — anchored the same
   way styles/app.css's .confirm-popover is (fixed, floated to <body>, themed
   via the same custom properties). */
.share-menu {
    position: fixed;
    z-index: 6200;
    display: flex;
    flex-direction: column;
    width: min(300px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    max-height: min(480px, calc(100vh - 16px));
    overflow-y: auto;
    padding: 6px;
    box-sizing: border-box;
    background: var(--bg-surface-2);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    box-shadow: var(--shadow-lg, 0 16px 36px rgba(0, 0, 0, .42));
    font-size: 12px;
}

.share-menu-item {
    display: block;
    width: 100%;
    padding: 8px 9px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-main);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.share-menu-item:hover:not(:disabled),
.share-menu-item:focus-visible {
    background: var(--secondary-hover, rgba(255, 255, 255, 0.07));
    outline: none;
}

.share-menu-item:disabled {
    opacity: .55;
    cursor: default;
    color: var(--text-muted);
}

.share-menu-item.share-menu-danger {
    color: var(--danger);
}

.share-menu-divider {
    margin: 4px 2px;
    border: none;
    border-top: 1px solid var(--border-color);
}

.share-menu-invite-form {
    padding: 6px 9px 8px;
}

.share-menu-invite-label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

.share-menu-invite-row {
    display: flex;
    gap: 6px;
}

.share-menu-invite-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 12px;
}

.share-menu-invite-input:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 1px;
}

.share-menu-invite-send {
    flex: 0 0 auto;
    padding: 5px 10px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.share-menu-invite-send:hover:not(:disabled) { background: var(--primary-hover); }
.share-menu-invite-send:disabled { opacity: .6; cursor: default; }

/* Ticket 09 (D-03): the Editor/Viewer role picker next to the invite form,
   sharing .share-menu-access-role's shape below (both are a role <select> on
   the same input styling this file already uses) but slightly larger, to
   match the invite row's own input/button sizing. */
.share-menu-invite-role {
    flex: 0 0 auto;
    padding: 5px 6px;
    font-size: 12px;
}

.share-menu-access {
    padding: 2px 9px 6px;
}

.share-menu-access-heading {
    margin: 2px 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.share-menu-access-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.share-menu-access-empty {
    padding: 4px 0;
    color: var(--text-muted);
}

.share-menu-access-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
}

.share-menu-access-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.share-menu-access-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-menu-access-tag {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Ticket 09 (D-03): the shared look for both role controls — sized here for
   the People-with-access row; .share-menu-invite-role above overrides only
   size to match the invite row's own inputs. The role picker itself is for
   an invite-based collaborator; a share-link collaborator's access has never
   carried a role, so that row gets the plain label just below instead. */
.share-menu-invite-role,
.share-menu-access-role {
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-main);
}

.share-menu-access-role {
    flex: 0 0 auto;
    padding: 3px 6px;
    font-size: 11px;
}

.share-menu-access-role-label {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--text-muted);
}

.share-menu-access-action {
    flex: 0 0 auto;
    padding: 3px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
}

.share-menu-access-action:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* Ticket 10 (D-02): the public link's own section — same heading style as
   .share-menu-access-heading above, its body sized like .share-menu-access. */
.share-menu-public-link {
    padding: 2px 9px 6px;
}

.share-menu-public-link-description {
    margin: 0 0 6px;
    color: var(--text-muted);
}
