.app-layout:has(.main-content.no-project) #open-share-modal {
    display: none;
}

.app-layout:has(.main-content.no-project) #delete-project-btn {
    display: none;
}



/* --- Form Elements --- */
.share-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-input-group input,
.share-input-group select {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #bbb;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    outline: none;
}

.share-input-group input:focus {
    border-color: #444;
}

/* --- Member List Items --- */
#share-member-list {
    margin-top: 12px;
    padding: 0;
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
}

.share-member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Space between the elements */
    width: 100%;
    padding: 8px 0;
}

.delete-column {
    flex-shrink: 0;
    /* Prevents the delete button from squishing */
}

.member-name-container {
    flex: 1;
    /* This pushes the role pill to the right */
    min-width: 0;
    /* Critical for ellipsis to work in Flexbox */
}

.member-name {
    flex: 1;
    /* This makes the name take up all available middle space */
    min-width: 0;
    /* Required for the 'ellipsis' (...) to work in a flexbox */
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#members-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #111112;
    border-radius: 8px;
    overflow: hidden;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #161616;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.member-uid {
    font-family: monospace;
    color: #777;
}

.role-tag {
    font-size: 0.65rem;
    color: #444;
    text-transform: uppercase;
    font-weight: bold;
}

/* --- UI Polish --- */

.role-pill {
    flex-shrink: 0;
    display: flex;
    align-items: center;

    /* Pushes text to left, emoji to right */
    justify-content: space-between;

    padding: 6px 14px;
    /* Slightly tighter horizontal padding */
    border-radius: 50px;
    width: 8rem;

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;

    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}


/* 👑 Owner - Gold */
.role-pill[data-role="owner"] {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.role-pill[data-role="owner"] .role-tag {
    color: #ffd700;
}

/* ✍️ Editor - Blue or Purple */
.role-pill[data-role="editor"] {
    border-color: #4da3ff;
    background: rgba(77, 163, 255, 0.1);
}

.role-pill[data-role="editor"] .role-tag {
    color: #4da3ff;
}

/* 👀 Observer - Green or Gray */
.role-pill[data-role="observer"] {
    border-color: #44ce7b;
    background: rgba(68, 206, 123, 0.1);
}

.role-pill[data-role="observer"] .role-tag {
    color: #44ce7b;
}







.role-pill.is-toggleable {
    cursor: pointer;
}

.role-pill.is-toggleable:hover {
    background: #2f2f31;
  

}

.role-pill.is-toggleable:active {
    transform: scale(0.95);
}



.role-emoji {
    font-size: 0.9rem;
    pointer-events: none;
}




.chevron {
    font-size: 0.6rem;
    color: #555;
    transition: transform 0.3s;
}

.share-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

/* Logic: When checked, change background to your theme color (e.g., green or blue) */
input:checked+.slider {
    background-color: #4CAF50;
    /* Green for "Editor" */
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.input-row {
    display: flex;
    gap: 8px;
}

.share-form input,
.share-form select {
    background: #252527;
    border: 1px solid #3a3a3c;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.share-form input {
    flex: 2;
}

.share-form select {
    flex: 1;
}

#confirm-share-btn {
    background: #1b2e25;
    color: #81c784;
    border: 1px solid #2d4a3e;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#confirm-share-btn:hover {
    background: #243d31;
    color: #a5d6a7;
}

.logout-btn {
    color: #ff4d4d;
}

.logout-btn:hover {
    background: #3d2b2b;
}

.logout-btn .icon {
    font-size: 1.1rem;
}