:root {
    --bg-color: rgb(229 231 235);
    --page-title-color: rgb(31 41 55);
    --base-text-color: rgb(77, 77, 77);
    --base-link-color: rgb(8 145 178);

    --button-primary-bg-color: rgb(2 132 199);
    --button-primary-text-color: #f2f2f2;

    --button-secondary-bg-color: rgb(161, 168, 172);
    --button-secondary-text-color: #f2f2f2;

    --button-danger-bg-color: rgb(248 113 113);
    --button-danger-border-color: rgb(224, 73, 73);
    --button-danger-text-color: rgb(31 41 55);

    --nav-bg-color: rgb(51 65 85);
    --nav-text-color: #f2f2f2;
    --nav-text-active-color: rgb(251 146 60);
    --nav-text-hover-color: rgb(34 211 238);

    --info-bg-color: rgb(236, 241, 248);
    --info-header-color: rgb(75 85 99);

    --main-bg-color: white;

    --danger-color: rgb(248 113 113);
    --danger-text-color: #f2f2f2;

    --row-highlight-text-color: rgb(21 94 117);
    --row-highlight-bg-color: rgb(241 245 249);
}

html {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 16px;
}

body {
    margin: 20px;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--base-text-color);
}

a {
    text-decoration: none;
    color: var(--base-link-color);
}

input,
textarea, select {
    box-sizing: border-box;
    padding: .2rem .5rem;
    color: rgb(75 85 99);
    font-size: 14px;
    margin: 0;
    border: 1px solid rgb(48, 48, 48);
    border-radius: .15rem;
    line-height: 1.12rem;
}

input.invalid,
select.invalid {
    border-color: red;
}

/* Page title */

body > header {
    padding: 0 20px;
}

body > header h1 {
    color: var(--page-title-color);
    font-weight: 700;
    margin: 0;
}

body > header sub {
    vertical-align: baseline;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: large;
}

/* Navigation */

nav {
    background-color: var(--nav-bg-color);
    border-radius: 0.375rem;
}

nav ul {
    list-style: none;
    padding: 0 0 0 20px;
    display: flex;
    align-content: center;
    height: 100%;
}

nav li {
    display: block;
    margin: 0;
    margin: 0 10px;
}

nav a {
    color: var(--nav-text-color);
    line-height: 2.5rem;
    text-decoration: none;
    cursor: pointer;
}

nav a.active {
    color: var(--nav-text-active-color);
    cursor: default;
}

nav a.active:hover { color: var(--nav-text-active-color); }

nav svg {
    position: relative;
    top: 5px;
}

nav path {
    fill: white;
}

nav svg:hover path {
    fill: var(--nav-text-hover-color);
}

nav a:hover {
    color: var(--nav-text-hover-color);
}

/* Root sections */

main {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
}

@media only screen and (max-width: 1058px) {
    main {
        flex-direction: column;
    }
}

main > section {
    box-shadow: 
        0 0 0 0 white, 
        0 0 0 1px rgb(17 24 39 / 0.05), 
        0 20px 25px -5px rgb(0 0 0 / 0.1), 
        0 8px 10px -6px rgb(0 0 0 / 0.1);

    border-radius: 0.75rem;
    padding: 20px;
}

main > section header {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
    color: var(--info-header-color);
}

/* Information content */

section.info {
    background-color: var(--info-bg-color);
    flex: 0 0 400px;
}

@media only screen and (max-width: 1058px) {
    section.info {
        width: auto;
        flex: 1 0;
    }
}

section.main {
    background-color: var(--main-bg-color);
    flex: 1 0;
}

section.info header {
    text-align: center;
}

section.info article {
    font-size: 14px;
}

section.info article p {
    padding: 0;
    margin: 0;
    padding-top: .5rem;
}

section.info article strong {
    font-weight: 600;
}

/* Utility classes */

button {
    line-height: 1.5rem;
    padding: 0 1rem;
    border: 1px solid rgb(100 116 139);
    font-size: .875rem;
    text-transform: none;
    cursor: pointer;
    border-radius: .2rem;
}

button.primary {
    background-color: var(--button-primary-bg-color);
    color: var(--button-primary-text-color);
}

button.secondary {
    background-color: var(--button-secondary-bg-color);
    color: var(--button-secondary-text-color);
}

button.danger {
    background-color: var(--danger-color);
    border-color: var(--button-danger-border-color);
    color: var(--button-danger-text-color);
}

.right {
    display: flex;
    flex-direction: row-reverse;
}

.justify {
    display: flex;
    justify-content: space-between;
}

*.template {
    display: none;
}

*.hidden {
    display: none !important;
}

/* Dialog classes */

div.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

div.modal > div {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    background-color: white;
    margin: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 0 0 0 white, 
        0 0 0 1px rgb(17 24 39 / 0.05), 
        0 20px 25px -5px rgb(0 0 0 / 0.1), 
        0 8px 10px -6px rgb(0 0 0 / 0.1);

    border-radius: 0.25rem;
    padding: 5px;
}

div.modal > div > header {
    flex: 0 0;
    background-color: var(--nav-bg-color);
    color: var(--nav-text-color);
    border-radius: 0.25rem;
    padding: 10px;
    text-align: center;
}

div.modal > div > footer {
    flex: 0 0;
    text-align: right;
}

div.modal > div > footer > button {
    margin-left: 10px;
}

div.modal > div > div {
    flex: 1 0 400px;
    padding: 10px;
    overflow-y: auto;
    flex-basis: content;
}

div.modal > div > div > input,
div.modal > div > div > select {
    width: 200px;
}

div.modal pre {
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    font-size: .875rem;
}

div.modal pre .key {
    color: rgb(58, 94, 117);
}

div.modal pre .number {
    color: rgb(105, 122, 51);
}

div.modal pre .boolean {
    color: rgb(69, 78, 138);
}

div.modal pre .string {
    color: rgb(112, 68, 13);
}

div.modal pre .redacted {
    color: rgb(87, 87, 87);
    font-style: italic;
}

/* Notification classes */

.notifications {
    position: fixed;
    top: 0px;
    right: 0px;
    width: 18rem;
    margin: .5rem;
    z-index: 40;
}

.notifications > div {
    border-radius: 0.25rem;
    border-width: 2px;
    border-color: #d1d5db;
    background-color: white;
    margin-bottom: .5rem;
    position: relative;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.notifications .close {
    position: absolute;
    top: 0px;
    right: 0px;
    z-index: 40;
    padding: 0;
    margin: 0;
    margin-right: .5rem;
    border: none;
    background-color: transparent;
}

.notifications .request {
    padding: .5rem;
}

.notifications .response.success {
    color: #22c55e;
}

.notifications .response.error,
.error {
    color: #ef4444;
}

.notifications .service div {
    margin: .5rem;
    margin-right: 0;
    padding: 0 .5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    overflow-wrap: break-word;
}

.notifications .service .info {
    color: #3b82f6;
}

.notifications .service .error {
    color: #ef4444;
}

.notifications .service .warning {
    color: #f97316;
}

.notifications .service .update {
    color: #22c55e;
}


/* Offers */
section.offers {
    flex: 1 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

section.offers > div {
    flex: 0 0;
    flex-basis: 176px;
    display: flex;
    flex-direction: column;
    height: 250px;
    box-shadow: 
        0 1.6px 3.6px 0 rgba(0,0,0,.132),
        0 0.3px 0.9px 0 rgba(0,0,0,.108);

    border-radius: 0.1rem;
}

section.offers > div div {
    padding: 0 .5rem;
}

section.offers div.icon > div {
    width: 35px;
    height: 35px;
    position: absolute;
    top: 7px;
    background-image: url(images/fc_logo.png);
    background-size: 35px 35px;
    background-repeat: no-repeat;
    background-position: 5px;
}

section.offers div.icon {
    position: relative;
    flex: 0 0 50px;
    padding: 0;
    background: linear-gradient(90deg, 
        rgb(191 219 254 / 0.6) 0%,
        rgb(191 219 254 / .8) 50%,
        rgb(191 219 254 / 1) 100%);
}

section.offers div.custom div.icon {
    background: linear-gradient(90deg, 
        rgb(252 219 254 / 0.6) 0%,
        rgb(252 219 254 / .8) 50%,
        rgb(252 219 254 / 1) 100%);
}

section.offers div.name {
    flex: 0 0;
    font-weight: 500;
    margin-top: .5rem;
}

section.offers div.publisher {
    flex: 1 0;
    font-size: 10px;
}

section.offers div.starts-from {
    flex: 0 0;
    font-style: italic;
    font-size: 10px;
}

section.offers div.price {
    flex: 0 0;
    font-size: 14px;
    padding-bottom: 2px;
}

section.offers div.action {
    flex: 0 0;
    padding: 0;
}

section.offers div.action a {
    line-height: 2.5rem;
    text-align: center;
    display: block;
    font-size: .8rem;
    text-decoration: none;
    border-top: 1px solid rgb(17 24 39 / 0.05);
}

section.offers div.action a:hover {
    background-color: var(--button-primary-bg-color);
    color: var(--button-primary-text-color);
}