/* =========================================================
   Notification History
   ========================================================= */

.notification-history {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    padding: 0.5rem;
    max-height: 70vh;

    scrollbar-width: thin;
    scrollbar-color: #c8c8c8 transparent;
}

.notification-history::-webkit-scrollbar {
    width: 0.4rem;
}

.notification-history::-webkit-scrollbar-track {
    background: transparent;
}

.notification-history::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 0.2rem;
}

/* =========================================================
   History Overlay Wrapper & Header Layout
   ========================================================= */

.notification-history-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}

.notification-history-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 1rem 3.5rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: inherit;
}

.notification-history-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

/* =========================================================
   Notification
   ========================================================= */

.notification {
    display: flex;
    align-items: center;

    width: auto;
    box-sizing: border-box;

    padding: 0.15rem 0.6rem;

    border-radius: 0.4rem;

    line-height: 1.5;

    gap: 0.5rem;
}

/* =========================================================
   Notification content
   ========================================================= */

.notification-content {
    display: flex;
    align-items: baseline;

    min-width: 0;
    flex: 1;

    gap: 0.25rem;
}


/* Sender */

.notification-sender {
    flex: 0 0 auto;

    font-weight: bold;

    white-space: nowrap;
}


/* Scrollable message area */

.notification-scrollable {
    min-width: 0;
    flex: 1;

    overflow-x: auto;
    overflow-y: hidden;

    white-space: nowrap;

    scrollbar-width: none;
}

.notification-scrollable::-webkit-scrollbar {
    display: none;
}


/* Message */

.notification-message {
    white-space: nowrap;
}


/* Room */

.notification-room {
    text-transform: uppercase;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}


/* =========================================================
   Actions
   ========================================================= */

.notification-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex: 0 0 auto;

    gap: 0.35rem;

    margin-left: auto;
}

.notification-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    height: 1.2rem;

    padding: 0;

    border: none;
    border-radius: 0.3rem;

    background: transparent;

    cursor: pointer;

    color: inherit;
}

.notification-action:hover {
    background: rgba(0, 0, 0, 0.08);
}

.notification-action:active {
    background: rgba(0, 0, 0, 0.14);
}

.notification-action svg {
    width: 1.15rem;
    height: 1.15rem;
}

/* =========================================================
   Live announcement container
   ========================================================= */

#announcements-container .notification {
    margin: 0.18rem 0.3rem;
}


/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .notification-action {
        transition: none;
    }
}

/* =========================================================
   New Notification Animation
   ========================================================= */
.notification {
    background: white;
    color: var(--pallet-light);
    transition: background-color 0.5s ease;
}

.notification--new {
    background: var(--pallet-dark);
    color: white;
    box-shadow: var(--glow);
}
/* =========================================================
   Rear mirror Animation
   ========================================================= */
#announcements-container {
    transition: box-shadow 0.5s ease;
}

#announcements-container.announcements-container--important {
    box-shadow: 0 0 20px red;
}

/* =========================================================
   History Overlay Line Wrapping Overrides
   ========================================================= */

.notification-history .notification-content,
.notification-history .notification-scrollable {
    display: inline;
    white-space: normal;
    overflow: visible;
}

.notification-history .notification-message,
.notification-history .notification-room {
    white-space: normal;
    overflow-wrap: anywhere;
}

.notification-history .notification {
    align-items: flex-start;
}

/* =========================================================
   Invitation / Go To Room Overlay
   ========================================================= */

.goto-room-overlay {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;

    padding: 1rem;
}

.goto-room-invitation {
    font-size: 1.1rem;
}

.goto-room-name {
    font-weight: bold;
    text-transform: uppercase;
}


/* =========================================================
   Preset Replies
   ========================================================= */

.goto-room-preset-replies {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.goto-room-preset-replies h3 {
    margin: 0;
    font-size: 1.1rem;
}

.preset-reply-option {
    display: flex;
    align-items: center;
    margin: 0.3rem 0rem;
    font-size: large;

    cursor: pointer;
}


/* =========================================================
   Custom Reply Input
   ========================================================= */

.invitation-custom-reply {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.invitation-custom-reply input {
    flex: 1;
}


/* =========================================================
   Actions
   ========================================================= */
    .goto-room-actions {
        display: flex;
        width: 100%;
        gap: 0.75rem;
    }

    .goto-room-actions .form-button {
        flex: 1;
        width: 100%;
    }