/* ---- Site-Wide  ---- */

:root {
    --customer-bg-colour: #0e3055;
    --btn-panel-height: 53px;
    --mobile-nav-bar-height: 20px;
    --second-bar-width: 57px;
    --vh: 100vh; /* Default value for viewport height. is changed in js for responsive mobile layout*/
}

html, body {
    height: 100%; 
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: auto;
}

body {
    padding-top: 60px;
    padding-bottom: env(safe-area-inset-bottom); 
    flex: 1;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    font-size: 14px;
}

/* ---- Top Bar  ---- */

.topBar {
    background-color: var(--customer-bg-colour);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    height: 60px;
    width: 100%;
    position: fixed;
    flex-shrink: 0;
    top: 0;
    left: 0;
    z-index: 1000;
}

.topBar-LHS-logo-container {
    width: 48px;
    height: 48px;
    max-height: 85%; 
    background-image: url('../images/icon.png');
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
/*    max-height: 40px;*/
    flex-shrink: 0;
}

.topBar-RHS-button-container {
    display: flex;
    gap: 10px; 
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

/* ---- Top Bar Buttons  ---- */

.btn-topbar {
    color: var(--color-sf-on-surface);
    background-color: #fff; /* Light grey background */
    border: none; /* Remove default border */
    border-radius: 4px; /* Slightly rounded corners */
    padding: 8px 16px; /* Padding for a comfortable size */
    font-family: 'Roboto', Tahoma, Geneva, Verdana, sans-serif; /* Modern font */
    font-size: 14px; /* Adjust font size as needed */
    font-weight: 500; /* Make the font bold */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s, color 0.3s; /* Smooth hover transitions */
    display: inline-flex; /* Allows for vertical alignment of icon and text */
    align-items: center; /* Center-aligns icon and text vertically */
    gap: 8px; /* Space between icon and text */
}

    /* Hover Effect */
    .btn-topbar:hover {
        background-color: #e0e0e0; /* Slightly darker grey on hover */
        color: #002f5f; /* Darker blue text on hover */
    }

    /* Active State */
    .btn-topbar:active {
        background-color: #d0d0d0 !important; /* Even darker grey when clicked */
        color: #001a33; /* Even darker blue text when clicked */
    }

    /* Focus Outline */
    .btn-topbar:focus {
        outline: none; /* Remove default outline */
        box-shadow: 0 0 0 3px rgba(14, 48, 85, 0.3); /* Custom focus ring */
        background-color: #eef1f2 !important; /* Ensure light grey background on focus */
        color: inherit !important; /* Inherit text color to prevent changes */
    }

@keyframes button-spinner-animation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.buttonSpinner {
    border: 2px solid currentColor;
    border-style: dotted;
    border-radius: 50%;
    border-top-color: transparent;
    border-bottom-color: transparent;
    height: 16px;
    width: 16px;
    animation: button-spinner-animation 1.3s linear infinite;
}

/* ---- Second Bar & Main Content ---- */

.layout-container {
    display: flex;
    flex-direction: row;
    height: 100%; /* Full height for both second-bar and main-container */
    flex: 1;
}

.second-bar {
    width: var(--second-bar-width); /* Desktop width */
    background-color: var(--customer-bg-colour);
    flex-shrink: 0; /* Prevent shrinking */
}

.main-container {
    display: flex;
    flex-direction: column;
    flex: 1; /* Ensures the main content takes up the remaining space */
    overflow-y: hidden; /* Allow scrolling if content overflows */
}


@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }

    .second-bar {
        width: 100%;
        height: var(--mobile-nav-bar-height); /* Move second bar to the bottom */
        order: 2; /* Ensure it appears below the main content */
    }

    .main-container {
        order: 1; /* Ensure main content is above second bar on mobile */
    }
}

/* ---- Alert Popup ---- */

#alert-popup {
    width: 90%; /* Responsive width */
    max-width: 400px; /* Maximum width */
    margin: auto; /* Center the dialog */
    text-align: center; /* Center text */
}

    #alert-popup .e-dialog {
        background-color: #fff; /* White background */
        border-radius: 8px; /* Rounded corners */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
        
    }

    #alert-popup .e-dlg-header {
        font-size: 1.5em; /* Larger header font size */
        font-weight: bold; /* Bold header */
        color: #333; /* Darker text color */
        font-family: Arial, sans-serif; /* Updated font */
    }

    #alert-popup .e-dlg-content {
        margin-top: 5px; /* Reduced space between header and content */
        font-size: 1.2em; /* Larger content font size */
        color: #666; /* Lighter text color */
        font-family: Arial, sans-serif; /* Updated font */
    }

    #alert-popup .e-footer-content {
        padding: 20px;
    }

    #alert-popup .e-footer-content .e-primary {
        color: #4d4d4d;
        background-color: #eef1f2;
        border-color: #979393;
        border-radius: 0.20rem;
        font-family: Tahoma;
        font-size: 13px;
        line-height: 1.3;
        max-width: 100px;
        height: 31px;
        text-transform: none; /* Ensure text is not capitalized */
    }

    #alert-popup .e-footer-content .e-primary:hover {
        color: #000;
        background-color: #eef1f2;
        border-color: #000;
        opacity: 1;
    }

    #alert-popup img {
        width: 100px; /* Adjust width */
        height: 100px; /* Adjust height */
        margin-bottom: 20px; /* Space between image and text */
    }

/* ---- WebClient & Splitter panes ---- */

.split {
    display: flex;
    flex-direction: row;
}

.gutter {
    background-color: #eee;
    background-repeat: no-repeat;
    background-position: 50%;
}

    .gutter.gutter-horizontal {
        background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
        cursor: col-resize;
    }

/* ----  ---- */