/* the bell of the head and the popup of status online */

div.event-bell-wrap
{
    position:relative;
    display:inline-grid;
    justify-items:center;
}

div.event-bell
{
    position:relative;
    width:35px;
    height:35px;
    display:grid;
    align-content:center;
    justify-content:center;
    border-radius:3px;
    cursor:pointer;
}

div.event-bell:hover
{
    background-color:var(--grey-dark);
}

img.event-bell-img
{
    width:20px;
    height:20px;
}

span.event-bell-count
{
    position:absolute;
    top:1px;
    right:0;
    min-width:16px;
    height:16px;
    padding:0 3px;
    box-sizing:border-box;

    background-color:var(--red);
    color:var(--font-dark);
    border-radius:8px;

    font-size:10px;
    font-weight:600;
    line-height:16px;
    text-align:center;
}

/* an open event lets the bell blink, it must not be missed */
div.event-bell-active img.event-bell-img
{
    animation:event-bell-ring 2s ease-in-out infinite;
    transform-origin:top center;
}

@keyframes event-bell-ring
{
    0% {transform:rotate(0deg);}
    3% {transform:rotate(14deg);}
    6% {transform:rotate(-12deg);}
    9% {transform:rotate(10deg);}
    12% {transform:rotate(-8deg);}
    15% {transform:rotate(0deg);}
    100% {transform:rotate(0deg);}
}

div.event-bell-box
{
    display:none;
    position:absolute;
    top:38px;
    right:0;
    z-index:110;

    width:320px;
    max-height:60vh;
    grid-template-rows:auto 1fr auto;

    background-color:var(--background);
    border:1px solid var(--grey-dark-light);
    border-radius:4px;
    box-shadow:0px 2px 3px 1px rgba(0,0,0,0.1);

    text-align:left;
    font-size:12px;
    cursor:default;
}

div.event-bell-head
{
    padding:8px 10px;
    font-weight:600;
    background-color:var(--grey);
}

div.event-bell-list
{
    overflow-y:auto;
}

a.event-bell-row
{
    display:grid;
    grid-template-columns:14px auto;
    gap:6px;
    align-items:start;
    padding:8px 10px;
    border-top:1px solid var(--grey);
    text-decoration:none;
}

a.event-bell-row:hover
{
    background-color:var(--grey-light);
}

span.event-bell-dot
{
    width:10px;
    height:10px;
    margin-top:3px;
    border-radius:5px;
    background-color:var(--grey-dark);
}

span.event-bell-text
{
    display:grid;
    overflow:hidden;
}

div.event-bell-time
{
    font-size:10px;
    color:var(--grey-dark);
}

div.event-bell-message
{
    overflow:hidden;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    word-break:break-word;
}

div.event-bell-empty
{
    padding:12px 10px;
    color:var(--grey-dark);
}

a.event-bell-foot
{
    padding:8px 10px;
    border-top:1px solid var(--grey);
    background-color:var(--grey);
    text-align:center;
    text-decoration:underline;
}

/* ------------------------------------------------------------------------- */
/* popup */
/* ------------------------------------------------------------------------- */

div.event-popup
{
    display:none;
    position:fixed;
    top:0;
    left:0;
    z-index:200;

    width:100%;
    height:100%;

    background-color:rgba(150,150,150,0.6);
    overflow-y:auto;
    align-content:start;
    justify-content:center;
}

div.event-popup-box
{
    width:min(30rem, 94%);
    margin:2rem 0;
    display:grid;
    gap:10px;
}

div.event-popup-entry
{
    background-color:var(--grey-light);
    border:2px solid var(--grey-dark);
    border-radius:4px;
    padding:12px;

    display:grid;
    gap:6px;
    font-size:13px;
}

div.event-popup-line
{
    display:grid;
    grid-template-columns:5.5rem auto;
    gap:6px;
    align-items:start;
}

div.event-popup-label
{
    font-weight:600;
}

div.event-popup-message
{
    font-size:15px;
    word-break:break-word;
}

input.event-popup-comment
{
    width:100%;
    box-sizing:border-box;
}

input.event-popup-postpone
{
    width:60px;
}

div.event-popup-button
{
    font-size:1em;
    margin-top:4px;
}

div.event-popup-snooze-box
{
    display:grid;
    grid-auto-flow:column;
    gap:4px;
    justify-content:stretch;
}

span.event-popup-snooze
{
    padding:4px 6px;
    text-align:center;

    background-color:var(--main);
    border-radius:3px;
    cursor:pointer;
    white-space:nowrap;
    font-size:12px;
}

span.event-popup-snooze:hover
{
    background-color:var(--grey-dark-light);
}

div.event-popup-all
{
    border-color:var(--grey-dark);
    border-style:dashed;
}

div.event-popup-all-title
{
    font-weight:600;
}

/* a button without a comment stays visible but does nothing */
.ev-button-disabled
{
    opacity:0.4;
    cursor:not-allowed;
}

.ev-button-disabled:hover
{
    box-shadow:none;
    background-color:var(--main);
}

div.button.ev-button-disabled:hover
{
    background-color:var(--main-dark);
}

@media screen and (max-width:700px)
{
    div.event-bell-box
    {
        width:min(20rem, 92vw);
    }

    div.event-popup-line
    {
        grid-template-columns:4.5rem auto;
    }

    div.event-popup-snooze-box
    {
        grid-auto-flow:row;
    }
}
