/*
 * Base styles the frontend was built on top of.
 *
 * The old PHP runtime injected Bootstrap 2 into every page and app.css only overrides parts of it. This file
 * replaces that: the element defaults and the handful of Bootstrap classes the frontend still uses, with the
 * same values, so app.css keeps working. Load it before app.css.
 */

/* --- Style guide tokens (from @Infowijs-eng/web-components theme/infowijs.css) --- */

:root {
    --font-sans: "Infowijs-Body", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-display: "Infowijs-Title", hoy, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    --color-gray-50: #f0f1f1;
    --color-gray-100: #dddfe0;
    --color-gray-200: #d0d2d4;
    --color-gray-300: #b5b9bc;
    --color-gray-500: #7f868c;
    --color-gray-950: #2a2c2f;

    --color-green-100: #b7f0d3;
    --color-green-500: #2aca79;
    --color-green-600: #24ac67;

    --color-aqua-500: #3fbbf7;
    --color-aqua-600: #13abf5;
    --color-aqua-700: #0990d1;

    --color-orange-500: #fd9727;
    --color-orange-600: #f98302;

    --color-red-600: #f62e41;

    /* Radii and shadows follow the component lib's rounded-lg / rounded-xl / shadow-md */
    --radius-sm: 8px;
    --radius-card: 12px;
    --radius-full: 9999px;
    --shadow-card: 0 0 0 1px rgba(42, 44, 47, 0.06), 0 1px 3px rgba(42, 44, 47, 0.12), 0 4px 12px -2px rgba(42, 44, 47, 0.12);
    --shadow-popover: 0 0 0 1px rgba(42, 44, 47, 0.06), 0 4px 8px -2px rgba(42, 44, 47, 0.16), 0 16px 32px -8px rgba(42, 44, 47, 0.2);
    --transition-fast: 150ms ease;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray-200) transparent;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background-color: var(--color-green-100);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-green-500);
    outline-offset: 2px;
}

/* --- Elements --- */

body {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--color-gray-950);
    background-color: #fff;
}

a {
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--color-aqua-700);
    text-decoration: underline;
}

p {
    margin: 0 0 10px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 10px 0;
    font-family: inherit;
    font-weight: bold;
    line-height: 20px;
    color: inherit;
}

h1,
h2,
h3 {
    line-height: 40px;
}

h1 { font-size: 38.5px; }
h2 { font-size: 31.5px; }
h3 { font-size: 24.5px; }
h4 { font-size: 17.5px; }
h5 { font-size: 14px; }
h6 { font-size: 11.9px; }

ul,
ol {
    padding: 0;
    margin: 0 0 10px 25px;
}

ul ul,
ul ol,
ol ol,
ol ul {
    margin-bottom: 0;
}

li {
    line-height: 20px;
}

hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid var(--color-gray-100);
    border-bottom: 0;
}

img {
    height: auto;
    max-width: 100%;
    vertical-align: middle;
    border: 0;
}

table {
    max-width: 100%;
    background-color: transparent;
    border-collapse: collapse;
    border-spacing: 0;
}

/* --- Forms --- */

form {
    margin: 0 0 20px;
}

fieldset {
    padding: 0;
    margin: 0;
    border: 0;
}

label,
input,
button,
select,
textarea {
    margin: 0;
    font-size: 14px;
    font-weight: inherit;
    line-height: 20px;
    vertical-align: middle;
}

label {
    display: block;
    margin-bottom: 5px;
}

label,
select,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
input[type="radio"],
input[type="checkbox"] {
    cursor: pointer;
}

select,
textarea,
input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"] {
    display: inline-block;
    height: 20px;
    padding: 4px 6px;
    margin-bottom: 10px;
    color: #555;
    background-color: #fff;
    border: 1px solid var(--color-gray-200);
    border-radius: 8px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    transition: border linear 0.2s, box-shadow linear 0.2s;
}

input,
textarea {
    width: 206px;
}

textarea {
    height: auto;
    overflow: auto;
    vertical-align: top;
}

select {
    width: 220px;
    height: 30px;
    line-height: 30px;
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus {
    border-color: var(--color-green-500);
    outline: 0;
    box-shadow: 0 0 0 3px var(--color-green-100);
}

input[type="radio"],
input[type="checkbox"] {
    margin: 4px 0 0;
    line-height: normal;
}

input[type="file"],
input[type="image"],
input[type="submit"],
input[type="reset"],
input[type="button"],
input[type="radio"],
input[type="checkbox"] {
    width: auto;
}

/* Bootstrap reset search inputs to content-box; browsers make them border-box, which squeezes the padding into the height */
input[type="search"] {
    box-sizing: content-box;
    -webkit-appearance: textfield;
    appearance: textfield;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
    cursor: not-allowed;
    background-color: var(--color-gray-50);
    box-shadow: none;
}

/* Full width, but as tall as the other inputs: 20px plus the 4px padding top and bottom */
input.fluid {
    width: 100%;
    height: 28px;
    box-sizing: border-box;
}

/* --- Grid (row-fluid / spanN / offsetN) --- */

.row-fluid {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.row-fluid > [class*="span"] {
    flex: none;
    width: 100%;
    min-height: 30px;
    margin-left: 2.127659574468085%;
    box-sizing: border-box;
}

.row-fluid > [class*="span"]:first-child {
    margin-left: 0;
}

.row-fluid > .span12 { width: 100%; }
.row-fluid > .span8 { width: 65.95744680851064%; }
.row-fluid > .span6 { width: 48.93617021276595%; }
.row-fluid > .span5 { width: 40.42553191489362%; }
.row-fluid > .span4 { width: 31.914893617021278%; }

.row-fluid > .offset1 { margin-left: 10.638297872340425%; }
.row-fluid > .offset1:first-child { margin-left: 8.51063829787234%; }

/* --- Helpers --- */

.clearfix::after {
    display: table;
    clear: both;
    content: "";
}

.pull-right {
    float: right;
}

.muted {
    color: var(--color-gray-500);
}

/* --- Components --- */

.btn {
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--color-gray-950);
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: var(--color-gray-50);
    border: 0;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn:hover,
.btn:focus {
    color: var(--color-gray-950);
    text-decoration: none;
    background-color: var(--color-gray-100);
}

.btn:active,
.btn.active {
    background-color: var(--color-gray-200);
    transform: scale(0.98);
}

.btn.disabled,
.btn[disabled] {
    cursor: default;
    background-color: var(--color-gray-50);
    opacity: 0.5;
}

.label {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: baseline;
    background-color: var(--color-gray-500);
    border-radius: var(--radius-full);
}

.close {
    float: right;
    font-size: 20px;
    font-weight: bold;
    line-height: 20px;
    color: var(--color-gray-950);
    opacity: 0.2;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.4;
}

.table {
    width: 100%;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 8px;
    line-height: 20px;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--color-gray-100);
}

.table th {
    font-weight: bold;
}

.table thead th {
    vertical-align: bottom;
}

.table thead:first-child tr:first-child th,
.table thead:first-child tr:first-child td {
    border-top: 0;
}

.table tbody + tbody {
    border-top: 2px solid var(--color-gray-100);
}

.progress {
    height: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    background-color: var(--color-gray-50);
    border-radius: var(--radius-full);
}

.progress .bar {
    float: left;
    width: 0;
    height: 100%;
    font-size: 12px;
    color: #fff;
    text-align: center;
    background-color: var(--color-green-500);
    box-sizing: border-box;
    transition: width 0.6s ease;
}

.pagination {
    margin: 20px 0;
}

.pagination-centered {
    text-align: center;
}

.pagination ul {
    display: inline-block;
    margin: 0;
    border-radius: var(--radius-sm);
}

.pagination ul > li {
    display: inline;
}

.pagination ul > li > a,
.pagination ul > li > span {
    float: left;
    padding: 4px 12px;
    line-height: 20px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid var(--color-gray-100);
    border-left-width: 0;
    transition: background-color var(--transition-fast);
}

.pagination ul > li > a:hover,
.pagination ul > li > a:focus,
.pagination ul > .active > a,
.pagination ul > .active > span {
    background-color: var(--color-gray-50);
}

.pagination ul > .active > a,
.pagination ul > .active > span {
    color: var(--color-green-600);
    font-weight: 800;
    cursor: default;
}

.pagination ul > .disabled > a,
.pagination ul > .disabled > span,
.pagination ul > .disabled > a:hover,
.pagination ul > .disabled > a:focus {
    color: var(--color-gray-300);
    cursor: default;
    background-color: transparent;
}

.pagination ul > li:first-child > a,
.pagination ul > li:first-child > span {
    border-left-width: 1px;
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.pagination ul > li:last-child > a,
.pagination ul > li:last-child > span {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}
