/* Fonts */
@font-face {
  font-family: 'Cambria';
  src:url('/fonts/Faux-Omniglot.ttf.woff') format('woff'),
      url('/fonts/Faux-Omniglot.ttf.svg#Faux-Omniglot') format('svg'),
      url('/fonts/Faux-Omniglot.ttf.eot'),
      url('/fonts/Faux-Omniglot.ttf.eot?#iefix') format('embedded-opentype'); 
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Cambria';
  src:url('/fonts/CambriaBold.woff2') format('woff2'),
  url('/fonts/CambriaBold.woff') format('woff'); 
  font-weight: bold;
  font-style: normal;
}

a {
  color: #037bfa;
  font-weight: bold;
}
a:hover {
  color: #0056b3;
}

/* Paginator */
.paginator {
    text-align: right;
}
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.pagination li {
    margin: 0 0.5rem;
}
.prev.disabled a,
.next.disabled a {
    cursor: not-allowed;
    color: #606c76;
}
.asc:after {
    content: " \2193";
}
.desc:after {
    content: " \2191";
}
.hidden {
    display:none !important;
 }

 .row.reference-form {
    margin-top: 20px;
    margin-bottom: 20px;
    padding-bottom:20px
 }
 .reference-form:nth-of-type(odd) {
    background-color:#fbfbfc;
}
        
.reference-form:nth-of-type(even) {
    background-color:#e9e9f7;
}
h4.green {
    font-weight:bolder;
    color:green;
    padding-top:5px
}
.row.gy-4 {
    padding:20px 0;
}
.card form {
    padding-bottom: 20px
}

/* Flash Messages */
.message {
  position: relative;
  padding: .75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
  border-radius: .25rem;
}
.message.success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

/* Tree View */
.tree{
    --spacing : 1.5rem;
    --radius  : 10px;
  }
  
  .tree li{
    display      : block;
    position     : relative;
    padding-left : calc(2 * var(--spacing) - var(--radius) - 2px);
  }
  
  .tree ul{
    margin-left  : calc(var(--radius) - var(--spacing));
    padding-left : 0;
  }
  
  .tree ul li{
    border-left : 2px solid #ddd;
  }
  
  .tree ul li:last-child{
    border-color : transparent;
  }
  
  .tree ul li::before{
    content      : '';
    display      : block;
    position     : absolute;
    top          : calc(var(--spacing) / -2);
    left         : -2px;
    width        : calc(var(--spacing) + 2px);
    height       : calc(var(--spacing) + 1px);
    border       : solid #ddd;
    border-width : 0 0 2px 2px;
  }
  
  .tree summary{
    display : block;
    cursor  : pointer;
  }
  
  .tree summary::marker,
  .tree summary::-webkit-details-marker{
    display : none;
  }
  
  .tree summary:focus{
    outline : none;
  }
  
  .tree summary:focus-visible{
    outline : 1px dotted #000;
  }
  
  .tree li::after,
  .tree summary::before{
    content       : '';
    display       : block;
    position      : absolute;
    top           : calc(var(--spacing) / 2 - var(--radius));
    left          : calc(var(--spacing) - var(--radius) - 1px);
    width         : calc(2 * var(--radius));
    height        : calc(2 * var(--radius));
    border-radius : 50%;
    background    : #ddd;
  }
  
  .tree summary::before{
    z-index    : 1;
    background : #696 url('/images/expand-collapse.svg') 0 0;
  }
  
  .tree details[open] > summary::before{
    background-position : calc(-2 * var(--radius)) 0;
  }

  .euro {
    text-align: right;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#elenco-contratti {
    table-layout: fixed;
    min-width: 1200px; /* Minimum width to prevent content from becoming too cramped */
}

#elenco-contratti td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#elenco-contratti td.actions {
    white-space: nowrap;
    min-width: 210px;
}

.equal-height-row {
  display: flex;
  flex-wrap: wrap;
}
.equal-height-row > [class*='col-'] {
  display: flex;
  flex-direction: column;
}
.equal-height-row .card {
  flex-grow: 1;
}
.critical {
  background-color: #760c0c;
  color: #ffffff;
}
.very-high {
  background-color: #a50909;
  color: #ffffff;
}
.high {
  background-color: #ff0000;
  color: #ffffff;
}
.medium {
  background-color: #ff8000;
  color: #ffffff;
}
.moderate {
  background-color: #ffa600;
  color: #ffffff;
}
.normal {
  background-color: #0ff22e;
  color: #ffffff;
}

.font-weight-bold {
  font-weight: bold;
}
.payment-info {
    min-width: 120px;
}

.badge.critical {
    background-color: #dc3545 !important;
    color: white;
}

.badge.very-high {
    background-color: #fd7e14 !important;
    color: white;
}

.badge.high {
    background-color: #ffc107 !important;
    color: #212529;
}

.badge.medium {
    background-color: #20c997 !important;
    color: white;
}

.badge.moderate {
    background-color: #6f42c1 !important;
    color: white;
}

.badge.normal {
    background-color: #198754 !important;
    color: white;
}

.payment-info .small {
    font-size: 0.75em;
    line-height: 1.2;
}

#elenco-contratti thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa; /* Ensure background covers underlying content */
    z-index: 10; /* Ensures it stays on top */
}

table#elenco-contratti {
  display:table
}