

@font-face {
    font-family: 'IndustryBold';  
    src: url('/assets/fonts/Industry-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
  }

body {
    margin: 0;
    font-family: 'IndustryBold', sans-serif !important;
    background: #121212;
    color: white;
    display: flex;
}
button{
    font-family: 'IndustryBold', sans-serif !important
}

#mainContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #000;
    position: relative;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
}

.toggle-group {
    display: flex;
    gap: 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    background: #333;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #007bff;
    box-shadow: 0 0 10px #007bff, 0 0 20px #007bff;
}

.logout-btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    all: unset;
    cursor: pointer;
}

.logout-btn:hover svg {
    fill: #ff0000;
}

.subnav {
    background: #111;
    padding: 10px 20px;
    display: flex;
    justify-content: flex-start !important;
    gap: 15px;
    align-items: center;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    flex-wrap: wrap;
    flex-shrink: 0;
    position: relative;
    
}

.subnav span {
    font-size: 14px;
}

.subnav input,
.subnav select {
    padding: 5px 8px;
    border-radius: 4px;
    background-color: #111;
    border: 1px solid #555;
    color: white;
    outline: none;
}

.subnav input::placeholder {
    color: #aaa;
}

#checkConnection,
#runButton,
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    color: white;
   
}
.action-btn{
    display: flex;
    align-items: center;
    gap:5px;
}
#checkConnection {
    background: #444;
    margin-left: 20px;
}

#runButton {
    background: #28a745;
    align-items: center;
    padding: 2px 10px;
}
#runButton img {

vertical-align: middle;
}

#runButton:hover {
    background: #218838;
}

.action-btn.copy {
    background: #17a2b8;
}

.action-btn.disconnect {
    background: #dc3545;
}

.action-btn.copy:hover {
    background: #138496;
}

.action-btn.disconnect:hover {
    background: #c82333;
}

.connection-tag {
    display: none;
    padding: 6px 12px;
    border: 2px solid green;
    border-radius: 20px;
    background: #0a0a0a;
    color: white;
    font-size: 14px;
    font-weight: bold;
    align-items: center;
    gap: 8px;
}

.connection-tag .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: green;
}

#extraFields,
#playbackExtraFields {
    display: none;
    gap: 15px;
    align-items: center;
}
#playbackChartContainer {
    display: none;  
    width: 1000px;   
    margin-top: 20px;
  }

#contentArea {
    flex: 1;
    display: flex;
    overflow: hidden;
}

#pageContent {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column; /* stack children vertically */
    align-items: center;    /* keep them centered horizontally */
}
#video {
    background: #222;
    border: 1px solid #555;
}

#logSidebar {
    width: 250px;
    background: #1a1a1a;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#camInfo,
#logs {
    flex: 1;
    padding: 10px;
    box-sizing: border-box;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    min-height: 0;}

#logs {
    border-bottom: none;
}

#camInfo h3,
#logs h3 {
    margin: 0;
    text-align: center;
    padding-bottom: 10px;
    flex-shrink: 0; }
    .camTableWrapper,
    .logsWrapper {
        flex: 1;
        overflow-y: auto; 
        min-height: 0;    
    }
    .logsWrapper {
        padding-right: 8px;   
    }
    #camTable thead th {
        position: sticky;
        top: 0;
        background: #222;    
        z-index: 2;        
    }
    #camTable {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    table-layout: fixed;
}
.logs-header{
    border-bottom: 1px solid #333;
}

.camTableWrapper::-webkit-scrollbar,
.logsWrapper::-webkit-scrollbar,
#deviceInfoTable tbody::-webkit-scrollbar ,#pageContent::-webkit-scrollbar {
    width: 10px;
}

.camTableWrapper::-webkit-scrollbar-track,
.logsWrapper::-webkit-scrollbar-track,
#deviceInfoTable tbody::-webkit-scrollbar-track ,#pageContent::-webkit-scrollbar-track {
    background: #1a1a1a; 
    border-radius: 5px;
}

.camTableWrapper::-webkit-scrollbar-thumb,
.logsWrapper::-webkit-scrollbar-thumb,
#deviceInfoTable tbody::-webkit-scrollbar-thumb ,#pageContent::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 5px;
}

.camTableWrapper::-webkit-scrollbar-thumb:hover,
.logsWrapper::-webkit-scrollbar-thumb:hover,
#deviceInfoTable tbody::-webkit-scrollbar-thumb:hover ,#pageContent::-webkit-scrollbar-thumb:hover {
    background: #00bfff; 
}

/* Firefox */
.camTableWrapper,
.logsWrapper,
#deviceInfoTable tbody ,#pageContent {
    scrollbar-width: thin;
    scrollbar-color: #007bff #1a1a1a; 
}
#camTable td, 
#camTable th {
  word-wrap: break-word;  
  white-space: normal; 
  overflow-wrap: break-word; 
}

#camTable th,
#camTable td {
    padding: 6px 8px;
    border-bottom: 1px solid #333;
}

#camTable th {
    background: #222;
    color: #00bfff;
}

.online {
    color: #00ff00;
    font-weight: bold;
}

.offline {
    color: #ff0000;
    font-weight: bold;
}

.log-entry {
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 5px;
    cursor:default;
    font-size: 14px;
    transition: background 0.3s;
}

.log-entry.success {
    background: #28a745;
}

.log-entry.info {
    background: #ff9a03;
}

.log-entry.error {
    background: #ff0000;
}

/* .log-entry:hover {
    background: #333;
} */
.modal-header-seg{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-actions{
    display: flex;
  justify-content: center;
}
.form-group{
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}
.modal-btn {
    cursor: pointer;
}
.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
}
#popupModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 660px;
    height: 400px;
    background-color: #222;
    border: 2px solid #007bff;
    border-radius: 10px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 0 20px #007bff;
    overflow-y: auto;
}
#iotisticOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* semi-transparent black */
    z-index: 999; /* make sure it's above content but below popup */
    display: none; /* hidden by default */
  }
#playbackSegmentPopup {
    display: none; /* hidden by default */
    position: fixed; /* fixed in viewport */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* center horizontally & vertically */
    background-color: #1e1e1e; /* your modal background */
    padding: 20px;
    border-radius: 8px;
    width: 400px; /* adjust as needed */
    max-width: 90%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
}

#playbackSegmentPopup .modal-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#playbackSegmentPopup .close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
}

.popupModal{
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 660px;
    height: 400px;
    background-color: #222;
    border: 2px solid #007bff;
    border-radius: 10px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 0 20px #007bff;
    overflow-y: auto;

}
#popupModal h2 {
    margin-top: 0;
    text-align: center;
    color: #fff;
}

#closePopup {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #e63946;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
}

#deviceInfoTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
    table-layout: fixed;
    /* optional, keeps column widths neat */
}

#deviceInfoTable thead {
    display: table;
    /* keep header fixed */
    width: 100%;
}

#deviceInfoTable tbody {
    display: block;
    /* make tbody scrollable */
    max-height: 250px;
    /* adjust height as needed */
    overflow-y: auto;
    width: 100%;
}

#deviceInfoTable tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
    /* ensures row cells align with header */
}

#deviceInfoTable th,
#deviceInfoTable td {
    padding: 4px 8px;
    border-bottom: 1px solid #333;
}

#deviceInfoTable th {
    color: #00bfff;
    text-align: left;
}

.stop-btn {
    padding: 2px 10px !important;
    background-color: #ff0000 !important;
}

.device-info {
    width: 100%;
    margin-top: 20PX;
    display: none;
}

.device-info button {
    width: 100%;
    padding: 10px 0px;
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: ease-in 0.3s;
}

.device-info button:hover {
    background-color: #0056b3;
}
.disconnect-x {
    margin-right: 8px;
    font-weight: bold;
    padding-bottom: 2px;
    cursor: pointer;
    color: gray; 
    transition: color 0.2s;
}

.disconnect-x:hover {
    color: #ff4444; /* red on hover */
}
.logo-separator {
    display: inline-block;
    width: 3px; /* thickness of the line */
    height: 100%; /* now matches parent height */
    background-color: white;
}
.bi-trash3-fill {
    fill: #fff;        
    transition: fill 0.2s; 
    cursor: pointer;
  }
  
  .bi-trash3-fill:hover {
    fill: #ff0000;     
  }

/* Input field */
#DeviceId {
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #1e1e1e;
    color: white;
    font-size: 14px;
    outline: none;
}

/* Dropdown list */
#deviceList {
    position: absolute;
    top: 130%;      /* below input */
    width: 211px;
    max-height: 200px;
    margin-top: 4px;
    padding: 0;
    list-style: none;
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    display: none;
    z-index: 1000;

    /* Scrollbar like logs */
    overflow-y: auto;
    scrollbar-width:auto;
    scrollbar-color: #007bff #1a1a1a;
}

/* Webkit scrollbar */
#deviceList::-webkit-scrollbar {
    width: 10px;
}

#deviceList::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 5px;
}

#deviceList::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 5px;
}

#deviceList::-webkit-scrollbar-thumb:hover {
    background: #00bfff;
}

/* Options */
#deviceList li {
    padding: 6px 10px;
    cursor: pointer;
    border-bottom: 1px solid #444; /* separator between options */
    transition: background 0.2s;
}

#deviceList li:last-child {
    border-bottom: none; /* no border after last item */
}

#deviceList li:hover {
    background: #444; /* hover effect */
}





/* video controllers*/
#videoContainer {
    position: relative;
    display: inline-block; 
    border: 1px solid #555;

  }

  #video {
    display: block;
  }

  #controlBar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0 !important;
    width: 100% !important;
    height: 45px; 
    background-color: rgba(0, 0, 0, 0.788); 
    opacity: 0; 
    transition: opacity 0.3s ease;
}

#videoContainer:hover #controlBar {
    opacity: 1; /* appear on hover */
}
.controller_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 10px;
    margin: auto 10px;
    width: 100%;
}
.right_controllers , .left_controllers{
padding:0px  10px !important;
}
.left_controllers{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.right_controllers {
    border-radius: 50px;
    display: flex;
    gap: 10px;
    position: relative;
    background-color: #444;
    padding: 0 10px;
    align-items: center;
}

.control-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}
.volume-container {
    position: relative;
    display: flex;
    align-items: center;
}
.volume-container:hover{
    width: 140px; 
}
/* Volume button */
#volumeBtn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 16px;
}
.volume-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;   
    transition: width 0.3s ease;
    width: 28px;        
}

#volumeRange {
    width: 100px;      
    margin-left: 10px;  
    opacity: 0;
    transition: opacity 0.3s ease;
}
.volume-container:hover {
    width: 140px;       
}
.volume-container:hover #volumeRange {
    opacity: 1;         
}


.play-pause-container, .stop-container,.live-stream-control-btns {
    display: flex;
    align-items: center;
    background-color: #444;
    border-radius: 50px;
    padding: 5px;
}
.play-pause-container{
    display: none ;
}

#playPauseBtn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 16px;
}
.time-container, .live-container {
    display: flex;
    align-items: center;
    background-color: #444;
    border-radius: 50px;
    padding: 0 10px;
    height: 28px !important; 
    font-size: 14px;
}
.live-container {
    display: flex;
    align-items: center !important;       
    justify-content: center !important;   
    gap: 5px;
    height: 28px;   
    font-size: 12px;            
    color: red;
    font-weight: bold;
}
.live-container span {
    color: #fff;              
    display: inline-flex;
    align-items: center;        
    line-height: 1;            
}
#timeRangeSlider {
    position: relative;
    width: 94%;
    height: 6px;
    margin: 20px auto;
  }
  
  .slider-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background: #ccc;
    border-radius: 3px;
  }
  
  .slider-range {
    position: absolute;
    top: 0;
    height: 6px;
    background: #3b82f6;
    border-radius: 3px;
  }
  
  .thumb {
    position: absolute;
    top: -7px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
  }
  