* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    height: 100vh;
    overflow: hidden;
    background: #f5f5f5;
    font-size: 14px;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically centers all flex items, including h1 */
    background: #ffffff;
    color: rgb(0, 0, 0);
    padding: 10px 20px; /* Adjusted padding for better spacing */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    font-weight: 500;
    margin: 0; /* Remove default margins for precise centering */
}
.searchbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;


}

.inputlocation {
    flex-grow: 1;
    border: none;
    border-bottom: 2px solid #35c711; /* Blue line at bottom */
    outline: none;
    background: transparent;
    font-size: 16px;
    padding: 5px 0;
    transition: border-color 0.3s ease;
    color: #333;
}

.inputlocation::placeholder {
    color: #888;
    opacity: 0.7;
    font-size: 14px;
    margin: 7px;
    padding: 8px;
}

.inputlocation:focus {
    border-color: #0056b3; /* Darker blue on focus */
}

.searchinput{
    border: 1px solid #35c711;
    background-color: #35c711;
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}
.location-btn{
    border: 1px solid #35c711;
    background: transparent;
    color: #35c711;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.searchinput:hover, .location-btn:hover {
    background: white;
    color: #35c711;
}

.location-btn {
    padding: 8px 12px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-btn:hover {
    background: #35c711;
    color: white;
}

/* Responsive design */
@media (max-width: 480px) {
    .searchbox {
        flex-direction: column;
        gap: 15px;
    }

    .inputlocation {
        width: 100%;
    }

    .searchinput, .location-btn {
        width: 100%;
        border-radius: 20px;
    }

    .location-btn {
        width: auto;
        border-radius: 50%;
    }
}
.container {
    display: flex;
    height: calc(100vh - 60px); /* Adjust for header */
    margin-top: 105px; /* Offset for fixed header 92 */
}

.control-panel {
    width: 320px;
    background: #ffffff;
    padding: 25px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    border-right: 1px solid #e9ecef;
    z-index: 1000;
    background: linear-gradient(180deg, #ffffff, #f8f9fa);
    /* overflow-y: auto; */
}

.search-section, .route-section, .options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between input and button */
    width: 100%;
}



.select-field {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.select-field:focus {
    outline: none;
    border-color: #0078A8;
    box-shadow: 0 0 10px rgba(0, 120, 168, 0.3);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap; /* Prevents text wrapping */
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.primary {
    background: linear-gradient(45deg, #35c711, #4cd137);
    color: white;
    transition: 0.3s ease;
    font-family: poppins;
}

.primary:hover {
    background: linear-gradient(45deg, #2eb10f, #43b82c);
}


.danger {
    background: linear-gradient(45deg, #dc3545, #e4606d);
    color: white;
}

.danger:hover {
    background: linear-gradient(45deg, #c82333, #d9534f);
}

.location-btn, .getRou, .findNear, .show, .clear-btn {
    width: auto; /* Buttons adjust to content size */
}

.findNear, .clear-btn {
    width: 100%; /* Full-width for standalone buttons */
}

/* Responsive Design */
@media (max-width: 768px) {
    .control-panel {
        width: 280px;
        padding: 20px;
    }

    .input-group {
        flex-direction: column; /* Stack input and button on small screens */
        gap: 10px;
    }

    .input-field, .btn {
        width: 100%; /* Full-width for inputs and buttons */
    }

    .select-field {
        padding: 10px;
        font-size: 14px;
    }
}
#map-container {
    flex: 1;
    height: 100%; /* Ensure it fills the container */
    position: relative;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 350px;
    background: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    padding: 20px;
    position: fixed;
    border-radius: 12px;
    bottom: 20px;
    left: -800px;
    height: 320px;
    transition: left 0.3s ease;
    margin-left: 310px; /* Increased gap from 10px to 20px for more space */
}

.sidebar.visible {
    left: 20px; /* Adjusted to create a gap when visible */
}

.sidebar.hidden {
    left: -900px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    gap: 10px;
}

.slider-head{
    margin-bottom: 20px;
}
.sidebar-header h2 {
    font-size: 18px;
    color: #000000;
    margin: 0;
    font-family: sans-serif;
}
#status{
    background-color: greenyellow;
    padding: 5px 9px;
    border-radius: 12px;
    color: rgb(3, 80, 9);
}
#loactionshow{
    margin-right: 18px;
}
.firstdiv-header {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    margin-right: 20px;

}
.seconddiv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 10px;
    margin-right: 20px;
}
.bouttondiv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-right: 70px;
}
.divbox{
    background-color: rgba(230, 217, 217, 0.267);
    padding: 5px ;
    width: 100%;
    border-radius: 10px;

}
.divboxhead{
    font-size: 12px;
    font-family: Poppins;
}

.close-btn {
    width: 30px;
    background: none;
    border: none;
    font-size: 16px;
    font-family: sans-serif;
    cursor: pointer;
    color: #ec0000;
    padding: 0px 0px;
    line-height: 1;
}


#sidebar-content {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #444;
    font-size: 14px;
}

.sidebar-actions button {

    margin-bottom: 10px;
}

#show-route-btn {
    color: #1ca800;
    border: none;
    background-color: #ffffff;
    font-size: 16px;
    font-family: sans-serif;
    margin-left: 10px;
    cursor: pointer;
}



.leaflet-routing-container {
   /* bottom: 20px;
    left: 20px; */
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 300px;
    overflow-y: auto;
    font-size: 14px;
}

.leaflet-routing-container-hide {
    display: none !important;
}
#nearby-stations-container {
    margin-top: 13px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

#nearby-stations-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}


.station-item {
    padding: 8px;
    margin: 5px 0;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.charging-icon{
    background-color: #1ca800;
}





/* Chatbot Styles */
#chatbot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #00b894;
    color: white;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s ease;
  }
  
  #chatbox {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 300px;
    max-height: 400px;
    background: white;
    border: 2px solid #00b894;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
  }
  
  #chatbox-header {
    background: #00b894;
    color: white;
    padding: 10px;
    font-weight: bold;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: sans-serif;
  }
  
  #chat-messages {
    padding: 10px;
    overflow-y: auto;
    height: 250px;
    font-size: 14px;
  }
  
  #chat-input-section {
    display: flex;
    border-top: 1px solid #ccc;
  }
  
  #chat-input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
  }
  
  #chat-input-section button {
    padding: 10px;
    background: #00b894;
    border: none;
    color: white;
    cursor: pointer;
  }
  .message {
    margin: 10px 0;
    padding: 8px;
    border-radius: 3px;
}

.user {
    background: #8df0b9;
    color: white;
    text-align: right;
}

.bot {
    background: #e5ff88;
    color: #333;
}
  
  #chatbot-toast {
    position: fixed;
    bottom: 35px;
    right: 85px;
    max-width: 220px;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #00b894;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    z-index: 1001;
    display: none;
    animation: fadeInOut 10s ease forwards;
  }
  
  @keyframes fadeInOut {
    0%   { opacity: 0; transform: translateY(10px); }
    10%  { opacity: 1; transform: translateY(0); }
    85%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(10px); }
  }
  
  #clear-chat-btn {
    margin-left: auto; /* positions button to the right */
    margin-right: 20px;
    background-color: #00b894;
    border: none;
    font-size: 15px;
    color: rgb(32, 8, 8);
  }
  
  .close{
    background-color: #00b894;
    border: none;
    color: white;
    font-size: 15px;
  }
