/* Work around admin.css that formats 'abbr' elements without resetting UA stylesheet */

abbr[title] {
  text-decoration: none;
}

/* Work around admin.css that formats 'abbr' elements without a 'title' attribute */

abbr:not([title]) {
  border-bottom: none;
  cursor: text;
}

.h4 {
  font-weight: 700;
}

.nowrap {
  white-space: nowrap;
}

/* Work around admin.css that 1.1x textsize in li>p because two relative font-size increases of 1.1em */
li>p {
  font-size: unset;
}

/* Dunno why that thing is set to position: relative in admin.css
 * Without this fix the dropdown menu is positioned relative to the menu button
 * and will be shown mostly off-screen to the right. */

.nav-mobile .dropdown {
  position: static;
}

.yamm .dropdown-menu {
  left: 0;
}

.prim-singlecol select,
.prim-singlecol input,
.twitter-typeahead {
  width: 100%;
}

.prim-multicol {
  margin: 0 -15px;
}

.prim-multicol .form-group {
  margin-bottom: 1em;
}

.prim-narrow-row.form-group {
  margin-bottom: 0;
}

.prim-multicol button {
  width: 100%;
  padding-left: 0.1em;
  padding-right: 0.1em;
}

.prim-sitemap li {
  padding-top: 0.5em;
}

.prim-submenu {
  display: block;
  padding-bottom: 1.5em;
}

.prim-submenu:after {
  content: "";
  clear: both;
  display: table;
}

.prim-submenu .active {
  font-weight: bold;
}

.prim-disabled {
  opacity: 0.6;
}

select[disabled] {
  cursor: not-allowed;
}

/* The form warnings are always included so we can trigger them from JS */

.prim-warning {
  display: none;
}

.has-warning .prim-warning {
  display: block;
}

/* Admin CSS adds a space as before-text to collapse class elements
 * with display: table; for some reason!
 * Undo this where we're collapsing table rows.
 */

.prim-fix-collapse::before {
  display: none;
}

/* vertically adjust input to label */

input[type="radio"] {
  margin-top: -0.1em;
  vertical-align: middle;
}

select {
  margin-top: 0.3em;
  vertical-align: middle;
}

/* Fixes bug with iOS and the way we use the tabs... */

@media (max-width: 767px) {
  .nav-tabs > li > a:hover::before {
    display: none;
  }
  /* On Prämienrechenr page the icon is positioned a bit differently */
  #iconA2.iconA2-praemiencalc {
    top: 35px;
  }
}

.prim-results {
  padding-left: 0;
  list-style: none;
  margin: 0 -15px;
}

.prim-results .prim-row {
  padding: 15px;
  margin-left: 0;
}

#form-premiums {
  margin-top: 40px;
}

/*
.prim-results .prim-row:nth-child(even) {
    background-color: #f5f5f5;
}
*/

.prim-active-row {
  background-color: #f9f1c6;
}

.prim-results .prim-row.prim-active {
  background-color: #f9f1c6;
}

.prim-results .prim-active thead th {
  background-color: #fff89c;
}

.prim-results h4 {
  margin: 0;
}

.prim-results .table-responsive {
  border: 0;
  margin-bottom: 0;
}

.prim-results .table {
  border: 1px solid #ddd;
}

.prim-results .prim-active h4 small {
  display: inline-block;
  margin-left: 0.5em;
  color: #454545;
}

.prim-results table caption {
  padding-top: 0;
}

.prim-results .prim-active table caption {
  color: #454545;
}

.prim-results .prim-values > div {
  float: left;
}

.prim-model {
  width: 10em;
  padding-right: 1em;
}

.prim-numcell {
  min-width: 6em;
  padding-right: 2em;
  text-align: right;
}

.prim-savings .prim-value span {
  font-weight: bold;
}

.prim-details h4 {
  margin-top: 0.5em;
}

.table-responsive {
  margin-bottom: 22px;
}

.table-responsive > .table {
  margin-bottom: 0;
}

.well .h4:first-child,
.well .h5:first-child,
.well .h6:first-child {
  margin-top: 0;
}

.has-error,
.has-warning {
  padding: 0 15px;
}

.chosen-container {
  display: block;
}

/* Savings display */

.savings-positive {
  color: #008000 !important;
}

.savings-negative {
  /* $venetian-red */
  color: #dc0018 !important;
}

.table-responsive .list-unstyled {
  margin: 0;
}

.table-responsive .list-unstyled li {
  white-space: nowrap;
}

/* Disables arrow on pages without dropdown, bad solution but ¯\_(ツ)_/¯
TODO -> update when navigation is updated */

.nav-main.yamm .nav > li:nth-child(1) a:after,
.nav-main.yamm .nav > li:last-child a:after {
  content: none;
}

.nav-mobile-ul > .list-sub:nth-of-type(1):after,
.nav-mobile-ul > .list-sub:nth-of-type(2):after,
.nav-mobile-ul > .list-sub:last-of-type:after {
  content: none;
}

.nav-main.yamm .nav > li > a {
  max-width: 300px !important;
  width: fit-content !important;
  white-space: nowrap;
}

/* Adds spacing between rows. */

.nav-main.yamm .col-sm-3 {
  padding-bottom: 2em;
}

/* Makes subheadings bigger. */

.nav-main.yamm .col-sm-3 > a[role="menuitem"] {
  font-size: 1.1em;
}

/* Adds indentation to lists below subheadings. */

.nav-main.yamm .col-sm-3 > a[role="menuitem"] + ul > li {
  padding-left: 0.8em;
}

/* Highlights currently selected elements. */

.nav-main .yamm-content .current {
  font-weight: bold;
}

.footnote-list .footnote-content {
  font-size: smaller;
}

.footnote-list .footnote-mark {
  float: left;
}

.footnote-list .footnote-text {
  margin-bottom: 0;
  margin-left: 0.75em;
}

.table-costs tbody th {
  font-weight: normal;
}

.table-costs tbody tr.total th,
.table-costs tbody tr.total td {
  font-weight: bold;
}

.table-costs tbody tr.total-part th,
.table-costs tbody tr.total-part td {
  font-style: italic;
}

@media (max-width: 500px) {
  .nav-tabs li {
    width: 100%;
  }
  .nav-tabs > li + li > a {
    border-left-width: 1px !important;
  }
  .prim-results .prim-values > div {
    padding: 0;
    float: none;
  }
  .prim-results .prim-label {
    float: left;
    text-align: left;
    width: 15em;
  }
  .prim-results .prim-value {
    width: 100%;
    text-align: right;
  }
}

.aaicon {
  width: 50%;
  max-width: 150px;
}

/* CSS for algolia-autocomplete taken from <https://github.com/algolia/autocomplete.js/tree/v0.35.0#look-and-feel> */

.algolia-autocomplete {
  width: 100%;
}

.algolia-autocomplete .aa-input,
.algolia-autocomplete .aa-hint {
  width: 100%;
}

.algolia-autocomplete .aa-hint {
  color: #999;
}

.algolia-autocomplete .aa-dropdown-menu {
  width: 100%;
  background-color: #fff;
  border: 1px solid #999;
  border-top: none;
}

.algolia-autocomplete .aa-dropdown-menu .aa-suggestion {
  cursor: pointer;
  padding: 5px 4px;
}

.algolia-autocomplete .aa-dropdown-menu .aa-suggestion.aa-cursor {
  background-color: #b2d7ff;
}

.algolia-autocomplete .aa-dropdown-menu .aa-suggestion em {
  font-weight: bold;
  font-style: normal;
}

.no-top-margin {
  margin-top: 0;
}

.toggle-all-container {
  float: right;
}
.sticky-table thead > tr > th {
  border: none;
}
/* Sticky table headers */
@media screen and (min-width: 768px) {
  .stuck {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2;
  }
}

.sticky-table {
  overflow-y: auto;
  height: 700px;
}

.table-bordered {
  border: 0;
}

.sticky-table {
  border: 1px solid #ddd;
}

.stickyBar {
  position: relative;
  z-index: 10;
}

.icon--after.icon--external:after {
  z-index: 0;
}

@media (min-height: 1000px) {
  .sticky-table {
    height: calc(100vh - 800px);
  }
}

@media print {
  @page {
    size: portrait;
  }
  .sticky-table {
    width: 100%;
    overflow: visible;
    height: initial;
    float: none !important;
    position: static !important;
  }
  .sticky-table * {
    float: none !important;
    position: static !important;
  }
  .tablesorter-header::after {
    display: none;
  }
  .icon--after.icon--external::after {
    display: none;
  }
}

.sticky-table .tablesorter-header {
  z-index: 100;
}

/*
Without this the z-index of the external links icons in the tables on the result pages
will have no effect, and they will appear above the fixed table header.
*/
.icon--after.icon--external:after {
  position: initial !important;
}

/* faq new css */
.faq-search-container {
  margin-bottom: 15px;
  float: right;
}

.faq-search-container>label {
    margin-right: 5px;
}

.faq-contactbox {
  margin-top: 55px;
}

#faq-search {
    /* By using Font-size >= 16, Safari no longer zooms in when using the input */
    font-size: 16px;
}

span.deleteicon {
    position: relative;
    display: inline-flex;
    align-items: center;
}
span.deleteicon span {
    position: absolute;
    display: block;
    right: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    color: #fff;
    background-color: #ccc;
    font: 13px monospace;
    text-align: center;
    line-height: 1em;
    cursor: pointer;
}
span.deleteicon input {
    padding-right: 18px;
    box-sizing: border-box;
}

details:first-child {
  border-top: 1px solid grey;
}

details {
  border-bottom: 1px solid grey;
  padding-top: 10px;
  padding-bottom: 5px;
}
summary {
  font-weight: bold;
}

summary::before {
  content: "+";
  font-weight: normal;
  padding-right: 5px;
  font-size: 1.5em;
  font-family: monospace;
}

/* remove mobile markers - PRIM-923 */
details > summary::-webkit-details-marker {  display: none; }

/* When a FAQ entry has content, we mark the toggle so people can see there's soemthing to expand. */
summary.marked::before {
  background-color: #fffab2;
  display: inline-block;
  width: 0.6em;
  margin-right: 5px;
}

summary:hover {
  cursor: pointer;
}

details[open] > summary::before {
  content: "-";
  font-weight: normal;
}

details[open] > summary {
  padding-bottom: 10px;
}

mark.mark {
    padding: 0.2em 0.1em;
}

/* overwrite admin styles to make the page beautiful */

@media (min-width: 992px) {
  .container {
    width: 100% !important;
  }
  .container-main {
    margin-bottom: 0 !important;
  }
}

@media (min-width: 768px) {
  .container {
    width: 100%;
  }
  .container-main {
    margin-bottom: 0 !important;
  }
}

.nav-main {
  background: none;
  background-color: #e4e4e4;
}

ul.nav.navbar-nav {
  /* margin: 0 !important; */
  border: 0 !important;
}

.nav-main.yamm .nav > li {
  border: 0 !important;
}

.nav-main.yamm .nav > li > a {
  background: none;
  background-color: #f1f1f1;
  font-size: 14px;
  padding: 15px 10px;
}

.nav-main.yamm .nav > li > a:focus,
.nav-main.yamm .nav > li > a:hover {
  background: none;
  background-color: #d5d5d5;
}

.nav-main.yamm .nav .dropdown > a {
  display: flex;
  align-items: center;
  padding: 5px 20px;
}

.nav-main.yamm .nav > li > a:after {
  position: unset !important;
  margin-left: 6px;
}

.yamm-close-bottom {
  display: none;
}

@media only screen and (max-width: 767px) {
  .nav-services {
    position: absolute;
    top: 0;
    right: 50px;
    z-index: 100;
    background: none;
  }
}

/* this is necessary so that the menu won't break lines before going to mobile */
@media only screen and (max-width: 795px) {
  .nav-main.yamm .nav .dropdown > a {
    padding: 3px 15px;
  }
}

.brand {
  margin-top: 20px;
  margin-bottom: 20px;
}

.brand img {
  padding: 20px;
}

#logoPriminfo {
  padding-right: 20px;
}

#logoAdmin {
  margin-left: 10px;
  border: 0;
}

#period-selection {
  display: flex;
  padding-bottom: 1.5em;
}

#period-selection div:first-child {
  margin-right: 10px;
}

.hiddenCell {
  display: none;
  visibility: hidden;
}

/* this media query needs to be overwritten */
@media only screen and (max-width: 991px) {
  .brand img {
    max-height: 100px !important;
  }
  .brand.hidden-xs {
    width: 100% !important;
  }
}

/* We want to define secondary table headers with scope=row
   in some tables. */
th.secondary {
  font-weight: normal;
}

/* Make sure the entire table fits on mobile view without sideways scrolling
   via word-break & overflow-wrap (PRIM-882) */
.monthlyCell {
    word-break: normal;
    overflow-wrap: anywhere;
}

.yearlyCell {
    word-break: normal;
    overflow-wrap: anywhere;
}

.bordered {
  border-radius: 8px; /* so it fits the a2-box design */
}

.bordered>.well {
  border-radius: 8px; /* same as above */
}

.a2-box {
  border: 2px solid #ccc;
  border-radius: 8px;
  margin-bottom: 22px;
  padding: 20px;
}

/* contains text that may collide with the iconA2 */
.a2-collision-zone {
  padding-right: 120px;
}

.a2-hint {
  font-weight: bold; /* PRIM-1034 */
}

.icon-gebaerdensprache {
  display: inline-block;
  position: absolute;
  right: 15px;
  padding-right: 20px;
  /*bottom: 5px;*/
}

.icon-gebaerdensprache:hover {
  /* FIXME: this could be visually improved */
  height: 125px;
  width: 125px;
}


#iconA2 {
  display: inline-block;
  position: absolute;
  right: 15px;
  top: 15px;
  padding-right: 20px;
}

#canton-table-container {
  overflow: visible; /* Need to show auto-suggest list above B1-box */
}

/* WCAG AA contrast requirements */
a {
  color: #22729B;
}

a:visited {
  color: #A352A3;
}

body,
p {
  color: #212121;
}

.td-green {
  background-color: rgba(26, 203, 8, 0.7);
}

.td-red {
  /* 4.5:1  is the contrast requirement */
  /*background-color: rgba(211,10,22,0.75); /* contrast 3.01:1 */
  background-color: #F9717C; /* contrast 4.62:1 */
}

th.td-green::before {
  /*float: left;*/
  margin-right: 10px;
  content: "👍";
}

th.td-red::before {
  content: "👎";
  margin-right: 10px;
}


.text-wrap-line{
  white-space: pre-line;
}

.td-summary {
  text-decoration: underline 1px #000000 double;
}

.franchise-table-spec {
  overflow-x: scroll;
}

#franchise-calc-results > tbody > tr.no-border > th { /*Needs border-left*/
  border-left: solid #ddd 1px;
  border-bottom: 0;
  border-right: 0;
  border-top: 0;
  padding-top: 0;
  padding-bottom: 0;
}

#franchise-calc-results > tbody > tr.no-border > td {
  border-top: 0;
  border-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

#franchise-calc-results > tbody > tr.no-border > td:last-child { /*Needs border-right*/
  border-right: solid #ddd 1px;
  border-bottom: 0;
  border-left: 0;
  border-top: 0;
  padding-top: 0;
  padding-bottom: 0;
}

#form-premiums > fieldset > div > select.form-control {
  width: 100%; /* Franchiserechner needs full width inputs otherwise looks bad... */
}

.grid-tabular-list {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 1px;
}

.no-margin {
  margin: 0;
}



.nav-heading {
  /* Takes some styles from admin.css::.nav-page li a */
  color: #757575;
  line-height: 1.5;
}
