/* Copyright (C) 2020 Christoph Theis */

/* Prevent scroll on narrow devices */
html {
    /* overflow-x: hidden; */
}

/* Force cursor type */
.cursor-default {
    cursor: default;
}

.cursor-pointer {
    cursor: pointer;
}

/* Scroll large lists */
div#events div.panel-collapse.in {
    overflow-y: auto;
    max-height: 50em;
    -webkit-overflow-scrolling: touch;
}

/* Reduce padding in list-group-items of subnavigation */
div#sidebar .panel-body {
    padding: 0px;
}

div#sidebar .list-group {
    margin-bottom: 0px;
}

/* 
 * Changes to default Bootstrap theme 
 */
/* Larger width for popover */
.popover {
    max-width: 480px;
}

/* Font and colors of nav tab */
.nav-tabs .nav-link {
    color: rgba(0, 0, 0, 0.5);
}

.nav-tabs .nav-link.active  {
    _font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
}

/* No shadows on buttons */
.btn:focus {
    box-shadow: none;
}

/* dto page-link */
.page-link:focus {
    box-shadow: none;
}

/* dto. on various inputs */
.form-control:focus {
    box-shadow: none;
}

/* Bold labels */
label {
    font-weight: bold;
}

/* Plain links */
span.cpname a {
    color: inherit;
    text-decoration: none;
}

/* Space between event and pdf link */
li span a.pdf {
    padding-left: 1ex;
}

/* Filter */
div#filter .filter {
    margin-bottom: 0.5em;
}

div#filter .filter legend {
    width: auto; /* BS sets width to 100% */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

div#filter .filter select {
    min-width: 200px;
}

div#filter .filter input {
    min-width: 200px;
}

div#filter legend a, div#filter legend a span {
    background-color: transparent;
    border-color: transparent;
}

/*
 * Off Canvas
 * --------------------------------------------------
 */
/* Show on medium and small screens */
@media screen and (max-width: 991.98px) {
  .row-offcanvas {
    position: relative;
    -webkit-transition: all .25s ease-out;
         -o-transition: all .25s ease-out;
            transition: all .25s ease-out;
  }

  .row-offcanvas-right {
    right: 0;
  }

  .row-offcanvas-left {
    left: 0;
  }

  .row-offcanvas-right .sidebar-offcanvas {
    right: -100%; /* 12 columns */
  }

  .row-offcanvas-right.active .sidebar-offcanvas {
    right: -25%; /* 9 columns */
  }

  .row-offcanvas-left .sidebar-offcanvas {
    left: -100%; /* 12 columns */
  }

  .row-offcanvas-left.active .sidebar-offcanvas {
    left: -85%; /* 9 columns, should be 75% */
  }

  .row-offcanvas-right.active {
    right: 75%; /* 9 columns */
  }

  .row-offcanvas-left.active {
    left: 100%; /* 9 columns */
  }

  .sidebar-offcanvas {
    position: absolute;
    top: 0;
    width: 75%; /* 9 columns */
  }
}


/* For printing hide some elements, open all collapsible */ 
@media print {
    body {
        zoom: 97%;
    }

    header {
        display: none !important;
    }

    footer {
        display: none !important;
    }

    div.navbar {
        display: none !important;
    }
    
    div#sidebar {
        display: none !important;
    }
    
    div#filter {
        display: none !important;
    }
    
    div#pagination {
        display: none !important;
    }

    div#ko-nav {
        display: none !important;
    }
    
    p.toggle-nav {
        display: none !important;
    }
    
    div.collapse {
        display: block !important;
        height: auto !important;
    }
    
    tr.collapse {
        display: table-row !important;
        height: auto !important;
    }
}
