body *::-webkit-scrollbar {
    width: 6px;
    height: 12px;
    transition: 0.3s var(--card3-gradient-color2);
}

body *::-webkit-scrollbar-thumb {
    background: #ced4da;
}

body *:hover::-webkit-scrollbar-thumb {
    background: #adb5bd;
}

table {
    overflow-x: auto; /* Enable horizontal scrolling */
    max-width: 100%; /* Ensure the table fits within the container */
  }

table::-webkit-scrollbar {
    height: 20px; /* Set the height for the horizontal scrollbar */
  }
  
table::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom left, var(--card3-gradient-color1), #74a1e4db) !important;
    background-size: 200% 100%; /* Double the width for smooth animation */
    animation: scrollGradient 0.5s linear infinite; /* Apply the gradient animation */
    border-radius: 8px;
    border: 4px solid var(--primary-bg-color);
}

/* Optional: Style the scrollbar track */
table::-webkit-scrollbar-track {
    background-color: var(--primary-bg-color);
}

/* Keyframes for moving gradient animation */
@keyframes scrollGradient {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}
.calendar-mode .table th,.calendar-mode .table td  {
    width: 50px !important;
  }


.floating-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card3-gradient-color1); 
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0; /* Padding for better spacing */
    z-index: 1050; /* Ensure it appears above other content */
    text-align: center; /* Center the content */
}
.floating-toolbar .form-group {
    margin-bottom: 0; /* Remove extra margin */
}
.floating-toolbar form {
    margin: 1px 0; /* Vertical margin for spacing between forms */
}
@media (min-width: 768px) {
    .floating-toolbar form {
        display: inline-block; /* Inline block on larger screens */
        margin: 0 5px; /* Horizontal margin for spacing */
    }
}

.warning-popover {
    position: fixed;
    top: 20%;
    transform: translateY(-50%);
    right: 5%;
    z-index: 1050;

  }

p.trunc-200 {
    max-width: 200px; 
    overflow-x: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
}

.cal-key {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    border: 1px solid #000000;        /* light grey border */
    margin-right: 0.5rem;
    border-radius: 2px;            /* subtle rounding */
    vertical-align: middle;
}

th.cal-head {
    overflow-x: hidden;
    white-space: nowrap;
}

th.cal-focus {
    text-decoration: underline;
    font-weight: bold;
    color:#3C588E; /* dark blue color */
}

.cal-nonworking {
    background: repeating-linear-gradient(
        45deg,                       /* diagonal from top-left to bottom-right */
        #ffffff,                    /* white stripe */
        #ffffff 5px,               /* end of white stripe */
        #98f3c6 5px,               /* start of blue stripe */
        #98f3c6 7px                /* end of blue stripe, repeat from here */
    );
}

.cal-booked {
    background: repeating-linear-gradient(
        45deg,                       /* diagonal from top-left to bottom-right */
        #ffffff,                    /* white stripe */
        #ffffff 5px,               /* end of white stripe */
        #337ece 5px,               /* start of blue stripe */
        #337ece 7px                /* end of blue stripe, repeat from here */
    );
}

.cal-other {
    background: repeating-linear-gradient(
        45deg,                       /* diagonal from top-left to bottom-right */
        #ffffff,                    /* white stripe */
        #ffffff 5px,               /* end of white stripe */
        #fad86a 5px,               /* start of blue stripe */
        #fad86a 7px                /* end of blue stripe, repeat from here */
    );
}

sub.date-ending {
    /* bottom: -0.25em; */
    top: -0.24em;
    position: relative;
    font-size: 75%;
    line-height: 0;
    vertical-align: baseline;
    text-transform: lowercase;
    z-index: 0;
}

nav.navbar {
    border-top: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
.table-cal {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate; /* use separate to allow sticky + shadow */
    border-spacing: 0;

    scrollbar-width: thin; /* for Firefox */
    scrollbar-color: #A7C7E7 #f0f0f0; /* thumb and track (Firefox only) */
}

/* All th/td */
.table-cal th,
.table-cal td {
    min-width: 50px;
    width: 50px;
    word-break: break-word;
    text-align: center;
    font-size: clamp(0.5rem, 0.8vw, 0.6rem);
    /* border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6; */
    padding: 0.5rem;
    border-top: 1px solid #dee2e6;
}

.table-cal tbody tr:last-child td {
    border-bottom: 1px solid #dee2e6;
}

/* First two header rows */
.table-cal thead tr:nth-child(1) th:not(:first-child) {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

.table-cal thead tr:nth-child(2) th {
    font-size: clamp(0.3rem, 0.6vw, 0.4rem);
    padding: 0;
}

/* Sticky first column */
.table-cal th:first-child,
.table-cal td:first-child {
    position: sticky;
    left: 0;
    width: clamp(100px, 16vw, 150px);
    min-width: clamp(100px, 16vw, 150px);
    max-width: clamp(100px, 16vw, 150px);

    background-color: white;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem;

    z-index: 2;
    border-top: 1px solid #dee2e667;
    border-bottom: 1px solid #dee2e667;
    border-left: 1px solid #dee2e667;
    box-shadow: 2px 0 0 #dee2e667;
}

/* Higher z-index for header cell */
.table-cal th:first-child {
    z-index: 3;
}

/* Pseudo-border for sticky cell to avoid covering 2nd column */
.table-cal th:first-child::after,
.table-cal td:first-child::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 100%;
    background: #dee2e667;
    pointer-events: none;
}


.table {
    --bs-table-color-type: initial;
    --bs-table-bg-type: initial;
    --bs-table-color-state: initial;
    --bs-table-bg-state: initial;
    --bs-table-color: #212529;
    --bs-table-bg: transparent;
    --bs-table-border-color: #dee2e667;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-color: #212529;
    --bs-table-striped-bg: #3682e611;
    --bs-table-active-color: #212529;
    --bs-table-active-bg: rgba(0, 0, 0, 0.1);
    --bs-table-hover-color: #212529;
    --bs-table-hover-bg: rgba(24, 144, 255, 0.02);
    width: 100%;
    margin-bottom: 1rem;
    vertical-align: top;
    border-color: var(--bs-table-border-color);
}

.bg-img {
    flex-direction: column;
    background: url(../assets/folded_silk.png);
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
    background-size: calc(25vw + 25vh) calc(25vw + 25vh);
    background-position: calc(100% + 1vw) calc(100% + 1vw);
    
}

/* Hide background image on small screens */
@media (max-width: 575.98px) {
  .bg-img {
    background-image: none;
  }
}

.fake-sub-block {
  display: inline-block;      /* or block if you want it to fill the line */
  vertical-align: sub;
  font-size: 0.75em;
  line-height: 1.2;
  white-space: normal;

}

.uppercase-only {
  text-transform: uppercase;
}

.loaderBackground {
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  align-content: center;
  vertical-align: central;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.1);
}

.loader {
  border: 16px solid rgba(126, 175, 240, 0.3);
  border-top: 16px solid #2b79ee;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 1s linear infinite !important;
  z-index: 1100;
  margin: 0;
  position: absolute;
  top: 50%;
  top: calc(50% - 60px);
  left: 50%;
  left: calc(50% + 60px);
  transform: translate(-60px, -60px);
}

@keyframes spin {
  0% {
      transform: rotate(0deg);
  }

  100% {
      transform: rotate(360deg);
  }
}