body, html {
    padding: 0;
    margin: 0;
    height: 100%;
    /* overflow-x: hidden; */
    font-size: 16px;
    box-sizing: border-box;
}

a {
    color: var(--brand-a-bg);
    text-decoration: none;
}
a:hover, a:focus {
    color: var(--brand-a-hilite);
}

* {
    box-sizing: inherit;
}

hr {
    width: 100%;
}

#MainContainer {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding: 0;
}

#content {
    flex: 1;
}

#content:has(.sidebar-layout) {
    padding: 0;
}

.loginbg {
    /*background-image: url(../../admin/images/blueembossedwater.jpg);*/
    background-size: contain;
}

/* The following is for the accordion effect */
details.mce-accordion {
    overflow: hidden;
}

details.mce-accordion > *:not(summary) {
    opacity: 0;
    transition: opacity 0.5s ease;
}

details.mce-accordion[open] > *:not(summary) {
    opacity: 1;
}
/* End accordion effect */

form, form.login {
    /* display: flex;
    flex-direction: column; */
    color: #262626;
    /*background: #3094ff;*/
    background: #aaa;
    padding: 1em 2em;
    border-radius: 6px;
    margin: 1em;
}

form.login {
    width: max-content;
}

form#installform {
    width: 100%;
    max-width: 600px;
    margin: 1em auto;
    padding: 1em 2em;
    display: flex;
    flex-direction: column;
}
form#installform input.installinput {
    margin-bottom: .5em;
    padding: 10px 5px;
    border-radius: 4px;
}

.clear {
    display: block;
    clear: both;
    height: 1.2em;
}

header {
    display: flex;
    justify-content: space-between;
    background-color: var(--brand-a-bg);
    padding: var(--standard-padding);
    flex-direction: column;
    align-items: center;
}

.flex {
    display: flex;
}
.flex-wrap-wrap {
    flex-wrap: wrap;
}
.flexRowContainer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 20px;
}
.flexRowContainer .mainFlexItem {
    margin-top: 10px;
}
.row {
    flex-direction: row;
}
.column {
    flex-direction: column;
}
.space-between {
    justify-content: space-between;
}
.space-around {
    justify-content: space-around;
}
.space-evenly {
    justify-content: space-evenly;
}
.justify-flex-start {
    justify-content: flex-start;
}
.justify-flex-end {
    justify-content: flex-end;
}
.align-items-center {
    align-items: center;
}
.align-items-start {
    align-items: flex-start;
}
.align-items-end {
    align-items: flex-end;
}
.justify-center {
    justify-content: center;
    text-align: center;
}
.justify-left {
    justify-content: left;
    text-align: left;
}

/* flex item spacing */
.gap-10-20 {
    gap: 10px 20px;
}
.gap-20 {
    gap: 20px;
}
.gap-10 {
    gap: 10px;
}
.gap-1em {
    gap: 1em;
}

.touch {
    cursor: pointer;
}

.card {
    flex: 1;
    border: 1px solid #464646;
    padding: .5em;
    border-radius: 6px;
    margin: 1em;
    height: max-content;
    width: max-content;
}
.card-title {
    background-color: var(--brand-a-bg);
    color: var(--brand-b-color);
    margin-top: -.5em;
    margin-left: -.5em;
    margin-right: -.5em;
    margin-bottom: .5em;
    padding: .5em;
    font-weight: 600;
}
.full-width, .half-width, .width--full, .width--half {
    width: 100%;
}
.full-width.colwrap, .width--full.colwrap {
    width: 100%;
}

.content-width {
    width: max-content;
}
.max-width-25 {
    max-width: 100%;
}
.max-width-50 {
    max-width: 100%;
}
.max-height-25 {
    max-height: 25%;
}

.content-height {
    height: max-content;
}

.pad-1 {
    padding: 1em;
}
.pad-top-1 {
    padding-top: 1em;
}
.pad-top-2 {
    padding-top: 2em;
}
.pad-bottom-1 {
    padding-bottom: 1em;
}
.pad-left-1 {
    padding-left: 1em;
}
.pad-right-1 {
    padding-right: 1em;
}
.pad-left-2 {
    padding-left: 2em;
}
.pad-right-2 {
    padding-right: 2em;
}

.border-1 {
    border: 1px solid var(--border-color);
}
.border-2 {
    border: 2px solid var(--border-color);
}

.border-top-1 {
    border-top: 1px solid var(--border-color);
}
.border-bottom-1 {
    border-bottom: 1px solid var(--border-color);
}
.border-top-2 {
    border-top: 2px solid var(--border-color);
}
.border-botom-2 {
    border-bottom: 2px solid var(--border-color);
}
.margin-top-half {
    margin-top: .5em;
}
.margin-top-1 {
    margin-top: 1em;
}
.margin-top-2 {
    margin-top: 2em;
}
.margin-bottom-half {
    margin-bottom: .5em;
}
.margin-bottom-1 {
    margin-bottom: 1em;
}
.margin-bottom-2 {
    margin-bottom: 2em;
}
.margin-left-half {
    margin-left: .5em;
}
.margin-left-1 {
    margin-left: 1em;
}
.margin-left-2 {
    margin-left: 2em;
}
.margin-right-half {
    margin-right: .5em;
}
.margin-right-1 {
    margin-right: 1em;
}
.margin-right-2 {
    margin-right: 2em;
}
.text-align-center {
    text-align: center;
}
.text-align-left {
    text-align: left;
}
.text-align-right {
    text-align: right;
}

/* Messages */
/* System message styling for #sysmsg to match .sysMessage */

svg.error {
    color: #b90e1f;
}
svg.success {
    color: #008000;
}
svg.info {
    color: #3094ff;
}
#sysmsg,
.sysMessage {
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 1em;
    padding: 0 30px;
    color: white;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    background: #bebebe;
}
#sysmsg small.margin-left-2,
.sysMessage small.margin-left-2 {
    margin-left: unset;
}

#sysmsg.error,
.msg_error {
    border: 2px solid #b90e1f;
    background-color:#b90e1f;
    padding: 10px 30px;
}
#sysmsg.success,
.msg_success {
    border: 2px solid #008000;
    background-color:#008000;
    padding: 10px 30px;
}
#sysmsg.info,
.msg_info {
    border: 2px solid #3094ff;
    background-color:#3094ff;
    padding: 10px 30px;
}

/* html dialog */
dialog[open] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px 20px;
    padding: 2em;
}

dialog .fa-circle-xmark {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
}
dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* The Modal: this pertains to the Modal javascript class object created by ngn/js/modal.js */
.modal {
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    padding-top: 1em;
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; 
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    display: flex; /* Flexbox to center the modal content */
    align-items: center; /* Align on cross axis */
    justify-content: center; /* Align on main axis */
}

/* Modal Content/Box */
.modal-content {
    /*background-color: #fff;*/
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    max-height: 90%; /* Limit the height to 90% of the viewport */
    overflow-y: auto; /* Enable vertical scrolling within the modal content */
    margin: 10px 20px; /* Ensure some margin on smaller screens */

    /*background-color: transparent;
    padding: 12%;
    border: none;
    max-width: 500px;
    width: 100%; /* Could be more or less, depending on screen size */
    /*max-height: 90%;
    position: relative;
    display: flex;
    justify-content: center;*/
    
}

.modal-content img, .modal-content p {
    width: 80%;
    height: auto;
    margin: 5% auto;
}



/* The Buttons */
.modalUI {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    padding: 6px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
    z-index: 1002;
}

/* Default position for non-image modals */
.modal > .modalUI {
    top: 1em;
    right: 1em;
}

/* Position for image modals - relative to the image wrapper */
.modal-image-wrapper > .modalUI {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
}

.modalUI i {
    margin: 0;
}

.modalUI i:hover,
.modalUI i:focus {
    color: #aaa;
    text-decoration: none;
    cursor: pointer;
}

/** Modal Styles **/

.modal-content.dialog, .modal-content.prompt, .modal-content.alert, .modal-content.confirm, .modal-content.html {
    background-color: #fff;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    padding: 1em;
}

.modal-content.image {
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  position: relative !important;
}
.modal-content.image img {
  max-width: calc(96vw - 2em) !important;
  max-height: calc(96vh - 2em) !important;
  width: auto !important;
  height: auto !important;
  margin: 1em !important;
  display: block !important;
  object-fit: contain !important;
  box-shadow: none !important;
  background: #fff !important;
}
/* Modal image centering and sizing */
.modal-content.image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /*background: #fff;*/
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  overflow: auto;
}
/* Wrapper for image and its UI controls */
.modal-image-wrapper {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
}
.modal-caption {
    width: 100%;
    text-align: center;
}
.modal-content .modal-caption p {
    margin-top: 0;
}

.modal-content.html {
    display: block;
    padding: 1em;
}

/** Sidebar Styles **/
.sidebar-layout {
	display: flex;
	justify-content: space-between;
	min-height: calc(100vh - var(--footer-height));
	align-items: stretch;
}

.left-sidebar .sidebar {
	order: 1;
	max-width: 20%;
    min-width: 250px;
}

.left-sidebar .main-content {
	order: 2;
	width: 80%;
}

.right-sidebar .sidebar {
	order: 2;
    max-width: 20%;
    min-width: 250px;
}

.right-sidebar .main-content {
	order: 1;
	width: 80%;
}

.both-sides .left-sidebar {
	order: 1;
	width: 20%;
    min-width: 200px;
}

.both-sides .main-content {
	order: 2;
	width: 60%;
}

.both-sides .right-sidebar {
	order: 3;
	width: 15%;
    min-width: 200px;
}

.sidebar {
	padding: 10px;
	background-color: #ccc;
	display: flex;
	flex-direction: column;
}

.main-content {
	padding: 10px;
}

.container {
	display: flex;
}

.content-left {
	flex: 3; /* Adjust the flex value to control the width */
	padding: 20px;
}

.sidebar-right {
	flex: 1; /* Adjust the flex value to control the width */
	display: flex;
	flex-direction: column;
}

.sidebar-top,
.sidebar-bottom {
	padding: 20px;
	border: 1px solid #ccc; /* Optional: Add a border for visual separation */
	margin-bottom: 10px; /* Space between the two sidebar sections */
}

@media screen and (max-width: 800px) {
    
    .sidebar-layout {
        flex-direction: column-reverse;
    }

    .left-sidebar .sidebar,
    .left-sidebar .main-content,
    .right-sidebar .sidebar,
    .right-sidebar .main-content,
    .both-sides .left-sidebar,
    .both-sides .main-content,
    .both-sides .right-sidebar {
	    max-width: unset;
        width: unset;
    }
}

/* Modal JS Class ends */
/* Tinymce blocks */
.w33 {
	width: 33%;
}

.w50 {
	width: 50%;
}

.w75 {
	width: 75%;
}

.w50,
.w75,
.w33 {
	padding: 1em 0;
	margin: 0 auto;
}

.w50.right {
	width: calc(50% - 1em);
	padding-left: 1em;
	display: inline-block
}

.w50.left {
	width: calc(50% - 1em);
	padding-right: 1em;
	display: inline-block
}

.w50.left img, .w50.right img, .w33 img {
    max-width: 100%;
    height: auto;
    display: block;
}

.big-strong {
	font-size: 30px;
	font-weight: bold;
}

.btn-danger {
    background-color: #ff0000;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-danger:hover {
    background-color: #cc0000;
}

.btn-cancel {
    background-color: #ccc;
    color: #000;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-cancel:hover {
    background-color: #aaa;
}

@media only screen and (max-width: 1185px) {
	.w33 {
		width: 50%;
	}
}

@media only screen and (max-width: 679px) {
	.w50,
	.w33 {
		width: 75%;
	}
	.w50.left,
	.w50.right {
		width: 100%;
		padding-left: 0;
		padding-right: 0;
	}
}
/* tinymce blocks end */
/* applies to larger screens */
@media screen and (min-width: 1280px) {
    .full-width, .width--full {
        width: 100%;
    }
    .half-width, .width--half {
        width: 50%;
    }
    .full-width.colwrap, .width--full.colwrap {
        width: 30% !important;
    }
}
@media screen and (min-width: 800px) {
	#content {
		padding: var(--standard-padding);
	}

	#content:has(.sidebar-layout) {
		padding: 0;
	}
	.max-width-25 {
		max-width: 25%;
	}
	.max-width-50 {
		max-width: 50%;
	}
	.full-width.colwrap, .width--full.colwrap {
		width: 45%;
	}
}