﻿/***************************************
    LAYOUT
***************************************/
#map {
    flex: 1;
    background: #e5e5e5;
}

.timestamp{
    font-size: 0.85em;
    text-align:left;
    display:block;
    padding: 4px 6px;
    background:whitesmoke;
}


/* Display of unit + transcode in assigned units table */
.unit{
    display: inline;
    margin-right:6px;
    font-size:1em;
}


/* MAIN GRID */
.layout {
    height: 100vh !important;
    display: grid;
    gap: 10px;
    grid-auto-rows: minmax(0, 1fr);
    background: #f5f5f5;
    position:relative;
}



/***************************************
    TABLE WRAPPER
***************************************/

/*Remove uncesseary table margins on open calls page*/
table {
    margin: 0 !important;
    text-align: left;
    position: relative;
    font-family: "Trebuchet MS", Verdana, Helvetica, Sans-Serif !important;
}


.table-wrapper {
    width: 100%;
    border: 1px solid #333;
    min-height: 0;
    position: relative !important;
    overflow: auto;
    background: #fff;


    /*------Grid layout-----*/
    gap: 0;
    display: grid;
    grid-auto-columns: 1fr;
    grid-template-rows: auto auto;
    /*overflow-y: auto;*/  /*prevents layout overflow */
    /*overflow-x: auto;*/ 
    align-content: start; /* Prevent child stretching */
}

.table-wrapper table {
    width: 100%;
    display: table;
    border-collapse: collapse;
}

.table-title {
    top: 0;
    z-index: 50;
    background: #2d3e50 !important;
    color: #fff;
    padding: 6px 10px;
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.3rem;
    position: sticky !important;
}

.row-title {
    background: #e0e0e0;
    color: #333;
    font-weight: bold;
    text-align: left;
}

.row-count {
    top:43px;
    background: #8b3232 !important;
    color: #fff !important;
    margin: 0;
    position: sticky !important;
}
.right-col {
    margin-bottom: 20px;
}

/***************************************
    TABLE COMPACT 
***************************************/
.table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    table-layout: auto;
    position: relative;
}

/*Remove uncesseary whitespaces in compact tables*/
.table-compact th,
.table-compact td {
    padding: 2px 6px;
    vertical-align: middle;
    white-space: nowrap;
    text-align: left;
}
.no-zebra tr:nth-child(even),
.no-zebra tr:nth-child(odd) {
    background-color: transparent !important;
}

.table-no-border th,
.table-no-border td {
    border: none; /* remove internal borders */
}

/***************************************
    MOBILE (<= 1023px)
***************************************/
@media (max-width: 1023px) {

    .layout{
        display:flex;
        flex-direction: column;
        width: 100%;
        margin: 32px 0;
    }

    /* HEIGHT OF 300PX ENSURES TABLE ARE NOT TOO SMALL OR TOO LARGE ON MOBILE*/
    .table-wrapper {
        min-height: 300px !important;
        max-height:60vh;
        margin-bottom:10px;
        overflow:auto;
    }

    .row-count { top: 44px; }
   .table-compact { font-size: 0.95rem ; }
    #mainContent {padding: 32px 16px; margin-top:32px !important}
}

/***************************************
    TABLET (1024px–1279px)
***************************************/
@media (min-width: 1024px) and (max-width: 1279px) {

    .layout {
        height: 150vh !important;
        grid-template-columns: 35%  65%;
    }

    .left-col { grid-column: 1; }
    .center-col { grid-column: 2; }
    .right-col { display:grid; grid-column: 1; }

    .left-col{
        display: grid;
        grid-auto-rows: auto;
        min-height: 0;
        gap: 10px;
    }

}

/***************************************
    DESKTOP (>=1280px)
***************************************/
@media (min-width: 1280px) {

    .layout {
        grid-template-columns: 1.2fr 2.4fr 1fr;
        height: 100vh !important;
    }

    .left-col,.center-col,.right-col {
        display: grid;
        grid-auto-rows: minmax(0, 1fr);
        min-height: 0;
        gap: 10px;
    }

}

