/*
 * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
 * See LICENSE in the project root for license information.
 */
* {
    font-size:1.0em !important;
}
 html,
 body {
     width: 100%;
     height: 100%;
     margin: 0;
     padding: 0;
     background-color: #FFF;
     padding-bottom:200px;
 }
 h1 {
    font-size:1.4em !important;
 }
 h2 {
    font-size:1.3em !important;
 }
 ul {
     margin: 0;
     padding: 0;
     list-style:none;
 }
 #reportLi, #dataLi {
  display:none;
 }
 select, input {
  width:200px;
  padding:5px;
  font-size:1.05em;
  display:block;
  margin-bottom: 5px !important;
}
@supports (appearance: base-select) {
  select,
  select::picker(select) {
    appearance: base-select;
  }
  /* Closed control: single line, arrow drawn as background so it can't wrap */
  select {
    display: block;
    box-sizing: border-box;
    width: 202px;              /* matches input: 190 + 2*5 padding + 2*1 border */
    min-block-size: 0;
    padding: 5px 24px 5px 5px;
    border: 1px solid #767676;
    border-radius: 2px;
    color: #1a1a1a;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23333'/%3E%3C/svg%3E") no-repeat right 8px center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
  }
  select::picker-icon {
    display: none;
  }
  /* Popup */
  select::picker(select) {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #767676;
    border-radius: 2px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    color: #1a1a1a;
  }
  select selectedcontent {
    color: #1a1a1a;
  }
  select option {
    background-color: #fff;
    color: #1a1a1a;
    padding: 4px 6px;
    white-space: normal;
  }
  select option::checkmark {
    display: none;
  }
  select option:checked {
    background-color: #e6f0fa;
    font-weight: 600;
  }
  select option:hover,
  select option:focus-visible {
    background-color: #f3f2f1;
  }
}
 input {
    width:190px;
 }
 ul li {
  padding-top:3px;
 }
 .runBtn {
  padding:3px;
  color:#FFF;
  background-color: #163c5b;
  width:100%;
 }
 .dyanmicWidthBtn {
    width:auto;
    padding-left:10px;
    padding-right: 10px;
 }
 #runReportBtn {
  display:none;
  margin-top: 20px;
 }
 .btnCont {
  width:90%;
  margin:auto auto;
  margin-left:22px;
 }
 #mbLogo {
  max-width:100%;
 }
.version-display {
  font-size: 0.8em !important;
  color: #666;
  margin-top: 8px;
  text-align: center;
 }
 .ms-welcome__header {
    padding: 20px;
    padding-bottom: 10px;
    padding-top: 10px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    align-items: center;
 }
 .ms-welcome__main {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex: 1 0 0;
    flex: 1 0 0;
    padding: 10px 20px;
 }
 .ms-welcome__main > h2 {
     width: 100%;
     text-align: center;
 }
 .ms-welcome__features {
     list-style-type: none;
     margin-top: 10px;
 }
 .ms-firstrun-instructionstep__header {
   padding-left: 20px;
 }
 .ms-firstrun-instructionstep__welcome-body {
   padding-left: 20px;
 }
 .ms-firstrun-instructionstep__list {
   padding-left: 20px;
 }
 .ms-welcome__features.ms-List .ms-ListItem {
     padding-left: 20px;
     padding-bottom: 10px;
     display: -webkit-flex;
     display: flex;
 }
 .ms-welcome__features.ms-List .ms-ListItem > .ms-Icon {
     margin-right: 10px;
 }
 .ms-welcome__action.ms-Button--hero {
     margin-top: 30px;
 }
.ms-Button.ms-Button--hero .ms-Button-label {
  color: #0078d7;
}
.ms-Button.ms-Button--hero:hover .ms-Button-label,
.ms-Button.ms-Button--hero:focus .ms-Button-label{
  color: #000;
  cursor: pointer;
}
b {
    font-weight: bold;
}
.objectCenter {
    margin:auto auto;
    display:block;
}
/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e1e1e1;
  margin: 8px 8px 0 8px;
}
.tab-button {
  appearance: none;
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-bottom: 2px solid transparent;
}
.tab-button.is-active {
  border-bottom-color: #0078d4; /* Fluent primary */
  font-weight: 600;
  outline:none;
}
.tab-panel {
  padding: 8px;
  outline:none;
  float:left;
}
.tab-panel[hidden] {
  display: none !important;
}
/* Optional: simple spacing for the upload form */
.form-row {
  margin: 8px 0;
  float:left;
  width:100%;
}
.drop-zone {
  border: 2px dashed #a6a6a6;
  border-radius: 4px;
  padding: 4px;
  text-align: center;
  color: #323130;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}
.drop-zone--over {
  border-color: #605E5C;
  background: #f3f2f1;
}
.file-list {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0 0;
}
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border: 1px solid #e1dfdd;
  border-radius: 2px;
  margin-bottom: 6px;
  background: #fff;
}
.file-list li span {
  overflow-wrap: anywhere;
}
.file-list button.remove-file {
  background: transparent;
  border: none;
  color: #a80000;
  cursor: pointer;
  padding: 4px 6px;
}
/* Modal base */
.loading-modal {
  position: fixed;
  inset: 0;
  display: none; /* toggled via [data-open="true"] */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-modal[data-open="true"] {
  display: flex;
}
/* Backdrop */
.loading-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
/* Dialog */
.loading-modal__dialog {
  position: relative;
  z-index: 1;
  min-width: 260px;
  max-width: 90vw;
  padding: 20px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: grid;
  grid-auto-flow: row;
  row-gap: 12px;
  text-align: center;
  outline: none;
}
/* Spinner */
.loading-modal__spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 4px;
  border-radius: 50%;
  border: 5px solid #e6e6e6;
  border-top-color: #0078d4; /* Office blue */
  animation: lm-spin 1s linear infinite;
}
@keyframes lm-spin {
  to { transform: rotate(360deg); }
}
/* Text */
.loading-modal__text {
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #1a1a1a;
}
#mappingAddSection {
  padding: 10px;
  border: 1px solid #e1dfdd00;
  border-radius: 4px;
  background: #333;
  text-align: center;
  display:flow-root;
  color: #fff;
}
#mappingMessage {
  background-color: #fff;
  padding: 10px 0 10px 0;
}
#mappingAddSection.hidden {
  display: none;
}
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .loading-modal__spinner { animation: none; border-top-color: #0078d4; }
}
/* Mapping Results Styles */
.mapping-results-list {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0 0;
}
.mapping-results-list li {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 12px 8px;
  border: 1px solid #e1dfdd;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fff;
}
.mapping-result-content {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  border: 1px solid #e1dfdd;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fff;
}
.mapping-result-info {
  flex: 1;
  font-size: 0.9em;
  line-height: 1.4;
  margin-bottom: 12px;
}
.mapping-result-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}
.mapping-result-actions button {
  padding: 4px 12px;
  font-size: 0.8em;
  min-width: 60px;
  color: #FFF;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.mapping-result-actions button.edit-btn {
  background-color: #001c31;
}
.mapping-result-actions button.delete-btn {
  background-color: #441200;
}
.mapping-result-actions button:hover {
  opacity: 0.8;
}
.inlineBtn {
  display: inline-block;
}
button {
  border-radius: 4px;
  border:1px solid #FFF;
}
#mappingResultsList {
  max-height: 500px;
  overflow-y: auto;
}
#refreshMonthBtn {
  margin-left: 3px;
  background-color: rgba(94, 94, 130, 0.533);
  color:#fff;
}
/* Fixed bottom container for upload tab */
.upload-fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  padding: 15px 8px;
  border-top: 1px solid #e1e1e1;
  z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}
/* Add padding to upload tab to account for fixed bottom */
#tab-upload {
  padding-bottom: 120px;
}
/* Error Data Display Styling */
.error-data-container {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  background-color: #f9f9f9;
  max-height: 400px;
  overflow-y: auto;
}
.error-data-container h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  border-bottom: 1px solid #e1e1e1;
  padding-bottom: 8px;
}
.error-client-group {
  margin-bottom: 20px;
}
.error-client-title {
  background-color: #0078d4;
  color: white;
  padding: 8px 12px;
  margin: 0 0 10px 0;
  border-radius: 3px;
  font-weight: bold;
}
.error-items {
  margin-left: 10px;
}
.error-item {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.error-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}
.error-date {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 4px;
  order: 1;
}
.error-file {
  font-weight: bold;
  color: #333;
  word-break: break-all;
  order: 2;
}
.error-carrier {
  color: #0078d4;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.95em;
}
.error-message {
  color: #a80000;
  background-color: #fff5f5;
  padding: 8px;
  border-radius: 3px;
  border-left: 4px solid #a80000;
  font-size: 0.9em;
  line-height: 1.4;
  word-break: break-word;
}
.inline-checkbox {
  align-items: center;
  width: 15px;
}
.inline-checkbox input {
  margin-right: 6px;
}
.inline-checkbox label {
  display: inline;   /* override any block styling */
}
/* Rebate Modal Styles - similar to loading modal */
.rebate-modal {
  position: fixed;
  inset: 0;
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.rebate-modal[data-open="true"] {
  display: flex;
}
.rebate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.rebate-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  outline: none;
}
.rebate-modal__header {
  padding: 16px 20px;
  border-bottom: 1px solid #e1e1e1;
  background: #f8f8f8;
  border-radius: 8px 8px 0 0;
}
.rebate-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}
.rebate-modal__body {
  padding: 20px;
}
.rebate-modal__message {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}
.rebate-modal__question {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #0078d4;
}
.rebate-modal__footer {
  padding: 12px 20px;
  border-top: 1px solid #e1e1e1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8f8f8;
  border-radius: 0 0 8px 8px;
}
.rebate-modal__btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.rebate-modal__btn--primary {
  background-color: #0f3656;
  color: white;
}
.rebate-modal__btn--primary:hover {
  background-color: #005a9e;
}
.rebate-modal__btn--secondary {
  background-color: #4d4d4d;
  color: white;
}
.rebate-modal__btn--secondary:hover {
  background-color: #343434;
}
