/* ---- Loading ---- */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;

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

    transition: 0.25s ease-in-out;

    .spinner-border {
        width: 4rem;
        height: 4rem;

        border-radius: 100%;
        border-style: solid;
        border-width: 4px;
        border-color: #64B245 #d7d7d7 #d7d7d7 #d7d7d7;

        animation: spinner-border 0.75s linear infinite;
    }

    &.hidden {
        display: none;
        opacity: 0;
    }
}
@keyframes spinner-border {
    100% {
        transform: rotate(360deg);
    }
}

/* ---- Proof of Delivery ---- */
.pod-images {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    img {
        width: 100%;
        max-width: 200px;
        margin: auto;
    }
}

/* ---- Notifications ---- */

/* Colours & Config */
:root {
    --notification-success: #64B245;
    --notification-error: #E23636;
    --notification-warn: #EDB95E;
    --notification-info: #4A90E2;
    --notification-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
    rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.notification-stack {
    position: fixed;
    top: 6rem;
    right: 20px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;

    z-index: 9999;
}

.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 96%;
    min-height: 42px;

    background-color: var(--notification-error);
    color: white;

    z-index: 1000; /* Something in this project is forcing me to do this. */
    font-weight: normal;

    padding: 0.5rem 1rem;
    border-radius: 0.125rem;
    box-shadow: var(--notification-shadow);

    opacity: 0;
    transition: opacity 300ms ease;
}

.notification .close-notification {
    font-size: 22px;
    margin-left: 1rem;
    cursor: pointer;
    fill: white;
    color: white;
    width: 1.5rem;
}

/* ---- Xtra Overrides ---- */
.notification.hidden {
    display: none;
}

.notification.flex {
    display: flex;
}

/* ---- Branding ---- */
.notification.info {
    background-color: var(--notification-info);
    min-width: 0;
}

.notification.success {
    background-color: var(--notification-success);
}

.notification.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.notification.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

/* Responsive Width */
@media only screen and (min-width: 480px) {
    .notification {
        width: unset;
    }
}

@media only screen and (min-width: 768px) {
    .notification-stack {
        top: 7rem;
    }
}

@media only screen and (min-width: 996px) {
    .notification-stack {
        top: 10rem;
    }
}

@media only screen and (min-width: 1070px) {
    .notification-stack {
        top: 8.5rem;
    }
}