@import url(https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700);

@font-face {
    font-family: 'myriad';
    src: local('Myriad Regular'), url('../fonts/myriadregular.eot') format('embedded-opentype'),
    url('../fonts/myriadregular.OTF') format("opentype");
}


    html, body {
    height: 100%;
    width: 100%;
}

body {
    background-color: #125AA8;
    margin: 0;
    padding: 0;
    font-family: 'myriad', 'Open Sans', 'sans-serif';
    display: flex;
    flex-direction: column;
}

.header {
    background-color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.header-content .logo {
    padding: 5px;
}

.menu {
    background-color: white;
    display: flex;
}

.menu a {
    display: block;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease-out;
    cursor: pointer;
}

.menu a:hover {
    color: #fff;
}

.menuitem {
    position: relative;
    padding: 25px 20px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    outline: none;
    float: left;
    transition: all 0.3s ease-out;
}

.menuitem .dropdown {
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 5px 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-top: none;
    border-bottom: none;
    list-style: none;
    transition: all 0.3s ease-out;
    max-height: 0;
    overflow: hidden;
    padding-left: 0;
    margin-top: 26px;
}

.menuitem.active {
    background: #3F92D2;
    box-shadow: none;
    border-bottom: none;
    color: white;
}

.menuitem.active .dropdown {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow: hidden;
}

.menuitem.active a {
    color: white;
}

.menuitem .dropdown li {
    padding: 0 10px;
}

.menuitem .dropdown li a {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 10px 0;
    transition: all 0.3s ease-out;
    border-bottom: 1px solid #e6e8ea;
}

.menuitem .dropdown li:last-of-type a {
    border: none;
}

.menuitem .dropdown li:hover a {
    color: #3F92D2;
}

.contentitem {
    background-color: #fff;
    border-radius: 5px;
    padding: 1% 50px;
    margin: 1% auto;    
    width: 100%;      
    overflow-x: auto;
    overflow-y: visible;
}

.content {
    width: 70%;
    margin: 0 auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.contentitem img {
    width: 300px;
    height: 200px;
}

.contentitem #imgsize {
    width: auto;
    height: auto;
}

.contentitem a {
    color: #125aa8;
    text-decoration: none;
    transition: all 0.3s ease-out;
}

.contentitem a:hover {
    color: #033E6B;
}

.footer {
    background-color: #033E6B;
    flex-shrink: 0;
    margin-top: 1%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.footer p, .footer a {
    color: #fff;
}

.error {
    color: red;
}

.warning {
    color: orange;
}

.success {
    color: green;
}

.delete {
    color: black;
    text-decoration: none;
    cursor: auto;
}

.topRow {
    font-weight: bold;
}

.contentitem .RR {
    font-style: italic;
    text-decoration: underline;
}

.incomplete {
    color: red;
}

.empty {
    font-weight: bold;
}

/* Table container */
.table-scroll {
  width: 100%;
  max-height: 60vh;      /* scrolling height */
  overflow: auto;        /* enable horizontal & vertical scroll */
  border: 1px solid #ccc;
}

/* Table itself */
.table-scroll table {
  width: max-content;    /* allow horizontal scroll if needed */
  border-collapse: collapse;
}

/* All cells */
.table-scroll th,
.table-scroll td {
  padding: 8px;
  min-width: 7ch;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid #ccc;
  background-color: #fff;
  color: #000000;
}

/* Sticky header row */
.table-scroll thead th {
  background-color: #125AA8; /* blue header */
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 3;            /* above body */
}

/* Top-left cell (header + first column) */
.table-scroll thead th:first-child {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 4;            /* always on top */
  background-color: #125aa8;
  color: #ffffff;
}

/* Sticky first column */
.table-scroll td:first-child {
  position: sticky;
  left: 0;
  border-right: 1px solid #ccc;
  z-index: 2;            /* above body cells but below header */
}

/* Zebra striping for body rows, including first column */
.table-scroll tbody tr:nth-child(odd) td {
  background-color: #ffffff; /* white */
  color: #000000;
}

.table-scroll tbody tr:nth-child(even) td {
  background-color: #f2f2f2; /* light gray */
  color: #000000;
}

/* Hover effect for entire row */
.table-scroll tbody tr:hover td {
  background-color: #1e73e8; /* lighter blue */
  color: #ffffff;
}

/* Last column border cleanup */
.table-scroll th:last-child,
.table-scroll td:last-child {
  border-right: none;
}

/* Sortable headers */
.table-scroll th.sortable::after {
  content: "\25BC"; /* down arrow */
  position: absolute;
  right: 5px;
  font-size: 0.7em;
  opacity: 0.3;
}

.table-scroll th.asc::after {
  content: "\25B2"; /* up arrow */
  opacity: 1;
}

.table-scroll th.desc::after {
  content: "\25BC"; /* down arrow */
  opacity: 1;
}

.table-scroll th.sortable:hover {
  background-color: #e0e0e0;
}

.table-scroll th.sorted {
  background-color: #f0f0f0;
}

table {
    max-width: 100%;        
    width: 100%;          
    table-layout: auto;
    border-collapse: collapse;
}

.table-wrapper {
    overflow-x: auto;      /* horizontal scroll */
    width: 100%;           /* full container width */
    max-width: 100%;       /* prevent wrapper itself from overflowing */
    -webkit-overflow-scrolling: touch; /* smooth scroll on mobile */
}

.delegations-table {
    width: max-content;    /* table grows naturally based on content */
    min-width: 100%;       /* ensure at least fills wrapper */
    border-collapse: collapse;
}

.table thead th {
    position: sticky;
    top: 0;
    background-color: #f2f2f2;
    z-index: 10;
}

th, td {
    padding: 8px;
    text-align: center;
    white-space: normal;   /* allow text to wrap naturally */
    word-wrap: break-word; /* break long words if needed */
}

.table th {
    background-color: #f2f2f2;
}

td {
    text-align: center;
}

tr:nth-child(even) {
    background-color: #ffffff;
}

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

.card {
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    margin: 1% 0;
    padding: 0 0 1% 0;
}

.table-scroll tr.totals-row td {
  background-color: #125AA8;
  color: #ffffff;
  font-weight: bold;
}

.table-scroll tfoot td {
    position: sticky;
    bottom: 0;
    background-color: #125AA8;
    color: white;
    font-weight: bold;
    z-index: 5;
}

.title {
    color: white;
}

h2 {
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
}

input, select, textarea {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid #ccc;
    transition: 0.5s;
    outline: none;
}

input[type=checkbox] {
    width: auto;
}

input:focus, select:focus, textarea:focus {
    border: 1px solid #125aa8;
}

label {
    font-weight: bold;
    margin: 10px;
}

input[type=submit] {
    width: 100%;
    background-color: #125aa8;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #033E6B;
}

.form-group p {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #999;
}

fieldset {
    border: 1px solid #ddd !important;
    margin: 0;
    padding: 10px;
    border-radius: 5px;
    background-color: #f5f5f5;
}

.required {
    color: red;
    font-weight: normal;
}

.actions {
    display: flex;
    justify-content: flex-end;
}

.actions form {
    margin: 0 10px;
}

.actions form .edit {
    background-color: #125aa8;
}

.actions form .delete {
    background-color: #f44336;
}

.actions form .activate {
    background-color: #4CAF50;
}

.actions form input[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
}

.information_table tbody tr td {
    width: 50%;
    text-align: left;
    vertical-align: top;
}