@import url('variables.css');

html {
    background-color: var(--background-color);
    background:
        radial-gradient(
            1200px circle at 10% 10%,
            color-mix(in srgb, var(--brand-blue) 20%, transparent),
            transparent 55%
        ),
        radial-gradient(
            900px circle at 90% 20%,
            color-mix(in srgb, var(--brand-pink) 18%, transparent),
            transparent 40%
        ),
        radial-gradient(
            700px circle at 30% 80%,
            color-mix(in srgb, var(--brand-green) 14%, transparent),
            transparent 45%
        ),
        var(--background-color);
    background-attachment: fixed;
    color: var(--foreground-color);
    font-family: var(--body-font-family);
}

h1,
h2,
h3,
h4,
h5,
h6,
th {
    font-family: var(--title-font-family);
    color: var(--primary-color);
}

a {
    color: var(--secondary-color);
    &:hover {
        color: color-mix(in srgb, var(--secondary-color), white 30%);
    }
    &:visited {
        opacity: 0.85;
    }
}

/* Global input styling - beautiful semi-transparent inputs */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='url'],
input[type='tel'],
input[type='number'],
input[type='date'],
input[type='time'],
input[type='datetime-local'],
select,
textarea {
    /* Box Model */
    padding: var(--gap2);
    width: 100%;
    box-sizing: border-box;

    /* Visual */
    background: color-mix(in srgb, var(--background-darker) 80%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-blue) 35%, transparent);
    border-radius: var(--bradius2);

    /* Typography */
    color: var(--foreground-color);
    font-family: var(--body-font-family);
    font-size: 1rem;
    line-height: 1.5;

    /* Interaction */
    transition:
        border-color var(--animation-speed) ease,
        background var(--animation-speed) ease;

    &:focus {
        outline: none;
        border-color: var(--brand-blue);
        background: color-mix(in srgb, var(--background-darker) 95%, transparent);
    }

    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    &::placeholder {
        color: color-mix(in srgb, var(--foreground-color) 45%, transparent);
    }
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgb(255,245,230)' opacity='0.6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--gap3) center;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Global scrollbar styling */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--brand-blue) var(--background-darker);
}

html::-webkit-scrollbar-track {
    background: var(--background-darker);
}

html::-webkit-scrollbar-thumb {
    background: var(--brand-blue);
    border-radius: var(--bradius);
}

html::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--brand-blue), white 20%);
}
