html {
    font-size: 14px;            /* Default size for desktop */
    color: #333;                
}
@media (max-width: 1024px) {
  html {
    font-size: 13px;            /* Default size for tablet */
    /*color: violet;*/          /* debug */
    color: #333;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 12px;            /* Default size for mobile */
    /* color: green; */         /* debug */
    color: #333;
  }
}

/* RTL-specific styles */
html[dir="rtl"] {
    direction: rtl; /* Set the text direction to RTL */
    text-align: right; /* Align text to the right */
}
body[dir="rtl"] {
    text-align: right;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    /* height: 100vh; */
    height:  100%;
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8; /* Soft grey background for the body */
}

header {
    background-color: #ffffff; /* White background for header */
    color: #333; /* Dark text for better contrast */
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1); /* Light shadow for header */
    text-align: center;
}

/* Flexbox layout for the header content */
header .header-content-container {
    width: 100%;
    display: flex;
    justify-content: space-between; /* Pushes items to opposite ends */
    align-items: center;       /* Vertically centers the text and logo */
}

[dir="rtl"] .header-content-container{
    flex-direction: row-reverse;
}

/* Logo styling */
header .header-content-left {
    justify-self: start; /* Aligns the left div to the left */
}

/* Logo styling */
header .header-content-left img {
    margin: 1rem;                 /* Adds space between the logo and header text */
    vertical-align: middle;             /* Align the logo with the text */
    width: 80%;
    max-height: 4rem;

}

header .header-content-right{
    display: flex;
    padding: 0.2rem;
}

@media (max-width: 768px) {
    header .header-content-right{
        display: block;
    }
}

.size-limited-120{
    max-width: auto;
}

.size-limited-120 a,span, p {
    overflow-wrap: normal;
} 

@media (max-width: 768px) {
    .size-limited-120{
        max-width: 120px;
    }

    .size-limited-120 a, span, p {
        overflow-wrap: break-word;
        word-wrap: break-word; /* For older browsers */
    }     
}

.screen-display{
    display: auto;
}
@media (max-width: 768px) {
    .screen-display{
        display: none;
    }
}

.screen-display-hidden{
    display: none;
}
@media (max-width: 768px) {
    .screen-display-hidden{
        display: contents;
    }
}

[dir="rtl"] .header-content-right{
    flex-direction: row-reverse;
}

header .header-content-right span a{
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    /*color: black;*/
    color: cornflowerblue;
}

header .header-content-right-item {
    display: flex;
    justify-content: flex-end;
    align-items: center;       /* Vertically centers the text and logo */
    margin: 0.2rem;
    font-size: 1rem;
}

[dir="rtl"] .header-content-right-item{
    flex-direction: row-reverse;
}

header .header-content-right-item .username{
    font-weight: bold;
}

header .header-menu-main{
    display: flex;
    justify-content: center;
}

header .header-menu-main ul{
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
    padding-inline-start:0;
}

footer {
    background-color: #ffffff; /* White background for footer */
    color: #333; /* Dark text for footer */
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #eee; /* Light separator line */
}

footer p {
    margin: 0; 
}

.container-main{
    display: flex;
}

/* Vertical menu */
/* Menu Toggle Button */
.container-menu{    
    /*height: 100%;*/
    z-index: 100;
    display: flex;
    position: relative;
}

/* Menu Toggle Button */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    background-color: white;
    margin: 0.3em;
    height: 20px;
    width: 20px;
    font-size: 1.6em;
    cursor: pointer;
    border-radius: 5px;
}

.img-back {
    background-image: url("../img/left.0feb3e610eb1.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

[dir="rtl"] .img-back {
    background-image: url("../img/right.bbe58e23ada2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vertical-menu-title{
    display: flex;
    justify-content: space-between; 
    width: 100%;
}

/* Vertical Menu Styling */
.vertical-menu {
    position: absolute;
    margin-top: 0.5em;
    left: 0;
    width: 13em;
    height: 100%;
    background-color: white;
    transition: transform 0.3s ease;
}

[dir="rtl"] .vertical-menu {
    right: 0;  
}

.vertical-menu.hide{
    transform: translateX(-80%);
}

[dir="rtl"] .vertical-menu.hide{
    transform: translateX(80%);
}

.vertical-menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: white;
}

.vertical-menu li{
    padding: 1em 0;
    display: block;
}

.vertical-menu .submenu-item.active{
    padding-bottom: 0;
    border-left: 0;
    border-right: 3px solid darkgoldenrod;
}

[dir="rtl"] .vertical-menu .submenu-item.active{
    border-right: 0;
    border-left: 3px solid darkgoldenrod;
}

.vertical-menu li a {
    color: black;
    padding: 0em 1em;
    text-decoration: none;
}

.vertical-menu li a:hover {
   color: #0088ce;
}

/* Add hover effect on menu items */
.vertical-menu li:hover {
    border-radius: 3px;
    border-left: 0;
    border-right: 3px solid #0088ce;
}

[dir="rtl"] .vertical-menu li:hover {
    border-right: 0;
    border-left: 3px solid #0088ce;
}

/* Submenu Styling */
.submenu {
    display: none;  /* Hidden by default */
    list-style-type: none;
    padding: 1em 0;
}

.submenu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.submenu li{
    padding: 1em;
}

.submenu li a {
    text-decoration: none;
    color: black;
    display: block;
}

/* Add hover effect on menu items */
.submenu li:hover {
    border-right: 0;
    border-left: 0;
}

[dir="rtl"] .submenu li:hover {
    border-right: 0;
    border-left: 0;
}

.submenu li:hover a {
    color: #0088ce;
}

.submenu-item.active .submenu {
    display: block;  /* Show the submenu when the parent is active */
}

/* Optional: Add icon for submenu toggle */
.submenu-toggle::after {
    content: ' ▼';  /* Adds a down arrow to indicate that the submenu can be expanded */
    font-size: 1em;
}

.submenu-item.active .submenu-toggle::after {
    content: ' ▲';  /* Changes arrow direction to up when submenu is opened */
}

main {
    width: 90%;
    /*flex: 1;*/
    display: flex;
    /*justify-content: center;*/
    flex-direction: column;
    align-items: center;
    padding-top: 2em;
    padding-bottom: 2em;
    margin-left: 3.8em;
    margin-right: 1em;
}

[dir="rtl"] main{
    margin-left: 1em;
    margin-right: 3.8em;
}

@media (max-width: 768px) {
    main {
        /*max-width: 300px;*/
    }
}
/* Ensure form and paragraph are stacked */
.standard-form {
    max-width: 720px;
    width: 90%;
    background-color: #ffffff;
    padding: 1.8em 1em;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;  /* Make the form elements stack vertically */
    /*gap: 15px; */ /* Add space between elements */
}

/* Ensure form and paragraph are stacked */
.standard-box-form {
    max-width: 450px !important;
}

.standard-form h1 {
    color: #333;
    padding-bottom: 0.3em;
    margin-block-end: 0;
}

.standard-form h2 {
    color: #0088ce;
    padding-bottom: 0.5em;
    margin-top: 0;
    border-bottom: 1px solid #0088ce;
}

.standard-form .header-3 {
    /*display: flex;*/
    margin-top: 2em;
    border-top: 1px solid #0088ce;
    /* align-items: end; */
}

.standard-form .header-3 span {
    /*width: 100%;*/
    font-weight: bold;
    color: #0088ce;
    font-size: 1em;
    white-space: nowrap;
    padding-bottom: 4px;
    line-height: 2em;
}

/* Add margin-bottom for the paragraph to create space between form and link */
.standard-form .form-group p {
    margin-top: 1.1em;
    /*text-align: center;*/ /* Center the text */
}

/* Custom CSS for error messages */
.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}

.alert-error strong {
  font-weight: bold;
}

/* Custom CSS for success messages */
.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}

.alert-success strong {
  font-weight: bold;
}

.alert-error ul.errorlist {
  list-style: none;
  padding-left: 0;margin-tio: 0;
  margin-bottom: 0;
}

.alert-error ul.errorlist li {
  color: #721c24;
  font-size: 0.875rem;
  /*margin-top: 5px;*/
}

.standard-form ul {
    padding-inline-start: 20px;
}

.standard-form ul.errorlist{
    color: red;
    padding-inline-start: 20px;
}

.form-group {
    margin-bottom: 2em;
}

.form-group {
    margin-bottom: 2em;
    /*margin-right: 2em;*/
}

.form-group label {
    font-weight: bold;
    color: #333; /* Dark text for labels */
    display: block; /* Ensure label takes full width */
    text-align: left; /* Align label text to the left */
}

[dir="rtl"] .form-group label {
    text-align: right; /* Align label text to the left */
}

.form-group input, textarea {
    width: 100%;
    max-height: 100px;
    padding: 0.5em;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: Arial;
}

.form-group input[type='checkbox'] {
    padding: 12px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 1.2rem;
    box-sizing: border-box;
}

.form-group .errorlist{
    display: none;
}

.form-group input:focus {
    border-color: #007bff; /* Blue border on focus */
    outline: none;
}

.form-group ul li {
    color: #333;
    font-size: 0.9em;
}

.helptext{
    color: #333;
    font-size: 1em;
}

.container-btn-primary{
    /*display: flex;*/
    text-align: center;
    justify-content: center;
    gap: 5px;
    margin-top: 1em;
}

.container-btn-primary-header{
    width: 100%;
    text-align: right;
    margin-top: 0.2em;
    gap: 5px;
}

.a-btn{
    display: inline-block;
    text-align: center;
    line-height: 1.1;
}

.btn-primary {
    text-decoration: none;
    background-color: #007bff; /* Blue background for the button */
    color: #ffffff;
    padding: 0.6em;
    margin: 0.1em 0em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: auto;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

/* Basic button styling */
.btn-secondary {
    padding: 0.5em 0.9em;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    width: auto;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.btn-primary a {
  all: unset;  /* Resets all inherited styles and user-agent styles */
  text-decoration: none; /* Removes any underlining if it was inherited */
  color: inherit; /* Inherit text color from parent */
  cursor: inherit; /* Inherit cursor style from parent (button's cursor) */
}

.btn-success {
    color: #fff;  /* White text */
    background-color: #28a745;  /* Green background */
    border-color: #28a745;  /* Green border */
}

.btn-success:hover {
    color: #fff;  /* White text */
    background-color: #218838;  /* Darker green on hover */
    border-color: #1e7e34;  /* Darker green border on hover */
}

.btn-success:focus, .btn-success.focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);  /* Focus ring */
}

/* Basic button styling */
.btn-danger {
    background-color: #dc3545; /* Bootstrap's red for danger */
    color: white; /* Text color */
    border-color: #dc3545; /* Border color */
}

/* Button on hover */
.btn-danger:hover {
    background-color: #c82333; /* Darker red on hover */
    border-color: #bd2130; /* Darker border on hover */
    text-decoration: none; /* Remove underline on hover */
}

/* Button on active (when clicked) */
.btn-danger:active {
    background-color: #bd2130; /* Even darker red when clicked */
    border-color: #9a1e26; /* Even darker border */
}

/* Focus state (when the button is focused) */
.btn-danger:focus {
    outline: none; /* Remove default outline */
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.5); /* Subtle focus ring */
}

.btn-action {
    background-color: #6c757d; /* Grey color */
    color: white; /* Text color */
    border: 1px solid #6c757d; 
}

/* Button on hover */
.btn-action:hover {
    background-color: #5a6268; /* Darker grey on hover */
    border-color: #545b62; /* Darker border on hover */
    text-decoration: none; /* Remove underline on hover */
}

/* Button on active (when clicked) */
.btn-action:active {
    background-color: #4e555b; /* Even darker grey when clicked */
    border-color: #494e54; /* Darker border when clicked */
}

/* Focus state (when the button is focused) */
.btn-action:focus {
    outline: none; /* Remove default outline */
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.5); /* Subtle focus ring */
}

/* Disabled button state */
.btn-action:disabled {
    background-color: #e2e3e5; /* Light grey background */
    border-color: #c6c8ca; /* Light grey border */
    color: #6c757d; /* Text color */
    cursor: not-allowed; /* Disabled cursor */
}

.btn-inactive {
    background-color: #ccc; /* Gray background to indicate inactivity */
    color: #666; /* Darker text to show it's inactive */
    border: 0px solid #aaa; /* Border to match the faded style */
    cursor: not-allowed; /* Changes cursor to indicate it's not clickable */
    opacity: 0.6; /* Makes the button look faded */
    pointer-events: none; /* Disables any mouse events (clicks, hover) */
    transition: background-color 0.3s ease, opacity 0.3s ease; /* Smooth transition for changes */
}

/* Optionally, you can also add some hover effects for when the button is inactive */
.btn-inactive:hover {
    background-color: #ccc; /* Prevents any hover effect from happening */
    opacity: 0.6; /* Keeps opacity the same when hovering */
}

.container-btn-list{
    margin-left: 4px; 
    margin-left: 4px; 
    display: flex;
    flex-direction: column; 
    gap: 4px;
}

.container-btn-cols{
    display: flex;
    align-items: center;
    gap: 4px;
}

.link-text {
    color: #007bff;
    text-decoration: none;
}

.link-text:hover {
    text-decoration: underline;
} 

ul.company-list li{
    text-align: left;
    margin: 0.4em 0;
}

ul.company-list li a{
    text-decoration: none;
    color: cornflowerblue;
}
/* Add margin-bottom for the paragraph to create space between form and link */
p {
    margin-top: 20px;
    /*text-align: center;*/ /* Center the text */
}

/* Table styling */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  margin: 10px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.styled-table th, .styled-table td {
  padding: 0.6em 0.4em;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

/* Header styling */
.styled-table th {
  background-color: #0088ce;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Row hover effect */
.styled-table tr:hover {
  background-color: #f5f5f5;
}

/* Alternate row colors */
.styled-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Responsive table design */
@media screen and (max-width: 768px) {
  .styled-table {
    font-size: 12px;
  }

  .styled-table th, .styled-table td {
    padding: 6px;
  }
}

.select-small-dropdown{
    height: 20px !important;
    line-height: 20px !important;
    font-size: 1em !important;
}

.select-standard-form-dropdown{
    margin-top: 5px;
    text-align: justify;
}

.table-multi-columns{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 1.5em;
}

.table-multi-columns tbody{
  display: contents;
}

.table-multi-columns tbody tr td label{
  white-space: nowrap;
  min-width: 120px;
}

@media (max-width: 768px) {
    .table-multi-columns tbody tr td label{
        min-width: 100px;
    }
}

.table-multi-columns tbody tr td:has(input){
  width: 30px;
  text-align: right;
}

.table-multi-columns tbody tr td:has(input) input{
  width: auto;
}

.sortable {
  cursor: pointer;
}
.ascending:after {
  content: " ↑"; /* Ascending symbol */
}
.descending:after {
  content: " ↓"; /* Descending symbol */
}

.link{
    text-decoration: underline;
    color: cornflowerblue;
    cursor: pointer;
}

@media (max-width: 768px) {
    .size-limited{
        max-width: 100px;
    }
}

.link:hover{
    color: blue;
}

.text-important-success{
    color: green;
    font-weight: bold;
}

.text-important-danger{
    color: red;
    font-weight: bold;
}

.single-line-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
