.wrapper:has(.epower-dashboard) {
    width: 100%;
}
.ocppa_ajax_modul {
    /* border: solid 1px gray; */
}

.ocppa_ajax_modul .ocppa_loading, .ocppa_ajax_modul .ocppa_error, .ocppa_ajax_modul .ocppa_content {
    display: none;
}

.ocppa_filter .ocppa_loading, .ocppa_filter .ocppa_error {
    display: none;
}

#ocppa_filter_1{
    width: auto;
    min-width: 11rem;
}
#ocppa_filter_2{
    width: auto;
    min-width: 20rem; 
}

.ocppa_ajax_modul .ocppa_loading {
    justify-items: center;
}
.ocppa_ajax_modul .ocppa_loading .loader-num {
    display: none;
}
.epower-dashboard {
    padding: 5rem 2rem;
    padding-top: unset;
}

.epower-dashboard h2 {
    background-color: var(--wp--preset--color--green);
    color: var(--wp--preset--color--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: var(--wp--preset--font-size--h-3);
    margin-bottom: 1.5rem;
    text-align: center;
}

.ocppa_ajax_modul.company-header #loader svg{
    height: 2rem !important;
}

.filters {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: end;
}

.filters {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 998;
  background-color: white;
  padding: 1rem;
  padding-right: 13rem;
}


.filters select {
    padding: 0.5rem 1rem;
    border-radius: var(--wp--preset--border-radius--default, 8px);
    border: 1px solid #ddd;
    font-size: var(--wp--preset--font-size--normal);
    background-color: white;
}

.kpis {
    display: flex;
    width: 100%;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.kpis > div {
    color: white;
    padding: 20px 30px;
    border-radius: var(--wp--preset--border-radius--default, 8px);
    min-width: 180px;
    box-shadow: 0 4px 6px rgb(0 0 0 / 0.2);
    text-align: center;
    font-weight: 600;
    background-image: var(--wp--preset--gradient--card);
    border: 2px solid gray;
}

.kpis > div .value {
    font-size: 28px;
    margin-top: 5px;
    font-weight: 700;
}

.kpis > div .value.up::after{
    content: " ↑";
    color: var(--wp--preset--color--green);
    font-weight: 500;
    line-height: 1em;
}

.kpis > div .value.down::after{
    content: " ↓";
    color: var(--wp--preset--color--red);
    font-weight: 500;
    line-height: 1em;
}

/* Filters label adjustment */
.filters label, .ocppa_filter .label {
    font-weight: 600;
    margin-right: 8px;
    color: #555;
}

@media (max-width: 1080px) {
    .filters {
        flex-direction: column;
        align-items: flex-start;
        padding-right: unset;
    }
}
@media (max-width: 782px) {
    /* .filters {
        flex-direction: column;
        align-items: flex-start;
    } */

    .filters select {
        min-width: 100%;
    }

    .kpis {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .kpis > div {
        min-width: auto;
        width: 100%;
    }
}

/* Grafy */
.graphs-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 28px;
    flex-wrap: wrap;
    margin: 32px 0;
    justify-content: center;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.graphs-row > div {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px 0 rgba(0,0,0,0.10), 0 1.5px 4px 0 rgba(0,0,0,0.03);
    padding: 24px 24px 20px 24px;
    min-width: 340px;
    flex: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: visible;
}

.graphs-row h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #1a2a33;
    letter-spacing: 0.01em;
    text-align: left;
    width: 100%;
    min-width: 100%;
}

.ocppa_ajax_modul.donut_chart, .ocppa_ajax_modul.bar_chart {
    width: 100%;
    height: auto;
}

@media (max-width: 1280px) {
.graphs-row {
    grid-template-columns: 1fr;
}
}
.pie-flex, .plot-container {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 20px;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    min-height: 500px;
    overflow: visible;
}

.plot-container {
    align-items: center;
}

.plot-container .legend,
.plot-container .plotly-legend {
    min-width: 140px;
    max-width: 180px;
    flex: 0 0 160px;
    margin: 0 18px 0 0 !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    position: static !important;
    color: #222 !important;
 /*   font-size: 1rem !important; */
    text-align: left;
}

.plot-container .legend .legendtext,
.plot-container .plotly-legend .legendtext {
    font-size: 1rem !important;
    font-weight: 500;
    color: #222 !important;
    margin-left: 8px;
}

.plot-container .legend .groups,
.plot-container .plotly-legend .groups {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plot-container .legend .traces,
.plot-container .plotly-legend .traces {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plot-container .legendpoints path,
.plot-container .legendpie {
    stroke-width: 2px !important;
    stroke: #eee !important;
    border-radius: 3px;
}

.plot-container .svg-container,
.svg-container {
    width: 100% !important;
  /*  height: auto !important; */
    min-height: 29rem !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}

.plot-container .main-svg,
.svg-container .main-svg {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    display: block;
    
}

.plot-container .main-svg rect[shape-rendering="crispEdges"],
.svg-container .main-svg rect[shape-rendering="crispEdges"] {
    stroke: none !important;
    fill: none !important;
}

.pie-center-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    font-size: 2.1rem;
    font-weight: 700;
    color: #222;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 1px 0 #fff, 0 0 8px #f8fafc;
    opacity: 0.15;
    user-select: none;
}

g.infolayer{
    position: relative;
    top: 0 !important;
    left: 0 !important;
}

.plot-container .modebar-container {
    display: none !important;
}

.plot-container .scrollbar {
    fill: #e0e0e0 !important;
    opacity: 0.7 !important;
}
g.scrollbox{
    display: contents;
}

@media (max-width: 1080px) {
.epower-dashboard {
    padding: 5rem 0;
    padding-top: unset;
}
.wrapper:has(.epower-dashboard){
    padding: 0 1rem;
}
}
/* Responsivita */
@media (max-width: 900px) {
    .graphs-row {
        flex-direction: column;
        gap: 18px;
    }
    .graphs-row > div {
        max-width: 100%;
        min-width: 0;
        padding: 12px 4px 12px 4px;
    }
    .pie-flex, .plot-container {
        flex-direction: column !important;
        align-items: stretch;
        gap: 10px;
        min-height: unset;
    }
    .svg-container,
    .plot-container .svg-container {
        width: 100% !important;
        height: 100% !important;
        margin: 0 auto !important;
    }
    .plot-container .legend,
    .plot-container .plotly-legend {
        margin: 0 0 10px 0 !important;
        max-width: 100%;
        width: 100%;
    }
}

/* Filter reset button */
.filterreset{
    background: var(--wp--preset--color--dark-grey);
    border-radius: 2.5rem;
    color: white;
    cursor: pointer;
    display: flex;
    font-weight: bold;
    padding: 0.5rem 1.75rem !important;
    line-height: 1;
    text-decoration: none;
    width: auto;
    min-height: 3rem;
    font-size: var(--wp--preset--font-size--medium) !important;
    align-items: center;
    border: 2px solid var(--wp--preset--color--white) !important;

}
.filterreset:hover {
    background: var(--wp--preset--color--green);
    color: white;  
}

/* Select */
.filteritem:not([multiple]) {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    color: gray;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    cursor: pointer;
    min-height: 44px;
}

.filteritem:not([multiple]):focus {
    box-shadow: 0 0 0 2px #c3e0ff;
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--black);
}

.filteritem:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='gray' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23999' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    padding-right: 38px;
}

/* Table */
.report-table {
    margin-top: 28px;
    background: #fff;
    padding: 28px 24px 24px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 18px 0 rgba(0,0,0,0.08), 0 1.5px 4px 0 rgba(0,0,0,0.03);
    overflow-x: auto;
}

.report-table h3 {
    color: #1a2a33;
    font-weight: 700;
    margin-bottom: 18px;
    font-size: 1.18rem;
    letter-spacing: 0.01em;
    text-align: left;
}

.report-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    background: #fff;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.04);
    border-radius: 10px;
    min-width: 900px;
}

.report-table thead th,
.fixedHeader-floating thead th {
    background: var(--wp--preset--color--green, #2e7d32) !important;
    color: #fff;
    padding: 12px 14px;
    font-weight: 700;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
    /* position: sticky; */
    top: 0;
    z-index: 2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    font-size: 15px;
}
.fixedHeader-floating thead th {
  z-index: 4 !important;
}

.report-table table th:first-child,
.report-table table td:first-child,
.report-table table td.sorting_1 {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    box-shadow: 2px 0 4px -2px #ddd;
    border-right: 2px solid #e0e0e0;
    text-align: left;
    min-width: 180px;
    font-weight: 600;
}

.report-table table thead th:first-child {
    z-index: 3;
    background: var(--wp--preset--color--green, #2e7d32);
    color: #fff;
}

.report-table tbody td {
    border-bottom: 1px solid #eee;
    border-right: 1px solid #f3f3f3;
    padding: 11px 14px;
    color: #222;
    background: #fff;
    text-align: center;
    vertical-align: middle;
    transition: background 0.15s;
    white-space: nowrap;
}

.report-table tbody td:last-child,
.report-table thead th:last-child {
    border-right: none;
}

.report-table tbody tr:hover {
    background: #f4faf6;
    transition: background 0.15s;
}

.report-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.report-table tbody td:focus,
.report-table tbody td:active {
    outline: 2px solid #1a73e8;
    background: #e3f0fc;
}

.report-table tfoot td {
    background: #f1f9f1;
    color: #1a2a33;
    font-weight: 600;
    padding: 12px 14px;
    border-top: 2px solid #e0e0e0;
}

div.dt-container .dt-search input{
    margin-left: 1rem;
}

@media (max-width: 900px) {
    .report-table {
        padding: 12px 4px 12px 4px;
    }
    .report-table table {
        min-width: 600px;
        font-size: 13px;
    }
    .report-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
    }
    .report-table table th:first-child,
    .report-table table td:first-child,
    .report-table table td.sorting_1 {
        left: 0;
        min-width: 120px;
    }
    .epower-dashboard h2 {
    font-size: var(--wp--preset--font-size--h-4);
}

}

/* Stlpcový graf */


/* Donut graf */

.legendtext {
font-family: monospace;
}
.legendtext tspan:first-child {
}

.legendtext tspan:nth-child(2) {
}

/* Export CSV button */
.ocppa_export_csv{
    display: flex;
    flex-direction: row;
    position: absolute;
    right: 0.5rem;
}

.ocppa_export_csv.csv2{
    right: 13rem;
}

@media (max-width: 782px) {
    .ocppa_export_csv{
        position: unset;
    }
}

.download-icon::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 0.5rem;
  vertical-align: middle;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v10m0 0-4-4m4 4 4-4M1 15h14' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v10m0 0-4-4m4 4 4-4M1 15h14' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  background-color: var(--wp--preset--color--white); 
}

.download-icon:hover::after {
  background-color: var(--wp--preset--color--white); 
}

.multi-select .multi-select-options .multi-select-option.multi-select-selected .multi-select-option-radio::after, .multi-select .multi-select-options .multi-select-all.multi-select-selected .multi-select-option-radio::after{
    width: 5px;
    height: 9px;
}

.multi-select-option{
    display: grid !important;
    grid-template-columns: 2rem auto;
}

.multi-select .multi-select-options{
    flex-flow: wrap;
    overflow-y: visible;
    overflow-x: auto;
    width: fit-content;
}

.multi-select .multi-select-options .multi-select-option .multi-select-option-text, .multi-select .multi-select-options .multi-select-all .multi-select-option-text{
    overflow: visible;
}

.tabledata-barcolumn-progress {
    display:flex;
}

.tabledata-barcolumn-progress-width {
    width:60px;
}

.tabledata-barcolumn-progress-value {
    background-color: var(--wp--preset--color--green);
}

/* ====== Fixed Table Header for DataTables ====== */
:root {
  --fixed-header-table-offset: 132px;
}

@media (max-width: 1080px) {
  :root {
    --fixed-header-table-offset: 32px;
  }
  
  .filters{
      position: unset;
  }
}
@media (max-width: 800px) {
  :root {
    --fixed-header-table-offset: 46px;
  }
}
@media (max-width: 600px) {
  :root {
    --fixed-header-table-offset: 0px;
  }
}