#page-graph-container{

    display: block;
    padding-top: 10px;
}

#graph-select-container{

    display: inline-block;
}

#exgraph-choose-outer-div{

    display: block;
}

#exgraph-choose-inner-div{

    display:block;
}

#exgraph-choose-inner-div{

    border:
    5px solid #212121;
    outline: 2px ridge silver;
    padding: 15px;
    color: silver;
    background: rgb(61,54,30);
    background: linear-gradient(0deg, rgba(51,46,30,0.9808123933167017) 0%, rgba(47,43,35,1) 35%); 
    text-align: center;
}

#exgraph-client-select-div{

    display: inline-block;
}

#exgraph-job-select-div{

    display: inline-block;
}

.exgraph-lower-single-div{

    display: inline-block;
}


/* Styling for the client dropdown */
#graph_client_select{
    min-width: 285px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid silver;
    border-radius: 2px;
    box-sizing: border-box;
}

/* Styling for the job dropdown */
#graph_job_select {
    min-width: 285px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid silver;
    border-radius: 2px;
    box-sizing: border-box;
}

/* Responsive adjustments for smaller screens */
/* Media query for smaller screens */
@media (max-width: 750px) and (orientation: landscape){
    div#exgraph-choose-outer-div{
        zoom: 80%;
        -moz-transform: scale(100%);/* Firefox Property */
        -moz-transform-origin: 0 0;
        -o-transform: scale(100%);/* Opera Property */
        -o-transform-origin: 0 0;
        -webkit-transform: scale(100%);/* Safari Property */
        -webkit-transform-origin: 0 0;
        transform: scale(100%); /* Standard Property */
        transform-origin: 0 0;  /* Standard Property */
        float: left
        }
    }

/* Responsive adjustments for smaller screens */
/* Media query for smaller screens */
@media (max-width: 750px) and (orientation: landscape){
    div#expense-graph-container{
        zoom: 80%;
        -moz-transform: scale(100%);/* Firefox Property */
        -moz-transform-origin: 0 0;
        -o-transform: scale(100%);/* Opera Property */
        -o-transform-origin: 0 0;
        -webkit-transform: scale(100%);/* Safari Property */
        -webkit-transform-origin: 0 0;
        transform: scale(100%); /* Standard Property */
        transform-origin: 0 0;  /* Standard Property */
        float: left
        }
    }
    
/* Responsive adjustments for smaller screens */
/* Media query for smaller screens */
@media (max-width: 750px) and (orientation: portrait){
    div#expense_graph{
        zoom: 60%;
        -moz-transform: scale(100%);/* Firefox Property */
        -moz-transform-origin: 0 0;
        -o-transform: scale(100%);/* Opera Property */
        -o-transform-origin: 0 0;
        -webkit-transform: scale(100%);/* Safari Property */
        -webkit-transform-origin: 0 0;
        transform: scale(100%); /* Standard Property */
        transform-origin: 0 0;  /* Standard Property */
        float: left
        }
    }
    

    /* Responsive adjustments for smaller screens */
    /* Media query for smaller screens */
    @media (max-width: 750px) and (orientation: portrait){
        div#expense-graph-container{
        display: none !important;
    }
}

    /* Responsive adjustments for smaller screens */
    /* Media query for smaller screens */
    @media (max-width: 750px) and (orientation: portrait){
        select#graph_job_select{
        max-width: 250px;
    }
}
    /* Responsive adjustments for smaller screens */
    /* Media query for smaller screens */
    @media (max-width: 750px) and (orientation: portrait){
        .page-id-15 div#grand-total-container{

                float: left !important;       
    }
}

/* Basic styling for the graph container */
.page-id-15 div#expense-graph-container {
    width: 100%;
    max-width: 1000px; /* Adjust as needed */
    margin: 0 auto;
    padding: 20px;
    /*border: 1px solid #ccc;*/
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 400px;
    min-height: 400px
}



/* Styling for the canvas */
#expensesChart {
    width: 100%;
    height: 400px; /* Adjust as needed */
}

/*.page-id-15 div#expense-graph{

    display:block;
}

.page-id-15 div#graph-select-container{

    float:left;
    width:500px;
}*/

/*.page-id-15 div#expense-graph-container{

    display:inline-block;
    min-width: 400px;
    min-height: 400px
}*/

.page-id-15 div#grand-total-container{

    font-size: 25px;
    color: #a4936b;
    display: block;
    float: right;
}

div#expense-graph-container-outer-div{

    display:block;
}

div#exgraph-list{

    display: block;
    color:#a4936b;
    text-align: left;
}

div.exgraphmessage{

    color:#a4936b;
    float: left;
    text-align: left;
}

/* ---------- Drill-down table under the graph ---------- */
/* Clicking a bar or the label beneath it lists that bar's line items.
   The portal already styles .page-id-15 table/thead/th/td, so this only adds
   the container, the heading row and the numeric alignment. */

.exgraph-detail {
    display: block;
    clear: both;
    margin-top: 20px;
    border-top: 2px solid #4c4b4b;
    padding-top: 12px;
    text-align: left;
}

/* `display: block` above beats the browser's own [hidden] rule, so restate it. */
.exgraph-detail[hidden] {
    display: none;
}

.exgraph-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

#exgraph-detail-title {
    color: #b8a680;
    font-size: 20px;
}

.exgraph-detail-close {
    background-color: #212121;
    color: silver;
    border-radius: 4px;
    border: 1px solid black;
    outline: 2px ridge rgb(84, 84, 84);
    cursor: pointer;
    height: 32px;
    width: 40px;
    font-size: 20px;
    line-height: 1;
    flex: 0 0 auto;
}

.exgraph-detail-close:hover {
    background-color: #7e7853;
    box-shadow: 0px 0px 17px 5px rgba(97,93,73,0.9);
}

/* Long tables scroll inside their own box rather than stretching the panel. */
.exgraph-detail-body {
    max-height: 420px;
    overflow: auto;
}

table.exgraph-detail-table {
    width: 100%;
    border-collapse: collapse;
    color: silver;
    font-size: 16px;
}

table.exgraph-detail-table thead th {
    position: sticky;
    top: 0;
    background-color: #2f2b23;
    color: #b8a680;
    text-align: left;
    padding: 6px 8px;
    border-right: 2px solid #4c4b4b;
    border-bottom: 2px solid #4c4b4b;
    white-space: nowrap;
}

table.exgraph-detail-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #4c4b4b;
    border-right: 1px solid #4c4b4b;
    vertical-align: top;
}

/* Dates must not wrap mid-value; the Item column absorbs the slack instead. */
table.exgraph-detail-table td:first-child,
table.exgraph-detail-table th:first-child {
    white-space: nowrap;
}

table.exgraph-detail-table td.exgraph-num,
table.exgraph-detail-table th.exgraph-num {
    text-align: right;
    white-space: nowrap;
}

table.exgraph-detail-table tfoot td {
    border-top: 2px solid #4c4b4b;
    border-bottom: none;
    color: #b8a680;
    font-weight: bold;
}

p.exgraph-detail-empty {
    color: #a4936b;
    text-align: left;
}
/* ---------------------------------------------------------------------------
 * Download buttons on the drill-down panel.
 * They sit with the close button so the whole head reads as one control strip,
 * and they borrow the close button's colours rather than inventing new ones.
 * ------------------------------------------------------------------------- */
.exgraph-detail-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.exgraph-detail-export {
    background-color: #212121;
    color: silver;
    border-radius: 4px;
    border: 1px solid black;
    outline: 2px ridge rgb(84, 84, 84);
    cursor: pointer;
    height: 32px;
    padding: 0 12px;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.5px;
}

.exgraph-detail-export:hover {
    background-color: #7e7853;
    box-shadow: 0px 0px 17px 5px rgba(97,93,73,0.9);
}

.exgraph-detail-export[disabled] {
    opacity: 0.4;
    cursor: default;
    box-shadow: none;
}

.exgraph-detail-export[disabled]:hover {
    background-color: #212121;
    box-shadow: none;
}
