/* General styles */

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #fff;
    padding: 15px;
    font-size: 14px;
}

strong {
    font-weight: bold;
}

h1 {
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
    font-size: 1.4rem;
}

p {
    margin-top: 1em;
    margin-bottom: 1em;
}

.message-error,
.message-info {
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

.message-error {
    color: red;
}

.message-info {
    color: green;
}

span.validation {
    color: red;
    font-size: 0.93em;
    margin-left: -0.5em;
    vertical-align: middle;
    white-space: nowrap;
}

.loading-icon {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.07);
    display: none;
    z-index: 100;
}

.loading-icon-outer {
    display: table;
    position: absolute;
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
}

.loading-icon-inner {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

.loading-icon-inner img {
    display: inline-block;
    width: 64px;
    background-color: white;
    padding: 8px;
    border-radius: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
}

.popup-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none;
}


/* Form control styles */

input,
select,
button,
a.button,
textarea {
    box-sizing: border-box;
    padding: 0.43em 0.86em;
    line-height: 143%;
    border: 1px solid #ccc;
    border-radius: 0.29em;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    text-decoration: none;
    font-family: inherit;
    font-size: 100%;
}

input[type=button],
input[type=submit],
input[type=reset],
a.button,
button {
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
    display: inline-block;
    color: #333;
    background-color: #fff;
    transition: background-color 0.1s;
    padding-top: 0.22em;
    padding-bottom: 0.22em;
}

input[type=button]:hover,
input[type=submit]:hover,
input[type=reset]:hover,
a.button:hover,
button:hover {
    background-color: #e6e6e6;
}

input[type=button]:focus,
input[type=submit]:focus,
input[type=reset]:focus,
a.button:focus,
button:focus {
    border-color: #7c9ed5;
}

input[type=text],
input[type=password],
select,
textarea {
    background-color: white;
    color: #666;
    padding: 0.14em 0.43em;
}

input:focus,
select:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: 0 0 4px rgba(102, 175, 233, .6);
}

input:disabled,
select:disabled,
input:disabled:hover,
select:disabled:hover {
    background-color: #ececec;
    cursor: default;
    color: #666;
}

input.primary-button {
    color: white;
    padding-left: 1.79em;
    padding-right: 1.79em;
    background-color: #3d9bd8;
}

input.primary-button:hover {
    background-color: #79b9e3;
}


/* Forms */

.form-table {}

.form-table>tbody>tr>td,
.form-table>tbody>tr>th {
    padding-top: 0.3em;
    padding-bottom: 0.3em;
    vertical-align: top;
}


.form-table>tbody>tr>th {
    text-align: left;
    padding-right: 1em;
    padding-top: 0.7em;
}

.form-table>tbody>tr>td>input[type=checkbox] {
    display: inline-block;
    height: 1.3em;
    margin-left: 0;
}

.form-table span.static-value {
    display: inline-block;
    padding-top: 0.33em;
}

.field-note {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.9em;
    color: #909090;
    padding-top: 0.25em;
    padding-bottom: 0.3em;
    max-width: 40em;
    line-height: 125%;
    font-style: italic;
}

.checkbox-list {
    margin-top: 0.1em;
}

.checkbox-list td {
    vertical-align: top;
}

.checkbox-list td:nth-child(1) {
    padding-top: 0.15em;
    padding-right: 0.3em;
}

.checkbox-list input {
    margin-left: 0;
}

.checkbox-list label {
    line-height: 150%;
}


/* Admin styles */

.filter-settings {
    border: 1px solid #e4e4e4;
    font-size: 95%;
}

.filter-settings th {
    padding-left: 0.8em;
}

.filter-settings td:last-child {
    padding-right: 0.8em;
}

.filter-settings tr:first-child td,
.filter-settings tr:first-child th {
    padding-top: 0.8em;
}

.filter-settings tr:first-child th {
    padding-top: 1.2em;
}

.filter-settings tr:last-child td,
.filter-settings tr:last-child th {
    padding-bottom: 0.8em;
}

.list-view {
    margin-top: 1em;
    border-collapse: collapse;
}

.compact-list {
    font-size: 85%;
}

.compact-list td a {
    text-decoration: none;
    color: black;
}

.compact-list td a:hover {
    text-decoration: underline;
}

.list-view tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.list-view td,
.list-view th {
    border-bottom: 1px solid #ddd;
    padding: 0.5em;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    vertical-align: middle;
    text-align: left;
}

.list-view td:nth-child(4),
.list-view td:nth-child(5) {
    max-width: 30em;
    overflow-x: auto;
}

.list-view th {
    font-weight: bold;
    white-space: nowrap;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
}

.list-view th img {
    opacity: 0.6;
    vertical-align: middle;
}

.list-view th a {
    color: #666;
    text-decoration: none;
}

.list-view td a {
    color: black;
    text-decoration: none;
}

.list-view td a:hover {
    text-decoration: underline;
}

.truncated {
    max-width: 16em;
    line-height: 130%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.truncated.expanded {
    max-width: none;
    line-height: 125%;
    white-space: normal;
    overflow: visible;
}

.nowrap {
    white-space: nowrap;
}

input.invalid {
    background-color: #ffe8e8;
}

.pager {
    margin-top: 1em;
    overflow: hidden;
}

.pager span {
    display: block;
    float: left;
    line-height: 23px;
    margin-right: 10px;
}

.pager a {
    display: block;
    float: left;
    margin-right: 7px;
    margin-bottom: 7px;
    text-decoration: none;
    color: #383f4f;
    border-radius: 3px;
    width: 23px;
    line-height: 23px;
    text-align: center;
    vertical-align: middle;
}

.pager a:link,
.pager a:visited {
    background-color: #f0f0f0;
}

.pager a:hover,
.pager a:active {
    background-color: #ddd;
}

.pager a.current {
    background-color: #ccc;
    border: 1px solid #aaa;
    line-height: 21px;
    box-sizing: border-box;
    cursor: default;
}

.pager a.inactive {
    cursor: default;
}

.pager a.arrow-disabled {
    background-color: white;
    color: #ccc;
    cursor: default;
}


/* Auto-classes: nav */

.nav {
    overflow: hidden;
}

.nav-link {
    display: inline-block;
    padding-right: 1em;
}

.nav-site-area {
    display: block;
    float: right;
}


/* Graphs */

.graph-container {
    width: 100%;
    max-width: 800px;
    height: 150px;
}

.graph-container canvas {
    width: 100%;
    height: 150px;
}

.audience-list td {
    cursor: pointer;
}

.audience-list td:first-child {
    cursor: default;
}


/* New filters */

.filter-area {
    font-size: 95%;
    border: 1px solid #e4e4e4;
    display: table;
    --white-space: 0.8em;
    transition: height 0.3s, width 0.3s;
}

.filter-row {
    display: table-row;
}

.filter-row.fixed {}

.filter-row>* {
    padding-top: var(--white-space);
    vertical-align: middle;
}

.filter-row>*:first-child {
    padding-left: 0.8em;
}

.filter-row>*:last-child {
    padding-right: 0.8em;
}

.filter-row:last-child>* {
    padding-bottom: var(--white-space);
}

.filter-heading {
    display: table-cell;
    padding-right: var(--white-space);
    text-align: left;
    padding-right: 1.5em;
}

.filter-body {
    display: table-cell;
}

.flex-form-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--white-space);
}

.date-preset-label {
    margin-left: 1.5em;
}

.interstitial-word {
    display: inline-block;
}

#EndDateFilter {
    margin-right: auto;
}

.new-filter-dropdown {
    margin-right: auto;
}

.filter-remove-button {
    cursor: pointer;
    width: 1.8em;
    margin-left: auto;
    display: inline-block;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.flex-form-row input[type=radio] {
    margin-top: 0;
    margin-left: 0;
    margin-right: -0.4em;
    cursor: pointer;
}

.radio-label {
    margin-right: 0.3em;
    cursor: pointer;
    user-select: none;
}

.flex-form-row input.big-text {
    width: 100%;
    max-width: 20em;
}

.flex-form-row input.medium-number {
    width: 9em;
}


@media (hover: hover) {
    .filter-remove-button:hover {
        opacity: 1.0;
    }
}
