/*
*
* ==========================================
* CUSTOM UTIL CLASSES
* ==========================================
*
*/

/* bootstrap aditions  */
.fs-7 {
  font-size: 0.85rem !important;
}


/* NUCLEO ICONS STUFF */

.icon {
  position: relative;
  top:  2px;
}

.it-1 {
  top:  1px;
}

.it-2 {
  top:  2px;
}

.it-3 {
  top:  3px;
}

/* GENERAL CSS */

a {
  text-decoration: none;
}

.vertical-nav {
  min-width: 17rem;
  width: 17rem;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  transition: all 0.2s;
  overflow-y: scroll;
  background: #062442;
}

.vertical-nav * {
  transition: all 0.2s;
}

.page-content {
  width: calc(100% - 17rem);
  margin-left: 17rem;
  transition: all 0.2s;
  min-height: 100vh;
}


.vertical-nav-hidden {
  margin-left: -17rem;
}

.page-content-full {
  width: 100%;
  margin-left: 0;
}


.vertical-nav-small {
  padding-top:  50px;
  min-width: 4rem;
  width: 4rem;
}

.vertical-nav-small .sidebar-logo,
.vertical-nav-small .nav-item-text {
  display:  none;
}

.vertical-nav-small ul {
  text-align:  center;
}

.vertical-nav-small .sub-nav {
  padding-left: 5px;
}

.page-content-maxed {
  width: calc(100% - 4rem);
  margin-left: 4rem;
}

.js-table-item-edit {
  cursor:  pointer;
}

.sub-nav {
  padding-left: 20px;
  /*display:  none;*/
}

.sub-nav li a.nav-link {
  padding: 0rem 1rem; ;
}

.bootstrap-select>.dropdown-toggle {
  border: 1px solid #ced4da !important;
}

.js-connections-content {
  display: none;
}


/* SCROLL BAR */

/* width */
::-webkit-scrollbar {
  width: 5px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #062442;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #888;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* CALENDAR AUTO  */

/* Booked days are highlighted in yellow */
.my-bookings-table {
  white-space: nowrap;
}

.my-bookings-table .bg-warning {
    background-color: yellow !important;
}

/* Available days are white */
.my-bookings-table .bg-white {
    background-color: white !important;
}

.my-bookings-table td {
  padding:  5px;
}

.my-bookings-table td[colspan="1"] {
  max-width: 59px;
  overflow: hidden;
}

.fht-cell {
  padding: 5px;
}

.locked-booking > a, .locked-booking > button {
    pointer-events: none; /* Prevents clicking on the link/button underneath */
}

.my-bookings-table .handover-cell {
      background-color: darkred; 
      text-align: center;
      vertical-align: middle;
  }
.my-bookings-table .handover-cell .bi {
      font-size: 1.1rem; 
      font-weight: bold;
  }

.handover-icon {
    display: inline-block;
    background-color: #dc3545; 
    color: white; 
    padding: 2px 5px; 
    border-radius: 3px;
    font-size: 1.1em; 
    line-height: 1;
    vertical-align: middle;
}

.handover-icon-start {
    margin-right: 4px;
}

.handover-cell-parent {
    position: relative;
}

/* The highlight element itself */
.handover-day-highlight {
    position: absolute !important;
    top: 0;
    right: 0; /* Aligns to the far right of the parent TD */
    bottom: 0;
    /* This should roughly match the width of a single day column. */
    /* Based on your other CSS, 59px seems to be the target width. */
    width: 59px; 
    z-index: 5; /* Position it behind the cell's content (text, icons) */
    
    /* It should not interfere with mouse events on the cell itself */
    pointer-events: none;
    
    /* Diagonal red stripes */
    background-image: repeating-linear-gradient(
        45deg,
        rgba(220, 53, 69, 0.85), /* A semi-transparent red */
        rgba(220, 53, 69, 0.85) 10px,
        transparent 10px,
        transparent 16px
    );
}

/* Ensure all content within the cell appears above the highlight pattern */
.handover-cell-parent > * {
    position: relative;
    z-index: 1;
}

.handover-icon-end {
    position: absolute;
    right: 5px; 
    top: 50%;
    transform: translateY(-50%); 
    margin-left: 4px; 
}

.is-handover-day {
    position: relative;
    z-index: 1;
}

.is-handover-day::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    
    background-image: repeating-linear-gradient(
        45deg,
        rgba(220, 53, 69, 0.25), 
        rgba(220, 53, 69, 0.25) 10px,
        transparent 10px,
        transparent 20px 
    );
}

.my-bookings-table th:first-child, 
.my-bookings-table td:first-child {
  position: sticky;
  left: -1rem;
  z-index: 10; 
  background-color: white; 
}

.calendar-container .table thead th {
  position: sticky;
  top: 0;
  background: #fff;     
  z-index: 5;           
}


.my-list-table th,
.my-list-table td {
    white-space: nowrap;
    padding:  10px 20px;
   
}

/* Hide the native time picker UI in Chrome */
input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0;
}



/* for fields in the form highlighted for various reasons - first used for accepted offers in carhunt  */
.highlighted {
    background-color: yellow;
    border: 2px solid #ffa500;
}


/* Calendar table container (left column) scroll */
.calendar-container {
    max-height: calc(100vh - 250px); /* Adjust as needed */
    overflow-y: auto;
    overflow-x: auto; /* Or auto if horizontal scrolling is desired */
    padding: 0 10px;
}

/* Offers sidebar container (right column) scroll */
.offers-container {
    max-height: calc(100vh - 250px); /* Adjust as needed */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}


/* hide the extra-info block until the card is active in calendar view*/
.js-calendar-offer-card .extra-info {
  display: none;
}

/* when card has .active, show it */
.js-calendar-offer-card.active .extra-info {
  display: block;
}



.pulse {
    animation: pulseAnimation 1s ease-in-out infinite;
}

.ui-timepicker-container {
    z-index: 1056 !important; /* Just above Bootstrap modal (default modal is 1050) */
}

/* smooth difing of calendar sidebar  */
#calendarCol {
  transform-origin: top left;
  transition: transform 0.2s ease;
  overflow-x: auto;    /* allow horizontal scroll when zoomed out */
}

.my-bookings-table {
  white-space: nowrap; /* prevent cells wrapping so you see more columns */
}


label.required::after {
    content: " *";
    color: red;
    font-weight: bold;
    margin-left: 2px;
}


/* Add this at the end of your style.css file */

.js-calendar-offer-card.locked {
    position: relative;
    cursor: not-allowed;
}

.card-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(108, 117, 125, 0.7); /* Bootstrap's 'secondary' color with transparency */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border-radius: var(--bs-card-border-radius);
    text-shadow: 1px 1px 2px black;
}


.locked-booking {
    position: relative; /* Needed for the overlay */
    cursor: not-allowed !important;
}

.booking-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(108, 117, 125, 0.7); /* A semi-transparent gray */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
}

.locked-booking > a, .locked-booking > button {
    pointer-events: none; /* Prevents clicking on the link/button underneath */
}

/* A class to highlight the booking the CURRENT user is moving */
td.active-move {
    box-shadow: 0 0 0 3px #0d6efd inset; /* A blue inset border */
    z-index: 5;
    position: relative;
}

@keyframes pulseAnimation {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 165, 0, 0.8);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 165, 0, 0.8);
    }
}



/* Make sure the table fits into smaller screens */
@media (max-width: 768px) {
    .table {
        font-size: 10px;
    }

    .table td, .table th {
        width: 15px;
        height: 15px;
    }
}


/* --- Responsive Sidebar: Hidden by Default on Mobile --- */
@media (max-width: 767.98px) {
    /* Hide sidebar off-screen by default */
    .vertical-nav {
        margin-left: -17rem; /* Default state for mobile */
    }

    /* Make page content full-width by default */
    .page-content {
        width: 100%;
        margin-left: 0;     /* Default state for mobile */
    }
}

/* --- Styles for when sidebar IS SHOWN (overrides mobile default) --- */
/* Add a new class that JS will toggle */
.sidebar-shown {
    margin-left: 0 !important; /* Force sidebar visible */
}

.page-content-shifted {
    margin-left: 17rem !important; /* Force content shift */
    width: calc(100% - 17rem) !important;
}

/* Ensure existing hidden class still works correctly */
 .vertical-nav-hidden {
  margin-left: -17rem !important; /* Make sure this takes precedence */
}

 .page-content-full {
  width: 100% !important;
  margin-left: 0 !important; /* Make sure this takes precedence */
}