h3 {
    margin: 12px 0 8px;
    font-size: 1.4rem;
    font-weight: 300;
    font-family: Verdana, arial, sans-serif;
    color: #2196F3;
}

/* --- Custom mic-* classes for modal and form controls --- */
.mic-select {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: #fff;
    min-width: 60px;
    outline: none;
    transition: border 0.2s;
}

.mic-input {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: #fff;
    outline: none;
    transition: border 0.2s;
}

.mic-border {
    border: 1px solid #bbb;
}

.mic-round {
    border-radius: 5px;
}

.mic-button {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: #f5f5f5;
    cursor: pointer;
    margin: 0 2px;
    transition: background 0.2s, border 0.2s;
}

.mic-unselect {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.mic-button:hover {
    background: #e0e0e0;
}

.mic-blue {
    background: #2196F3;
    color: #fff;
    border-color: #2196F3;
}

.mic-red {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
}

.mic-green {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Verdana, arial, sans-serif;
    font-size: 10pt;    
    height: 100%;
    overflow: hidden;

    background: #eaf6ff; /* #f5f5f5; */
    background-image: url("data:image/svg+xml;utf8,<svg width='32' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M0 12 Q8 0 16 12 T32 12' fill='none' stroke='%23e0ecf7' stroke-width='0.7'/></svg>");
    background-repeat: repeat;    
}

.bgImgRight {
    background-image: url('w3images/ppr02.png');
    background-repeat: repeat;
    width: 100%;
}

.main-container {
    max-width: 1400px;
    width: 100%;
    background: white;
    border-left: 0px solid silver;
    border-right: 0px solid silver;
    border-bottom: 0px solid silver;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    margin: auto;
}

#reportContainer {
    flex: 1;
    overflow: auto;
}

.mic-text-blue,
.w3-text-blue {
    color: #2196F3;
}

.mic-text-black,
.w3-text-black {
    color: rgb(20, 20, 20);
}

.mic-text-green,
.w3-text-green {
    color: #4CAF50;
}

.mic-text-indigo,
.w3-text-indigo {
    color: #3F51B5;
}

.mic-tiny {
    font-size: 60%;
}

.w3-light-blue {
    background-color: #ADD8E6 !important;
    /* Light blue color */
}

.mic-small,
.w3-small {
    font-size: 85%;
}

.mic-medium,
.w3-medium {
    font-size: 100%;
}

.mic-large,
.w3-large {
    font-size: 120%;
}

.mic-xlarge,
.w3-xlarge {
    font-size: 150%;
}

.mic-xxlarge,
.w3-xxlarge {
    font-size: 180%;
}

.mic-xxxlarge {
    font-size: 220%;
}

.mic-red {
    color: #fff !important;
    background-color: #f44336 !important;
}

/* Neded for error message from solver_precheck_xx.js*/
.w3-text-red {
    color: #f44336 !important;
}

.w3-medium {
    font-size: 15px !important;
}

.w3-tag {
    display: inline-block;
    padding: 0 8px;
    background-color: #000;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.w3-large {
    font-size: 18px !important;
}

.w3-round {
    border-radius: 4px;
}

.w3-red {
    color: #fff !important;
    background-color: #f44336 !important;
}

/* End of neded for error message from solver_precheck_xx.js*/

.w3-table-all {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #ddd;
    display: table;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 6px;
}

.w3-table-all tr {
    border-bottom: 1px solid #ddd;
}

.w3-table-all th {
    padding: 4px 4px;
    text-align: left;
    color: rgb(27, 27, 27); 
    background-color: #f1f1f1;       
    border: 1px solid #ddd;
    font-weight: normal;
    white-space: nowrap;
}

.w3-table-all td {
    padding: 2px 4px;
    color: #202020ff; 
    text-align: left;
    border: 1px solid #ddd;
}

/* Hoverable effect for tables */
.w3-hoverable tbody tr:hover {
    background-color: #ccc;
    cursor: pointer;
}

/* File results table - allow wrapping for long filenames in Name column */
#find_results_table .w3-table-all td {
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal;
}

/* Hide the textarea until CodeMirror initializes, this is a simple hack to eliminate the flickering of the code mirror area when F5*/
#w3review {
    display: none;
}

/* Sticky Status Bar */
#status-bar-line.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 1st flush left, last flush right; equal space between items */
  gap: 0;                         /* no extra gaps beyond the distributed space */
  padding: 0 .75rem;
  height: 20px;
  background: #f0f0f0;
  border-top: 1px solid #ccc;
  border-right: 1px solid #ccc;
  border-left: 1px solid #ccc;
}

/* Keep items on one line; let middle ones truncate if needed */
#status-bar-line span {
  white-space: nowrap;
}
#filetypeName {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 35vw; 
}

/* Hide items 2 and 3 on small devices */
@media (max-width: 600px) {
  #status-bar-line .hidden-mobile {
    display: none !important;
  }
}

/* Splitter Container */
.splitter-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    border-left: 1px solid silver;
    border-right: 1px solid silver;
}

/* Panels */
.panel {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-content {
    flex: 1;
    overflow: auto;
}

/* Splitter */
.splitter {
    background: #ddd;
    cursor: col-resize;
    width: 5px;
    flex-shrink: 0;
}

#fileStatusIcon {
    vertical-align: middle;
    display: inline-block;
    line-height: 1;
}

#fileCaptionText {
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* Vertical Splitter for Narrow Screens */
@media (max-width: 668px) {
    .splitter-container {
        flex-direction: column;
    }

    .splitter {
        height: 5px;
        cursor: row-resize;
        width: 100%;
    }

    /* Hide file caption text on very narrow screens (smartphones) */
    #fileCaptionText {
        max-width: 60px;
        font-size: 12px;
    }
}

.pref-table-checks td {
    padding: 2px 12px 6px 0px;
}

/* Essential Flex Container for the Header [START] */
.header {
    background-image: url('w3images/ppr02.png');
    background-repeat: repeat;
    width: 100%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Side Elements (Fixed Width) */
.fixed-element {
    flex-shrink: 0; /* IMPORTANT: Prevents these elements from shrinking */
    display: flex;
    align-items: center;
    padding: 5px;
}

#title-container {
    flex-grow: 1; /* Takes up all available space */
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0 4px;
             
    min-width: 0; /* Allows the element to shrink below content size */
}

/* Wrapper for the Symbol and Text */
#dynamic-content {
    display: flex;
    align-items: center;
    min-width: 0;
    font-size: small;
}

/* Symbol: Fixed size, reset direction */
#dynamic-filename-symbol {
    flex-shrink: 0; /* Prevents symbol from shrinking */
    margin-left: 10px;
    margin-right: 10px;
    font-size: small;
    display: flex; /* Make it a flex container */
    align-items: center; /* Center the SVG vertically */
}

/* Dynamic Title Text - CRITICAL for Truncation */
#dynamic-filename-title {
    unicode-bidi: bidi-override; 
    display: inline-block;
    
    /* CRITICAL 3: Standard Truncation */
    overflow: hidden; 
    white-space: nowrap; 
    text-overflow: ellipsis; 
    
    max-width: 100%; /* Ensures it respects container bounds */
    font-size: small;
}
/* Essential Flex Container for the Header [END] */

/* Context menu */
.cm-context-menu {
    position: fixed;
    z-index: 2000;
    display: none;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
    min-width: 180px;
    overflow: hidden;
}

.cm-context-menu button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font: 13px/1.4 Verdana, Arial, sans-serif;
}

.cm-context-menu button:hover {
    background: #f0f0f0;
}

.cm-context-menu .cm-sep {
    height: 0;
    border-top: 1px solid #d0d0d0;
    margin: 4px 0;
}

/* Styles for modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 10% auto 5% auto;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    animation: modal-appear 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;          
    background-color: #ececec;
    border-bottom: 1px solid #bebebe;    
    border-top-left-radius: 6px;
    border-top-right-radius: 6px; 
    padding: 10px 20px;   
}

.modal-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.4rem;
}

.modal-body {
    padding: 10px 20px 20px 20px;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    background-color: #f44336;
    color: white;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    user-select: none;
    flex-shrink: 0;
    transition: transform 0.1s ease;
    line-height: 0.85;
}

.close-button:hover {
    transform: translateY(1px); 
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    text-decoration: none;
}

.input-field {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.modal-button {
    border: none;
    display: inline-block;
    font-size: 14px;
    padding: 8px 16px;
    vertical-align: middle;
    overflow: hidden;
    text-decoration: none;
    background-color: #2196F3;
    color: white;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
}

.modal-button:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    transform: translateY(1px); 
}

/* Use UI font with proportional numerals for date inputs in the Open modal */
#modalFileOpen input[type="date"] {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: proportional-nums;
  font-feature-settings: "tnum" 0; /* disable tabular numbers if the font enables them */
}

.custom-select {
    width: auto;
    min-width: fit-content;
    padding: 8px 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    color: #333;
    font-size: 0.8rem;
    cursor: pointer;
    box-sizing: border-box;
}

.custom-select:focus {
    border-color: #2196F3;
    outline: none;
}

.date-grid {
  display: grid;
  grid-template-columns: minmax(116px, 1fr) repeat(auto-fit, minmax(100px, 1fr)); 
  gap: 6px;
  margin: 12px 0;  
  max-width: 600px;  
}

.date-grid label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

/* Styles for the menubar */
.m2-menubar {
    background-color: #F1F1F1;
    border-bottom: 1px solid #B5B5B5;
    border-top: 1px solid #B5B5B5;
    padding: 0px;
    /*font-family:arial;*/
}

/* Forces the Help sub-menu drop down to align to right when smartphone */
@media (max-width: 430px) {
    .m2-menubar {
        position: relative;
    }

    #myDropdown4.m2-menuitem {
        left: auto !important;
        right: 0;
        max-width: calc(100vw - 8px);
        width: max-content;
        white-space: nowrap;
        overflow-x: auto;
    }

    /* Make upgrade/register buttons much smaller on mobile to prevent menu wrapping */
    .m5-menubutton,
    .m4-menubutton {
        font-size: 0.7rem !important;
        padding: 2px 4px !important;
    }
}

.m2-topmenu {
    background-color: #F1F1F1;
    padding: 10px 6px 10px 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

/*
        .m2-topmenu:hover, .m2-topmenu:focus {
          background-color: #D3D3D3;
        }
        */

/* Unified softer menu text color */
.m2-topmenu,
.m2-menuitem mitem1,
.m2-menuitem mitem2 {
    color: #3a3a3a;
}

/* Hover / focus stronger */
.m2-topmenu:hover,
.m2-menuitem mitem1:hover,
.m2-menuitem mitem2:hover {
    color: #000;
}

.m2-menubutton {
    background-color: #4CAF50;
    color: white;
    padding: 6px 10px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

.m3-menubutton {
    background-color: #F44336;
    color: white;
    padding: 10px 12px 10px 12px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

.m4-menubutton {
    background-color: #FF5722;
    color: white;
    padding: 4px 6px;
    font-size: 12px;
    font-style: italic;
    border: none;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

.m5-menubutton {
    background-color: #FF9800;
    color: white;
    padding: 4px 6px;
    font-size: 12px;
    font-style: italic;
    border: none;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

/*
        .m2-menubutton:hover {
          background-color: #D3D3D3;
          color:black;
        }
        */

.m2-menu {
    position: relative;
    display: inline-block;
}

.m2-menuitem {
    display: none;
    position: absolute;
    background-color: white;
    /* #f1f1f1; */
    min-width: 160px;
    overflow: auto;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    border: 1px solid #B5B5B5;
    user-select: none;
    z-index: 1;
}

.menu-shortcut {
    font-size: 10px;
    color: #696969ff;
    border: 1px solid #c4c4c4ff;
    background-color: #f3f3f3ff;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: Helvetica, Arial, sans-serif;
    pointer-events: none;
}

.code-sample {
    font-size: 0.9em;
    color: #696969ff;
    border: 1px solid #c4c4c4ff;
    background-color: #f3f3f3ff;
    padding: 1px 4px;
    border-radius: 4px;
    font-family: consolas, arial, sans-serif;
    pointer-events: none;
}

.m2-menuitem mitem1 .menu-shortcut,
.m2-menuitem mitem2 .menu-shortcut {
    float: right;
}

.m2-menuitem mitem1 {
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    cursor: pointer;
}

.m2-menuitem mitem2 {
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    cursor: pointer;
    border-top: 1px solid #B5B5B5;
}

.m2-menuitem mitem1,
.m2-menuitem mitem2,
.m2-topmenu,
.m2-menubutton,
.m3-menubutton,
.m4-menubutton,
.m5-menubutton {
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE/Edge */
}

.m2-button {
    /*font-family: arial;*/
    font-size: 12px;
    padding: 4px 8px 4px 8px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin: 1px 2px 1px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition-duration: 0.4s;
    background-color: white;
    color: black;
    border: 2px solid #4CAF50;
}

.m2-button:hover {
    background-color: #4CAF50;
    color: white;
}

.m2-menu mitem1:hover {
    background-color: #ddd;
}

.m2-menu mitem2:hover {
    background-color: #ddd;
}

.m2-topmenu:hover {
    background-color: #ddd;
}

.m2-menubutton:hover {
    background-color: #459E48;
}

.m3-menubutton:hover {
    background-color: #F22B1D;
}

.menu-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 6px;
}

.showSubMenu {
    display: block;
}

#pageWidthLabel {
    pointer-events: none;
}

#pageWidthControls {
    margin-top: 4px;
}

.lic-label {
    color: black;
    padding: 1px 3px 1px 3px;
    margin: 0 0px 0px 0px;
    display: inline-block;
    border-radius: 4px;
    text-decoration: none;
}

.lic-label-free {
    background-color: #CCCCCC;
    border: 1px solid #919191;
}

.lic-label-std {
    background-color: #93D2FF;
    border: 1px solid #3DAEFF;
}

.lic-label-pro {
    background-color: #E4AAFF;
    border: 1px solid #D175FF;
}


#news_announcements ol {
    padding-left: 22px;
    margin: 0;
}

#news_announcements ol li {
    margin-bottom: 10px;
    /* increase/decrease as desired */
    line-height: 1.2;
    /* slightly taller lines */
}

#essentials_summary h2,
#about_section h2,
#news_announcements h2,
#shortcutsSection h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    display: flex;
    color: #2196F3;
    /* align image + text horizontally */
    align-items: center;
    /* vertical centering */
    gap: 8px;
    /* space between icon and text */
    font-weight: 600;
}

#essentials_summary h2 img,
#about_section h2 img,
#news_announcements h2 img,
#shortcutsSection h2 img {
    display: block;
    width: 24px;
    height: 24px;
}


/* Scoped styles for settings-and-hints-help help content using ID */
#settings-and-hints-help h2 {
    margin-top: 6px;
    color: #2196F3;
}

#settings-and-hints-help h3 {
    margin-top: 10px;
    margin-bottom: 6px;
}

#settings-and-hints-help table {
    border-collapse: collapse;
    /* width-: 100%; */
    margin-bottom: 10px;
    border: 1px solid #b1b1b1;
}

#settings-and-hints-help th,
#settings-and-hints-help td {
    border: 1px solid #c5c5c5;
    padding: 4px 6px;
    color: #333333;
}

#settings-and-hints-help th {
    background-color: #e9e9e9;
    font-weight: normal;    
}

#settings-and-hints-help code {
    font-family: consolas, monospace;
    color: teal; /* 137dd3 2196F3 */
}

#settings-and-hints-help .description {
    font-size: smaller;
    color: #888;
}