@import url('https://fonts.googleapis.com/css2?family=Anaheim&family=Work+Sans:wght@100;400;700&display=swap');

:root {
    --main-color: #e0b0ff;
    --secondary-color: #a87bc6;
    --off-color: #005b4c;
}

html {
    background: whitesmoke;
}

body,
p,
ul,
li {
    font-family: 'Work Sans', sans-serif;
    margin: 0;
    padding: 0;
}

input.error {
    box-shadow: 0 0 3px #CC0000;
}

p.error {
    min-height: 1em;
}

#toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#progress {
    position: fixed;
    top: 0;
    z-index: 1000;
    height: 3px;
    background-color: white;
    width: 100%;
    border-radius: 2px;
    background-clip: padding-box;
    overflow: hidden;
    display: none;
}

#progress .indeterminate {
    background-color: var(--secondary-color);
}

#progress .indeterminate:before {
    content: "";
    position: absolute;
    background-color: inherit;
    top: 0;
    left: 0;
    bottom: 0;
    will-change: left, right;
    -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
    animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

#progress .indeterminate:after {
    content: "";
    position: absolute;
    background-color: inherit;
    top: 0;
    left: 0;
    bottom: 0;
    will-change: left, right;
    -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    -webkit-animation-delay: 1.15s;
    animation-delay: 1.15s;
}

#progress.htmx-request {
    display: inline;
}

@keyframes indeterminate {
    0% {
        left: -35%;
        right: 100%;
    }

    60% {
        left: 100%;
        right: -90%;
    }

    100% {
        left: 100%;
        right: -90%;
    }
}

@keyframes indeterminate-short {
    0% {
        left: -200%;
        right: 100%;
    }

    60% {
        left: 107%;
        right: -8%;
    }

    100% {
        left: 107%;
        right: -8%;
    }
}

#home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    background: linear-gradient(to bottom,
            whitesmoke 0%,
            whitesmoke 70%,
            transparent 100%),
        url('/img/background.png'),
        whitesmoke;
    background-size: 200px;
    background-repeat: repeat;
    animation: scrollBackground 20s linear infinite;
    padding: 0 20px;
}

@keyframes scrollBackground {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

#home h1 {
    font-size: 40px;
    margin-bottom: 20px;
}

#home p.sub {
    font-size: 20px;
    margin-bottom: 40px;
}

#home a {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

#home a:hover {
    background-color: var(--secondary-color);
}


#container {
    display: flex;
    flex-direction: column;
}

header {
    font-family: 'Anaheim', sans-serif;
    background: var(--main-color);
    padding: 5px 0;
    text-align: center;
    margin-bottom: 5px;
    box-shadow: 0 1px 4px black;
}

header a {
    text-decoration: none;
    color: inherit;

}

header .title {
    font-size: 30px;
    color: var(--off-color);
}

header .sub {
    font-size: 15px;
    color: var(--secondary-color);
}

.searchbar {
    height: 44px;
    display: flex;
    border-bottom: 2px solid #888;
}

.searchbar input[type="submit"],
.searchbar input[type="reset"] {
    width: 38px;
    font-size: 20px;
    background: transparent;
    border: none;
    padding: 0;
    outline: inherit;
    cursor: pointer;
}

.searchbar input[type="search"] {
    flex: 1;
    outline: 0;
    border: 0;
    background: transparent;
}

.searchbar:focus-within {
    border-bottom-color: var(--secondary-color);
}

#create {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

#create .next-step {
    color: #fff;
    cursor: pointer;
    transition: all .4s ease;
    font-size: 18px;
    border-radius: 20px;
    background: var(--off-color);
    padding: 10px 40px;
    text-decoration: none;
    border: none;
    display: inline-block;
}

.input-group {
    margin-bottom: 33px;
}

.input-group input {
    width: 100%;
}

.card {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    border-radius: 5px;
    max-width: 600px;
    padding: 10px;
}

.card:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.card .container {
    padding: 2px 16px;
}

.card .cta {
    text-align: center;
}

.stepper-wrapper {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;

    @media (max-width: 768px) {
        font-size: 12px;
    }
}

.stepper-item::before {
    position: absolute;
    content: "";
    border-bottom: 2px solid var(--main-color);
    width: 100%;
    top: 20px;
    left: -50%;
    z-index: 2;
}

.stepper-item::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid var(--main-color);
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 2;
}

.stepper-item a {
    text-decoration: none;
    color: inherit;
}

.stepper-item .step-counter {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--main-color);
    margin-bottom: 6px;
}

.stepper-item.active {
    font-weight: bold;
}

.stepper-item.completed .step-counter {
    background-color: var(--secondary-color);
}

.stepper-item.completed::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid var(--secondary-color);
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 3;
}

.stepper-item:first-child::before {
    content: none;
}

.stepper-item:last-child::after {
    content: none;
}

#inbox {
    flex-grow: 1;
}

#inbox a {
    text-decoration: none;
    color: inherit;
}

.inbox-item-skeleton {
    border-bottom: 1px solid #ddd;
    height: 83px;
}

.inbox-item {
    border-bottom: 1px solid #ddd;
    display: flex;
    cursor: pointer;
}

.inbox-item:hover {
    background-color: #f9f9f9;
}

.inbox-item .selector {
    width: 4px;
    margin-right: 16px;
    background-color: var(--main-color);
    transition: opacity .2s;
    opacity: 0;
    flex-shrink: 0;
}

.inbox-item.selected .selector {
    opacity: 1;
}

.inbox-item .details {
    flex-grow: 1;
    min-width: 0;
    height: 83px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.inbox-item .details p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-item .details .name {
    font-weight: bold;
    margin-bottom: 5px;
}

.inbox-item .details .from {
    font-weight: normal;
    font-size: small;
}

.inbox-item .details .subject {
    color: #888;
}

.inbox-item .details .note {
    font-size: 12px;
    color: #aaa;
}

.inbox-item .info {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    column-gap: 10px;
    padding-right: 7px;
}

.inbox-item .info .date {
    color: #aaa;
    font-size: smaller;
}

.inbox-item .info .goto {
    text-decoration: none;
    font-size: 50px;
}

.inbox-item .info input {
    pointer-events: none;
}

.share {
    background-color: var(--off-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.share a {
    color: var(--main-color);
    pointer-events: none;
}

.copy {
    cursor: pointer;
    font-size: 0.8em;
}

.expand {
    cursor: pointer;
    width: 1em;
    height: auto;
}

#mail {
    padding: 0 10px;
}

#mail h1 {
    word-break: break-all;
    text-align: center;
}

#mail h1 small {
    color: #888;
}

#mail .date {
    text-align: right;
}

#mail textarea {
    width: 100%;
    height: 5em;
    overflow: auto;
    resize: none;
    outline: none;
    background-color: whitesmoke;
    border-radius: 3px;
}

#mail hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

#attachments p {
    white-space: pre-wrap;
}

#attachments img {
    max-width: 100%;
}

#attachments object {
    width: 100%;
    height: 40vh;
}

#fullscreen {
    display: none;
    position: fixed;
    background: black;
    color: white;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
}

#fullscreen.shown {
    display: flex;
}

#fullscreen .close {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 5px;
    font-size: 30px;
}

#fullscreen .container {
    transform: rotate(90deg);
    font-size: clamp(16px, 9vh, 70px);
}

.date {
    min-height: 1em;
}