/************************************************************************************************************
*   DHTML modal dialog box v2 (CSS)
*   Revamped UI — consistent with framework aesthetics (Segoe UI, blue header, subtle borders)
************************************************************************************************************/

/* Full-viewport backdrop */
.modalDialog2_transparentDiv {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 99000;
}

/* Main container */
.modalDialog2_contentDiv {
    position: fixed;
    z-index: 100000;
    background: #ffffff;
    border: 1px solid #aaaaaa;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
}

/* Title bar */
.modalDialog2_titleBar {
    background: linear-gradient(to right, #3a6ea5, #2a5080);
    border-bottom: 1px solid #2a5080;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    cursor: default;
    user-select: none;
    min-height: 28px;
}

.modalDialog2_titleBar span.modalDialog2_title {
    flex: 1;
    text-align: center;
    font-weight: bold;
    font-size: 13px;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #ffffff;
    padding-right: 22px;
}

/* Close button */
.modalDialog2_closeBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    cursor: pointer;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.12s, border-color 0.12s;
}

.modalDialog2_closeBtn:hover {
    background: rgba(180, 30, 10, 0.85);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Scrollable body */
.modalDialog2_body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    text-align: center;
    padding: 10px 14px;
    box-sizing: border-box;
}

/* Loading indicator */
.modalDialog2_body #loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 80px;
}
