@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 10rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
    }

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

.main .top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

    .sidebar .top-row {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

    .sidebar .nav-item {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }

        .sidebar .nav-item:first-of-type {
            padding-top: 1rem;
        }

        .sidebar .nav-item:last-of-type {
            padding-bottom: 1rem;
        }

        .sidebar .nav-item a {
            color: #d7d7d7;
            border-radius: 4px;
            height: 3rem;
            display: flex;
            align-items: center;
            line-height: 3rem;
        }

            .sidebar .nav-item a.active {
                background-color: rgba(255,255,255,0.25);
                color: white;
            }

            .sidebar .nav-item a:hover {
                background-color: rgba(255,255,255,0.1);
                color: white;
            }

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.heatmaptable {
    border-collapse: separate;
    border-spacing: 10px;
    margin: 20px;
}

.heatmapth, .heatmaptd {
    width: 50px;
    height: 50px;
    text-align: center;
    vertical-align: middle;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.heatmapth {
    background-color: transparent;
    color: #666666;
    box-shadow: none;
}

.heatmaptd {
    color: #ffffff; /* Default text color for cells */
}

.image-container {
    position: relative;
    display: inline-block;
}

    .image-container img {
        display: block;
        width: 100%;
        height: auto;
    }

.overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Black background with 50% opacity */
    color: white;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease;
}

.overlay-content {
    max-width: 80%;
}

.image-container:hover .overlay {
    opacity: 1; /* Show overlay on hover */
}

ul[role=tablist] {
    flex-wrap: wrap;
}

.card-header-ap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-banner-online {
    display: inline-flex;
    align-items: center;
    background-color: #eafded;
    color: #176c3c;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #c4eacb;
    gap: 5px;
    font-size: smaller;
}

.status-banner-offline {
    display: inline-flex;
    align-items: center;
    background-color: #fee2e2;
    color: #176c3c;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #c4eacb;
    gap: 5px;
    font-size: smaller;
}

.card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    display: flex;
}

.toggle input {
    display: none;
}

.toggle label {
    display: block;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
}

    .toggle label:before {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        background: white;
        border-radius: 50%;
        top: 2px;
        left: 2px;
        transition: 0.3s;
    }

.toggle input:checked + label {
    background: #ff0028;
}

    .toggle input:checked + label:before {
        left: 22px;
    }

.last-activity {
    font-size: 14px;
    color: #7a7a7a;
    display: flex;
    align-items: center;
    gap: 5px;
}

.am-lp {
    background: #3b82f6;
}

.am-manual {
    background: #f59e0b;
}

.am-qr {
    background: #10b981;
}

.am-app {
    background: #a855f7;
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }

     .lastEntryQR {
        display:none;
    }

    .serverConsole {
        display: none;
    }

    .VehicleDataDesktop {
        display: none;
    }

    .rtlogs-desktop {
        display: none;
    }

    .triangles {
        background-size: cover;
        height: 100%;
        bottom: 0;
        left: 0;
        position: fixed;
        right: 0;
        top: 0;
        background-position: center center;
    }

    .loginDesktop {
        display: none;
    }

    .commentsDesktop {
        display: none;
    }

    .overlay {
        width: 100%; /* Overlay covers full width on small screens */
        height: 100%; /* Reduce height for better visibility */
        bottom: 0;
        top: auto;
    }

    .overlay-content {
        font-size: 12px; /* Smaller font size */
        text-align: center;
        max-width: 100%;
    }

    .access-point-card {
        width:fit-content; 
        margin:20px;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
        z-index:10;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .imagen {
        transition: all .2s ease-in-out;
    }

    .imagen-seleccionable:hover{
        transform: scale(1.1);
        cursor:pointer;
    }

    .imagen-seleccionable1:hover {
        transform: scale(1.05);
        cursor: pointer;
    }

    .triangles {
        background-size: cover;
        height: 100%;
        bottom: 0;
        left: 0;
        position: fixed;
        right: 0;
        top: 0;
        background-position: center center;
    }

    .card-group-container{
        position:relative;
        min-height:70px;
    }
    
    .card-list-group {
        padding:0;
        margin:0;
    }

    .card-list-item {
        max-width: 16.3%;
        margin-right: 20px;
        padding: 10px;
        cursor: pointer;
        background: #FFFFFF 0% 0% no-repeat padding-box;
        box-shadow: 0 2px 10px #00000029;
        border-radius: 6px;
    }

    .cardactive {
        background: transparent linear-gradient(180deg,#3579F2 0%,#B5CCFF 100%) 0% 0% no-repeat padding-box;
        color: #FFFFFF;
        box-shadow: 0 2px 10px #00000029;
    }

    .material-icons {
        font-family: Material Icons;
        font-weight: 400;
        font-style: normal;
        font-size: 24px;
        display: inline-block;
        line-height: 1;
        text-transform: none;
        letter-spacing: normal;
        word-wrap: normal;
        direction: ltr;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        -moz-osx-font-smoothing: grayscale;
        font-feature-settings: "liga";
    }

    .card-icon {
        font-size: 50px;
        margin-top: 8px;
    }

    .VehicleDataMobile {
        display: none;
    }

    .rtlogs-mobile {
        display: none;
    }

    .loginMobile {
        display: none;
    }

    .commentsMobile {
        display: none;
    }

    .access-point-card {
        width: 350px;
        margin: 20px;
    }
}
