.banner {
    align-items:center;
    
    height: fit-content;
    /*background-color: #1e2130;*/
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #4B5460;
    margin-bottom: 10px;
    padding: 0.5rem 5rem;
    width: 100%;
}

#banner-text {
    text-align: left;
}

#banner h1{
    color: #191970;
}

#banner-logo {
    display: inline;

}

.banner-button {
    margin-right: 10px;
    height: 30px;
    color: #555;
    text-align: center;
    align-items: center;
    background-color: transparent;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1rem;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 4px;
    border: 1px solid #bbb;
    cursor: pointer;
    box-sizing: border-box;
    margin: 2px;
  }
  
  .banner Img {
    height: 4.5rem;
    margin: 0px 10px;
  }

#banner-buttons{
    display: flex;
    flex-direction: column;
    align-items:flex-end;
    justify-content: flex-end;
}

.banner-group {
    display: flex;
    flex-direction: row;
}

.sidebar {
    width: 100%;
    height: auto;
    background-color: #f8f9fa;
    padding: 5px;  /* Reduced padding from 10px */
    margin-bottom: 10px;  /* Reduced margin from 20px */
    text-align: center;
}

.sidebar h2, .sidebar h3 {
    text-align: center;
    color: #191970;
    margin: 5px 0;  /* Reduced margins */
    font-size: 1.7rem;  /* Smaller font size */
}

.sidebar h5 {
    font-size: 0.95rem;  /* Smaller font size */
    margin: 5px 0;  /* Reduced margins */
}

.sidebar p {
    margin: 3px 0;  /* Minimal margins for paragraphs */
    font-size: 0.9rem;  /* Smaller font */
}

.sidebar_buttons {
    display: table-column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0.5em;  /* Reduced from 2em */
    font-size: 0.9rem;  /* Smaller font */
    padding: 5px 10px;  /* Smaller padding */
}

#start-datepicker, #end-datepicker {
    display: inline-block;
    align-items: center;
    justify-content: center;
    margin-right: 5px;  /* Reduced from 10px */
    margin-left: 5px;  /* Reduced from 10px */
    margin-bottom: 5px;  /* Reduced from 20px */
    font-size: 0.9rem;  /* Smaller font */
    height: 30px;  /* Smaller height */
}

/* Make footer more compact */
.footer {
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 5px 0;  
}

.footer .project-logos,
.footer-logos {
    flex-wrap: wrap !important;
    justify-content: center;
}

.footer .project-logos img,
.footer-logos img {
    margin-bottom: 10px;
}

.footer a {
    color: black;
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

.logo {
    width: 100%; 
    height: 100%;
}

.main-container {
    display: flex; /* Flexbox for side-by-side layout */
    justify-content: flex-start;
    width: 100%;
    overflow-x: hidden;  /* Prevent horizontal scroll on the main container */
}

.left-column {
    display: flex;
    flex-direction: column; /* Stack sidebar and footer vertically */
    margin-left: 1%;
    width: 30%; /* Sidebar and footer take 30% of the container's width */
    min-width: 300px;  /* Ensures sidebar doesn't get too narrow */
    flex-shrink: 0;    /* Prevents sidebar from shrinking */

}

.right-column {
    margin-left: 1%;
    margin-right: 1%;
    width: 80%;
    height: calc(100vh - 110px); /* Match table height */
    overflow-x: hidden;  /* Prevent horizontal scroll on the main container */
    overflow-y: auto;
}

#ifremer{
    padding: 1em;
    height: 100%;
    width: 30%;
}

#cnrs{
    height: 100%;
    width: 20%;
}

.loading-component{
    margin-top: 50%;
    z-index: 99 !important;
}

.centered-table {
    width: 100%;
    border-collapse: collapse;
}
.centered-table th, .centered-table td {
    text-align: center;
    padding: 8px;
}
.centered-table th {
    background-color: #f2f2f2;
}

.tabs-dropdowns {
    margin-left: 25%;
    width: 50%;
    margin: 5px;
}

#login-col {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
}

.project-logos {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-top: 20px;
}

/* Login page */
.login-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.login-card {
    transition: box-shadow 0.2s ease;
}

.login-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    #login-col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .project-logos {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .project-logos img {
        margin-bottom: 10px;
    }

    /* Make login container use full width on mobile */
    .container-fluid {
        max-width: 100% !important;
    }
    
    /* Ensure login form uses full width */
    .login-form-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Adjust top margin on mobile for better spacing */
    .login-form-container > div {
        margin-top: 10vh !important;
        padding: 1.5rem !important;
    }
    
    /* Ensure inputs are full width on mobile */
    .form-label,
    .form-control,
    .form-check {
        width: 100% !important;
    }

    .banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    #banner-text {
        text-align: center;
        margin-bottom: 1rem;
    }

    .banner-group {
        flex-direction: column-reverse;
        align-items: center;
    }

    #banner-buttons {
        align-items: center;
        margin-top: 1rem;
    }

    .banner Img {
        height: 3rem;
    }

    .main-container {
        flex-direction: column;  /* Stack on mobile */
    }

    .left-column {
        width: 98%;  /* Full width on mobile */
        margin: 0 1%;
    }

    .right-column {
        width: 98%;  /* Full width on mobile */
        margin: 0 1%;
    }

    #start-datepicker,
    #end-datepicker {
        width: 80% !important;
        margin: 5px auto;
        display: block;
    }

    .dash-table-container {
        overflow-x: auto;
    }

    .map-container,
    html.Embed {
        height: 300px;
    }

    .turtle-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px;
    }
}

/* Tablet-specific styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .left-column {
        width: 35%;
    }

    .right-column {
        width: 63%;
    }

    .turtle-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 250px));
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .banner-button,
    .sidebar_buttons,
    .turtle-card {
        padding: 12px;
    }

    .turtle-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Add this to your existing CSS */
#data-info-block {
    margin-bottom: 20px;
    padding: 10px;
}

#data-info-block p {
    margin: 5px 0;
    font-size: 0.9em;
}

#data-info-block h2 {
    margin-bottom: 10px;
}

.logger-cards-container {
    padding: 0;  /* Remove padding completely */
    width: 100%;
    margin-top: 0;  /* Remove top margin */
}

.logger-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 160px));  /* Make cards even smaller */
    gap: 8px;  /* Reduce gap further */
    padding: 0;  /* Remove padding */
    max-width: 1350px;
    justify-content: start;
}

.logger-card {
    transition: transform 0.2s;
    cursor: pointer;
}

.logger-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.logger-card img {
    height: 120px;
    object-fit: cover;
}

.map-container {
    height: 35vh;  /* Use viewport height */
    margin-bottom: 10px;  /* Reduced from 20px */
}

.map-container:not(:empty) {
    display: block;  /* Show only when has content */
}

/* Improve dropdown usability on mobile */
.Select-control {
    min-height: 38px;
}

.Select-menu-outer {
    max-height: 300px;
}

/* Ensure modals and popups are usable on mobile */
.modal-content {
    width: 90%;
    margin: auto;
    max-height: 80vh;
    overflow-y: auto;
}

/* Fix tooltip positioning for data table - improved version */
.dash-table-tooltip {
    position: fixed !important;
    z-index: 99999 !important;
    max-width: 300px !important;
    word-wrap: break-word !important;
    pointer-events: none !important;
    /* Ensure tooltip stays within viewport bounds */
    left: auto !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

/* Ensure tooltips are not clipped by table container */
.dash-table-container {
    overflow: visible !important;
}

/* Additional positioning for edge cases */
.dash-table-tooltip[style*="left: 0px"] {
    left: 10px !important;
    transform: none !important;
}

.dash-table-tooltip[style*="right: 0px"] {
    right: 10px !important;
    left: auto !important;
    transform: none !important;
}

#Home-tab::before {
    content: "map";
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    display: block;
    text-transform: none !important;
    color: #191970 !important;
}

#tags-tab::before {
    content: "show_chart";
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    display: block;
    text-transform: none !important;
    color: #191970 !important;
}

#data-tab::before {
    content: "table_chart";
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    display: block;
    text-transform: none !important;
    color: #191970 !important;
}

#report-tab::before {
    content: "description";
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    display: block;
    text-transform: none !important;
    color: #191970 !important;
}

#Project-tab::before {
    content: "info";
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    display: block;
    text-transform: none !important;
    color: #191970 !important;
}

.custom-tab {
    padding: 4px 8px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: auto !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    color: #191970 !important;
}

.lang-button:hover {
    background-color: #e8e8eb !important;
    transition: background-color 0.2s ease;
}

.lang-button {
    transition: background-color 0.2s ease;
}

/* Responsive styles for different screen sizes */

/* For smaller screens (1920x1200 and below) */
@media screen and (max-height: 1200px) {
    .logger-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 160px)); /* Smaller cards */
        gap: 8px;
        padding: 8px;
    }
    
    .logger-card img {
        height: 100px; /* Smaller images */
    }
    
    .logger-card .card-title {
        font-size: 1rem; /* Smaller title */
        margin-bottom: 0.5rem;
    }
    
    .logger-card .btn {
        padding: 0.25rem 0.5rem; /* Smaller button */
        font-size: 0.875rem;
    }
    
    .map-container {
        height: 35vh; /* Use viewport height */
    }
}

/* For even smaller screens */
@media screen and (max-height: 800px) {
    .logger-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 140px));
        gap: 5px;
        padding: 5px;
    }
    
    .logger-card img {
        height: 80px;
    }
    
    .logger-card .card-body {
        padding: 0.5rem;
    }
    
    html.Embed {
        height: 30vh !important;
    }
}

/* For very large screens (4K and above) */
@media screen and (min-height: 2000px) {
    .logger-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
    }
    
    .logger-card img {
        height: 150px;
    }
}
