@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;

    color-scheme: light dark;

    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

a {
    font-weight: 500;
    color: #646cff;
    text-decoration: inherit;
}

html body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: theme("colors.black");
    background-color: theme("colors.white");
}

h1 {
    font-size: 3.2em;
    line-height: 1.1;
}

#app {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

/* Buttons */

button {
    border-radius: theme("borderRadius.xl");
    border: 1px solid transparent;
    padding: theme("spacing.2") theme("spacing.4");
    font-size: theme("fontSize.base");
    font-weight: theme("fontWeight.bold");
    font-family: inherit;
    color: theme("colors.white");
    background-color: theme("colors.blue.600");
    cursor: pointer;
    transition: border-color 0.25s;
}

button.btn-small {
    padding: theme("spacing.1") theme("spacing.2");
    font-size: theme("fontSize.sm");
}

button:hover {
    border-color: theme("colors.blue.500");
    background-color: theme("colors.blue.500");
    color: theme("colors.white");
}

button:focus,
button:focus-visible {
    outline: 4px auto -webkit-focus-ring-color;
}

button:disabled {
    opacity: theme("opacity.50");
    cursor: not-allowed;
}

button.btn-link {
    background-color: transparent;
    border-color: transparent;
    padding: theme("spacing.0");
    font-weight: inherit;
    text-decoration: underline;
    border: theme("spacing.0");
}

button.btn-link:hover {
    background-color: transparent;
    border-color: transparent;
    color: inherit;
}

button.btn-transparent {
    padding: theme("padding.0");
    background-color: theme("colors.transparent");
    color: inherit;
    opacity: theme("opacity.50");
    border: theme("spacing.0");
}

button.btn-transparent:hover {
    background-color: theme("colors.transparent");
    color: theme("colors.black");
    opacity: theme("opacity.100");
    border-color: theme("colors.transparent");
}

/* .control-btn is used in the Runs controls section */
button.control-btn {
    color: theme("colors.gray.800");
    background-color: transparent;
    border: none;
    border-radius: theme("borderRadius.DEFAULT");
    padding: theme("padding.1") theme("padding.2");
    font-weight: theme("fontWeight.bold");
}

button.control-btn.active,
html.dark button.control-btn.active {
    color: theme("colors.blue.500");
}

button.control-btn:hover {
    color: theme("colors.blue.500") !important;
}

html.dark .control-btn {
    color: theme("colors.gray.500");
}

/* Forms */

input,
select,
textarea {
    background-color: transparent !important;
    border: theme("borderWidth.DEFAULT") solid theme("colors.gray.500");
    border-radius: theme("borderRadius.DEFAULT");
    padding: theme("padding.1") theme("padding.2");
}

select {
    height: theme("height.8");
}

[type="checkbox"],
[type="radio"] {
    height: theme("height.4");
    width: theme("width.4");
}

/* Dark mode */

html.dark body {
    color: rgba(255, 255, 255, 0.87);
    background-color: theme("colors.gray.800");
}

html.dark button.btn-transparent:hover {
    color: rgba(255, 255, 255, 0.87);
}
