/*track tub*/
.tabradio1{
    display: none;
}
:root:has(.tabradio1:checked) .tabcontent1 {
    grid-area: bottom;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    grid-template-areas: "center left";
    height: 100%;
    min-height: 0;
}
.tabradio1:checked+.tablable1{
     color: #ffffff;
    border: 1px solid #274dfe;
    background-color: #274dfe;
    border-radius: 5px;
    margin: 5px;
    padding: 2px;
    width: 70px;
    height: 70px;
}
.tablable1{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1;
      color: #274dfe;
      transition: all 0.2s ease;
    background-color: #ffffff;
    border-radius: 10px;
    margin: 5px;
    padding: 2px;
    height: 60px;
   width: 60px;
   text-align: center;
    cursor: pointer;
}
.tabcontent1 {
    display: none;
    padding: 0;
    grid-column: 1;
    grid-row: 1/4;
    background-color: #F3F4F6;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.list {
    border-radius: 5px;
    margin: 5px;
    grid-area: left;
    background-color: white;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}
.list ul{
    grid-row: 1;
    overflow-y: scroll;
    height: 100%;
    
}

/* Container holding each car row */
.list_item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 8px;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

/* Hover state for rows */
 .list_item:hover { 
            border-color: #007bff;
             background: #f1f7ff; 
             cursor: pointer;
            }
/* Vehicle Car Image styling */
.list_item .image {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-right: 16px; /* Creates clean space between car and text */
}

/* Text wrapper to stack ID and timestamp */
.tracker-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Main tracking identifier text */
.tracker-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a; /* Sharp slate color */
}

/* Subtle, cleaner timestamp styling */
.tracker-time {
  font-size: 12px;
  color: #64748b; /* Cool gray */
}
.list_item.moving .status {
    color: #ffffff;
  background-color: lime;
}

.list_item.parked .status {
    color: #ffffff;
  background-color: red;
}
.list_item.idling .status {
    color: #ffffff;
  background-color:#ec8a2f;
}
.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-online{
    background-color: #dcfce7;
    color:#15803d;
}
.badge-offline{
    background-color: #f1f5f9;
    color:#64748b;
}
.list_item.tapped_list_item{
            border-color: #007bff;
             border-width: 2px; 
             background: #e7f1ff; 
    border-radius: 5px;
    color: white;
}
.list h2{
    margin: 5px;
color: #274dfe ;
font-size: medium;
}
.mapview {
    grid-area: center;
    min-height: 0;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.mapview p {
    margin: 25%;
    color: #274dfe;
    text-align: center;
    font-size: large;
    font-weight: bold;
}

.hello {
    grid-area: top;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    box-sizing: border-box;
    min-height: 72px;
    max-height: 100px;
    background-color: #ffffff;
    color: #274dfe;
    flex-shrink: 0;
    column-gap: 12px;
}

.nav-section.greeting {
    justify-self: start;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabs-container {
    justify-self: center;
    justify-content: center;
    align-items: center;
    height: auto;
    gap: 8px;
    display: flex;
    flex-wrap: nowrap;
}

.hello > a,
.nav-brand-cluster {
    justify-self: end;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}
.tab-btn{
    width:100%;
    text-align: center;
}
.nav-section {
    display: flex;
    align-items: center;
}

#greeting_header {
    text-transform: capitalize;
    justify-content: flex-start;
    color: #274dfe;
    margin: 0;
}

.logo-img {
    justify-self: end;
    height: 36px;
    width: auto;
    display: block;
}
.fa-solid fa-location-arrow{
    size: 1.5rem;
  font-size: 20px;
  margin-left: 5px;
}
.details{
    background-color: white;
    border-radius: 5px 5px 0px 0px;
    padding: 5px;
    align-items: center;
}
.detailGrid{
    display: grid;
grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-areas: 
    "left right"
    "bottom middle"
    "center top";
    border-radius: 10px;
}
.detailP1{
    margin: 2px;
    font-size: 12px;
    gap: 2px;
    display: flex;
    grid-area: left;
}
.detailP2{
    margin: 2px;
    font-size: 12px;
    gap: 2px;
    display: flex;
    grid-area: right;
}
.detailP3{
    margin: 2px;
    font-size: 12px;
    gap: 2px;
    display: flex;
    grid-area: bottom;
}
.detailP4{
    margin: 2px;
    font-size: 12px;
    gap: 2px;
    display: flex;
    grid-area: middle;
}
.detailP5{
    margin: 2px;
    font-size: 12px;
    gap: 2px;
    display: flex;
    grid-area: center;
}
.detailP6{
    margin: 2px;
    font-size: 12px;
    gap: 2px;
    display: flex;
    grid-area: top;
}

.commands{
    grid-row: 2;
}

/* Container splits content to absolute opposite sides */
.commandGrid {
    display: flex;
    align-items: center;
    justify-content:space-around;
    width: 100%;
    padding: 5px 0;
}

/* Playback Minimal Icon Style */
.command5_icon-only {
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.command5_icon-only:hover {
    color: #1e293b;
}

/* Delete Action Position Anchor */
.delete-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#delete_icon {
    font-size: 1.2rem;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s ease;
}

#delete_icon:hover {
    color: #ef4444;
}

/* Floating Popover Bubble Style */
.popup-bubble {
    display: none; /* Hidden by default */
    position: absolute;
    bottom: 140%; /* Floats above the trash icon */
    right: -10px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
    z-index: 100;
    flex-direction: column;
    gap: 6px;
    width: auto;
    border: 1px solid #e2e8f0;
}

/* Little triangle arrow at the bottom of popup */
.popup-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 14px;
    border-width: 6px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

/* Tiny border reinforcement for the arrow shadow */
.popup-bubble::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 13px;
    border-width: 7px;
    border-style: solid;
    border-color: #e2e8f0 transparent transparent transparent;
    z-index: -1;
}

/* Dynamic Active State class toggled via JavaScript */
.popup-bubble.is-active {
    display: flex;
}

.popup-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: system-ui, sans-serif;
}

.popup-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Seamless Select Input */
#tracker_select {
    flex: 1;
    padding: 3px 0;
    border: none;
    border-bottom: 1px solid #cbd5e1;
    background: transparent;
    color: #334155;
    outline: none;
    font-size: 0.85rem;
    cursor: pointer;
}

#tracker_select:focus {
    border-bottom-color: #ef4444;
}

/* Smooth Green Checkmark Trigger */
#confirm_delete_btn {
    background: none;
    border: none;
    color: #22c55e;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.15s ease;
}

#confirm_delete_btn:hover {
    transform: scale(1.15);
}
.command5_label{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    
}
.command5_label span {
    font-size:small;
}
/* The dark background overlay */
.popUp {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* The popup card itself */
.popup-card {
    gap: 5px;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  max-width: 400px;
  width: 90%;
  text-align: center;
  margin-bottom: 10px;
  animation: fadeIn 0.3s ease-out; /* Smooth entrance */
}

/* Entrance animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Button styling */
.popup-btn {
    display: inline-block;
    margin: 0 auto;
  background: #274dfe;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  margin: 5px;
}

.popup-btn:hover {
  background: #0056b3;
}


.routePage{
     display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}
.routePageDiv {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #F3F4F6;
    padding: 5px;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
        "top"
        "bottom";
    overflow: hidden;
    box-sizing: border-box;
}

#play_back_map {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.routediv2 {
    grid-area: top;
    z-index: 5;
    min-height: 0;
    height: 100%;
}

.routediv3 {
    grid-area: bottom;
    width: 100%;
    min-height: fit-content;
    background-color: #274dfe;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    padding: 12px;
    place-items: center;
    overflow-x: auto;
    box-sizing: border-box;
}

.routediv3 h3 {
    grid-column: 1 / -1;
    color: white;
    margin: 0;
}

.routeInput0,
.routeInput1,
.routeInput2 {
    width: 100%;
    max-width: 220px;
    height: 36px;
    border-radius: 5px;
    border: 1px solid white;
    padding: 6px 8px;
    box-sizing: border-box;
}

.routediv3 button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #274dfe;
    height: 36px;
    min-width: 100px;
    padding: 0 16px;
    border-radius: 5px;
    border: 1px solid white;
    cursor: pointer;
}

@media (max-width: 900px) {
    :root:has(.tabradio1:checked) .tabcontent1 {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(240px, 1fr) minmax(200px, 35vh);
        grid-template-areas:
            "center"
            "left";
    }

    .list {
        margin: 0;
        border-radius: 0;
    }
}

/* end of track tab */
#route:checked + .routePage {
    display: block;
    padding: 5px;
}

.routeLabel {
    width: auto;
    padding: 5px 10px;
    border: 1px solid #274dfe;
    background-color: #274dfe;
    font-size: larger;
    position: absolute;
    margin-top: 20px;
    margin-left: 20px;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    z-index: 999;
}