#edt-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    visibility: hidden;
    pointer-events: none;
}

#edt-modal.show {
    visibility: visible;
    pointer-events: auto;
}

#edt-modal .backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    opacity: 0;
    transition: opacity 0.3s ease;
}

#edt-modal.show .backdrop {
    opacity: 1;
}

#edt-modal .dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -45%) scale(0.95);

    width: min(90vw, 500px);
    max-height: 85vh;
    overflow-y: auto;

    background: var(--ressource-color, #0099ff);
    color: var(--font-ressource-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;

    border-radius: 20px;
    padding: 24px 32px;

    opacity: 0;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.25s ease;
}

#edt-modal.show .dialog {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

#edt-modal .title {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    color: var(--font-ressource-color);
}

#edt-modal .meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 1rem;
    text-align: center;
    color: color-mix(in srgb, var(--font-ressource-color), transparent 15%);
}

#edt-modal .meta div {
    padding: 12px 16px;
    background: rgba(78, 78, 78, 0.05);
    border-radius: 12px;
    font-weight: 500;
}

#edt-modal .meta div small {
    display: block;
    margin-top: 2px;
    font-size: 0.85em;
}

#edt-modal .schedule-event-shares {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
}
#edt-modal .schedule-event-shares h4 { margin: 0 0 .6rem; font-size: .9rem; }
#edt-modal .schedule-event-shares__empty { margin: 0; opacity: .68; font-size: .85rem; }
#edt-modal .meta div.schedule-event-shares__list {
    display: flex;
    flex-wrap: nowrap;
    gap: .7rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: .65rem .75rem;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(78, 78, 78, .05);
    border-radius: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .38) rgba(255, 255, 255, .08);
}
#edt-modal .meta div.schedule-event-shares__list::-webkit-scrollbar { height: 7px; }
#edt-modal .meta div.schedule-event-shares__list::-webkit-scrollbar-track { background: rgba(255, 255, 255, .08); border-radius: 99px; }
#edt-modal .meta div.schedule-event-shares__list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .38); border-radius: 99px; }
#edt-modal .meta div.schedule-event-shares__list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .58); }
#edt-modal .meta div.schedule-event-share { position: relative; display: inline-flex; flex: 0 0 auto; padding: 0; background: transparent; border-radius: 0; font-weight: 400; }
#edt-modal .schedule-event-share__avatar-button { position: relative; display: inline-flex; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
#edt-modal .schedule-event-share__avatar-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
#edt-modal .schedule-event-share__avatar { width: 2.25rem; height: 2.25rem; border: 0; box-shadow: none; background: var(--user-pdp-color, #4361ee); }
#edt-modal .schedule-event-share__status-badge { position: absolute; right: -3px; bottom: -3px; display: grid; width: 14px; height: 14px; place-items: center; border: 2px solid var(--ressource-color, #0099ff); border-radius: 50%; color: #fff; }
#edt-modal .schedule-event-share__status-badge.is-pending { background: #e4a11b; }
#edt-modal .schedule-event-share__status-badge.is-accepted { background: #20a765; }
#edt-modal .schedule-event-share__status-badge svg { display: block; width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.schedule-event-share__menu { z-index: 10002; display: flex; min-width: 10.5rem; flex-direction: column; gap: .15rem; padding: .35rem; border: 1px solid rgba(255,255,255,.16); border-radius: .55rem; background: #252a31; box-shadow: 0 .6rem 1.4rem rgba(0,0,0,.35); color: #fff; text-align: left; }
.schedule-event-share__menu button { padding: .5rem .6rem; border: 0; border-radius: .35rem; color: inherit; background: transparent; text-align: left; white-space: nowrap; cursor: pointer; font: inherit; font-size: .8rem; }
.schedule-event-share__menu button.is-danger { display: flex; align-items: center; gap: .5rem; color: #ff5b63; }
.schedule-event-share__menu button.is-danger svg { flex: 0 0 auto; }
.schedule-event-share__menu button.is-danger:hover { background: rgba(255, 91, 99, .12); }
.schedule-event-share__menu button:hover { background: rgba(255,255,255,.1); }
.schedule-event-share__menu button:disabled { opacity: .5; cursor: wait; }

#edt-modal .close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 32px;
    height: 32px;

    background: transparent;
    border: none;
    color: color-mix(in srgb, var(--font-ressource-color), transparent 50%);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;

    display: flex;
    align-items: center;
    justify-content: center;
}

#edt-modal .close:hover {
    background: color-mix(in srgb, var(--font-ressource-color), transparent 90%);
    color: var(--font-ressource-color);
}

#edt-modal .salle-link {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #74c0fc;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

#edt-modal .salle-link:hover {
    text-decoration: underline;
    color: #a5d8ff;
}


#edt-modal .dialog[class*="resource-"] {
    border: none;
}

#edt-modal .dialog[class*="resource-"] .title,
#edt-modal .dialog[class*="resource-"] .meta {
    text-shadow: none;
}

#edt-modal .dialog[class*="resource-"] .meta div {
    background: rgba(0, 0, 0, 0.1);
}

#edt-modal .dialog[class*="resource-"] .close {
    color: var(--font-ressource-color);
}

#edt-modal .dialog[class*="resource-"] .close:hover {
    background: rgba(0, 0, 0, 0.1);
}

#edt-modal .dialog[class*="resource-"] .salle-link {
    color: var(--font-ressource-color);
    text-decoration: underline;
}

@media (max-width: 480px) {
    #edt-modal .dialog {
        width: 94vw;
        padding: 20px 24px;
        border-radius: 16px;
    }

    #edt-modal .title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
}
