/* ==========================================================================
   BASE
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;

    --background: #f8fafc;
    --surface: #ffffff;

    --text: #0f172a;
    --text-light: #64748b;

    --border: #e2e8f0;

    --shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

    --radius: 20px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;

    font-family: "Inter", sans-serif;

    background: var(--background);
    color: var(--text);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

input {
    border: none;
    outline: none;
    background: transparent;
}

img {
    display: block;
    max-width: 100%;
}

.message {
    margin: 1rem auto;
    padding: .85rem 1rem;

    width: min(90%, 500px);

    border-radius: 10px;
}

.message-success {
    background: #dcfce7;
}

.message-error {
    background: #fee2e2;
}

.message-warning {
    background: #fef3c7;
}

/* ==========================================================================
   Floating Messages
   ========================================================================== */

#message-container {
    position: fixed;

    top: 1.5rem;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    gap: .75rem;

    width: 400px;
    max-width: calc(100vw - 2rem);

    z-index: 99999;

    pointer-events: none;
}

.message {
    width: 100%;

    text-align: center;

    pointer-events: auto;
}

.message {
    pointer-events: auto;

    padding: 1rem 1.25rem;

    border-radius: 16px;

    color: white;

    box-shadow:
        0 12px 30px rgba(0,0,0,.18);

    opacity: 1;

    transform: translateX(0);

    transition:
        transform .1s linear,
        opacity .1s linear;

    animation: message-enter .25s ease-out;
}

.message-success {
    background: #16a34a;
}

.message-error {
    background: #dc2626;
}

.message-warning {
    background: #d97706;
}

.message-info {
    background: #2563eb;
}

@keyframes message-enter {

    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }

}