﻿.datawindow-overlayfordialog
{
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
}
.datawindow-overlayfordialog.centered
{
    display: flex;
    align-items: center;
    justify-content: center;
}
.datawindow-content {
    position: absolute; /* 👈 important if not centered */
    background: #f0f0f0;
    border: 1px solid #666;
    border-radius: 6px;
    box-shadow: 0 4px 4px rgba(0,0,0,0.4);
    min-width: 280px;
    width: 100vw;
    max-width: 700px;
    max-height: 100vh;
    display: flex;
    flex-direction: column; /* 👈 ensures body grows vertically */
}
.datawindow-content.centered {
        position: unset;
        margin-left:auto;
        margin-right:auto;
}
.datawindow-header{
    background: linear-gradient(180deg, #3b79d1 0%, #2a5da8 100%);
    color: white;
    font-weight: bold;
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
}
.datawindow-footer {
    background-color: #ddd;
    color: white;
    display: flex;
    justify-content: flex-end;
    padding: 3px 5px;
}
    .datawindow-header.draggable {
        user-select: none;
        cursor: move; /* 👈 shows draggable cursor */
    }

    .datawindow-title {
        flex-grow: 1;
    }
.datawindow-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}
.datawindow-closebtn
{
    position: relative;
    z-index: 10;
    border: none;
    background: transparent;
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
}

.datawindow-closebtn:hover
{
   color: #ffaaaa;
}

.datawindow-toolbar {
    background: #efefef;
    border-bottom: 1px solid #ccc;
    padding: 4px 8px;
}

.datawindow-body {
    flex: 1;
    overflow: auto; /* 👈 scroll only inside body */
    padding: 0px;
    background: #ffffff;
    color: #333;
}
@media (max-width: 500px) {
    .datawindow-content { /* 👈 Data Window On Small Screens*/
        border-radius: 0 !important;
        width: 100vw !important;
        /*height: 100vh !important;*/
        max-width: 100vw !important;
        max-height: calc(100vh - 2px) !important;
        /*overflow: auto !important;*/
    }
    .datawindow-overlayfordialog.datawindow-content {
        position: fixed !important;
        top: 1px !important;
        left: 0 !important;
    }

}
