/*
Copyright (c) 2019, The JMBG Network
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of The JMBG Network nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE JMBG NETWORK BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

html
{
	position: relative;
	min-height: 100%;
}
body
{
	margin-bottom: 40px; /* Margin bottom by footer height */
}
.footer
{
	position: absolute;
	min-width:350px;
	bottom: 0;
	width: 100%;
	height: 40px; /* Set the fixed height of the footer here */
	line-height: 40px; /* Vertically center the text there */
	background-color: white;
}




/* Bootstrap 5 navbar theme (IPT admin) */
.iptnav.navbar,
.navbar.navbar-dark.iptnav {
  background-color: #006ca7;
  border-bottom: 1px solid #00bcff;
}
.iptnav .navbar-brand,
.iptnav .navbar-nav .nav-link {
  color: #ecf0f1;
}
.iptnav .navbar-brand:hover,
.iptnav .navbar-brand:focus,
.iptnav .navbar-nav .nav-link:hover,
.iptnav .navbar-nav .nav-link:focus {
  color: #ffffff;
}
.iptnav .navbar-nav .nav-link.active,
.iptnav .navbar-nav .show > .nav-link {
  color: #ffffff;
  background-color: #00bcff;
}
.iptnav .dropdown-menu {
  background-color: #006ca7;
}
.iptnav .dropdown-menu .dropdown-item {
  color: #ecf0f1;
}
.iptnav .dropdown-menu .dropdown-item:hover,
.iptnav .dropdown-menu .dropdown-item:focus {
  color: #ffffff;
  background-color: #00bcff;
}
.iptnav .navbar-toggler {
  border-color: #00bcff;
  /* Keep hamburger on the right when the bar is collapsed */
  margin-left: auto;
}
.iptnav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28236, 240, 241, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.iptnav .navbar-collapse {
  border-color: #ecf0f1;
  width: 100%;
}
/* No brand wordmark — keep space free for the right-aligned toggler */
.iptnav .navbar-brand {
  display: none !important;
}

/* Desktop (expanded): icon-only row */
.iptnav .ipt-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  color: #ecf0f1;
  text-align: left;
}
.iptnav .ipt-nav-link .bi {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  width: 1.35rem;
  text-align: center;
}
.iptnav .ipt-nav-icon-img {
  height: 1.25rem;
  width: 1.35rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  object-fit: contain;
}
/* Labels only when the hamburger menu is in use (collapsed / mobile) */
.iptnav .ipt-nav-label {
  display: none;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  opacity: 0.95;
}
.iptnav .dropdown-item.ipt-nav-link {
  color: #ecf0f1;
}
.iptnav .dropdown-item.ipt-nav-link:hover,
.iptnav .dropdown-item.ipt-nav-link:focus {
  color: #ffffff;
  background-color: #00bcff;
}

/* Collapsed (< lg): left-aligned list, icons stacked in one column */
@media (max-width: 991.98px) {
  .iptnav .navbar-collapse {
    text-align: left;
  }
  .iptnav .navbar-nav {
    align-items: stretch;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .iptnav .navbar-nav .nav-item {
    width: 100%;
    text-align: left;
  }
  .iptnav .navbar-nav .nav-link.ipt-nav-link,
  .iptnav .dropdown-item.ipt-nav-link {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    text-align: left;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  /* Fixed icon column so glyphs line up vertically */
  .iptnav .ipt-nav-link .bi,
  .iptnav .ipt-nav-icon-img {
    width: 1.75rem;
    min-width: 1.75rem;
    text-align: center;
  }
  .iptnav .ipt-nav-label {
    display: inline;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
  .iptnav .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0 0 0.25rem 0;
    border: 0;
    border-radius: 0;
    background-color: rgba(0, 0, 0, 0.12);
    text-align: left;
  }
  .iptnav .dropdown-menu .dropdown-item {
    text-align: left;
  }
  /* Nested admin items slightly indented under the Admin row */
  .iptnav .dropdown-menu .dropdown-item.ipt-nav-link {
    padding-left: 1.5rem;
  }
}

/* Cards used in place of BS3 panels */
.card {
  margin-bottom: 1rem;
}

/* BS5 layout/compat fixes */
.ipt-app-grid {
  display: block;
  text-align: center;
  width: 100%;
}
.ipt-app-grid > a {
  display: inline-block;
  vertical-align: top;
  text-decoration: none;
  color: #006ca7;
  width: auto;
  max-width: none;
}
.ipt-app-grid .col1 {
  display: inline-block;
  vertical-align: top;
}
.ipt-app-grid .bi {
  display: inline-block;
  line-height: 1;
  color: #006ca7;
}
.ipt-app-grid > a:hover,
.ipt-app-grid > a:hover .bi,
.ipt-app-grid > a:focus,
.ipt-app-grid > a:focus .bi {
  color: #00bcff;
  text-decoration: none;
}
.ipt-app-grid p {
  color: #006ca7;
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-weight: 500;
}
a[href^="javascript:"] > .btn,
a[href^="javascript:"] button,
a[href*="javascript:"] > .btn,
a[href*="javascript:"] button {
  pointer-events: none;
}
a[href^="javascript:"],
a[href*="javascript:"] {
  cursor: pointer;
}
.btn .bi {
  display: inline-block;
  vertical-align: -0.125em;
  margin-right: 0.15em;
}

/* BS3 btn-default look: light face + border so inline color:/icon colors stay readable */
.btn-secondary {
  --bs-btn-color: #333;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #cccccc;
  --bs-btn-hover-color: #333;
  --bs-btn-hover-bg: #e6e6e6;
  --bs-btn-hover-border-color: #adadad;
  --bs-btn-focus-shadow-rgb: 200, 200, 200;
  --bs-btn-active-color: #333;
  --bs-btn-active-bg: #e6e6e6;
  --bs-btn-active-border-color: #adadad;
  --bs-btn-disabled-color: #333;
  --bs-btn-disabled-bg: #ffffff;
  --bs-btn-disabled-border-color: #cccccc;
  background-color: #ffffff;
  border-color: #cccccc;
  color: #333;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #e6e6e6;
  border-color: #adadad;
}
/* Keep author-specified style.color on text and icons */
.btn-secondary .bi,
.btn-secondary [class^="bi-"],
.btn-secondary [class*=" bi-"] {
  color: inherit;
}
/* Icon-only control buttons in tables */
.btn-sm.btn-secondary {
  padding: 0.15rem 0.4rem;
  line-height: 1.2;
}
/* Modal footer buttons: keep readable navy/maroon text on light face */
.modal-footer .btn-secondary {
  background-color: #ffffff;
  border-color: #cccccc;
}
