/* ---------- Vars ---------- */
:root
{
  --accent-bg: #eef2f7;
  --accent-bg-hover: #e5ebf4;
  
  --button-background: #007bff;
  --button-border: #007bff;
  --button-hover-background: #339dff;
  
  /* --button-hover-background: pink; */
  --button-hover-box-shadow-color: #339dff3a;
  --button-hover-color: #fff;
  
  --border-color: #bbb;
  --border-background: #f7f9fb;
  --border-radius: .375rem;
  /* 6px */
  --border-width: 0.09375rem;
  /* 1.5px */
  
  --card-gap: .75rem;
  --card-col1-min: 7.25rem;
  --card-col2-min: 10.75rem;
  
  --control-height: 2.25rem;
  
  --corner: .55rem;
  
  --custom-offset-fields-gap: .75rem;
  
  --custom-input-gap: 1rem;
  --custom-input-max-width: 4rem;
  --custom-input-min-width: 4rem;
  --custom-input-width: 4rem;
  
  --date-max-width: 16rem;
  --date-min-width: 16rem;
  --date-width: 16rem;
  
  --font-stack: "Segoe UI", Arial, sans-serif;
  
  --gap-col: 0.8rem;
  
  --halfpx: .09375rem;

  --left-col: 32.5rem;

  --panel-max-width: 1600px;

  --px1: 0.0625rem;
  --px2: 0.125rem;

  --reset-offset-max-width: 10rem;
  --reset-offset-min-width: 10rem;
  --reset-offset-width: 10rem;

  --set-as-start-date-max-width: 10rem;
  --set-as-start-date-min-width: 10rem;
  --set-as-start-date-width: 6rem;

  --text: #0f2538;

  --offset-right-margin: 1rem;

  /* ---------- Base ---------- */
  *
  {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
}

body
{
  /* background:lightblue; */
  /* padding-left:2rem; */
  /* padding-right:2rem; */
  /* margin-top: 5rem; */
  /* margin-bottom: 5rem; */
  /* max-width: 125rem; */

  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: #f8f9fc;
  color: #2e2e2e;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3
{
  font-weight: 600;
  color: navy;
}

h1,
h2
{
  margin: 0;
}

.header .white
{
  color: white;
}

.header .gold
{
  color: #f4c542;
}

.header .copyright
{
  opacity: 0.7;
}

/* ===== Branding / Header ===== */
.header
{
  align-items: center;
  background: #2a4197;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* background: #002147; */
  color: white;
  display: flex;
  /* Left new to make sticky at top */
  left: 0; 
  justify-content: space-between;
  padding: .75rem 1.25rem;
  /* Position new to make sticky at top */
  position: fixed;
  /* Top new to make sticky at top */
  top: 0;
  /* Width new to make sticky at top */
  width: 100%;
  /* z-index new to make sticky at top */
  z-index: 1000;
}
/* 12px 20px */

.header h1
{
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

.header h1 span
{
  color: #f5c542;
  /* accent gold */
}

.wrapper
{
  background: var(--border-background);
  /* border-radius: var(--border-radius); */
  /* border: var(--border-width) solid var(--border-color); */
  /* max-width: 120rem; */
  /* margin-top is only if using sticky header */
  margin-top: 3.6rem;
  /* Padding is Top Right Bottom Left*/
  padding: 2rem 2rem 2rem 2rem;
}

/* "hot-key styling */
.accesskey-underline
{
  color: inherit;
  display: inline-block;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-underline-position: under;
}

.card
{
  background: white;
  border-radius: .625rem;
  /* Padding is Top Right Bottom Left*/
  padding: 1rem 1.5rem 2rem 1.5rem;
  /* margin-bottom: 1rem; */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.card td
{
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.card td:nth-child(2)
{
  width: 70%;
}

.start-offset-container
{
  margin-bottom: 2rem;
}

.start-date-row-container
{
  /* align-items:flex-end; */
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  margin-top: 1rem;
  /* max-width: 100rem; */
}

.start-date-and-flatpicker-container
{
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  max-width: 21.9rem;
  margin-right: 0;
  gap: 0;
}

/* Be sure the hidden start-date can't be touched and is behind everything */
#start-date-hidden
{
  position: absolute !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

/* ===== INFO MODAL ===== */
#infoModal
{
  padding: 0;
  border: none;
  border-radius: .75rem;
  box-shadow: 0 .25rem 1.25re, m#0003;
  background: white;
  max-width: 31.25rem;
  width: 90vw;
  z-index: 99999;
}

.info-modal-header
{
  background: #2a4197;
  color: white;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 1rem 0;
  /* Remove negative margins so header matches modal width */
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.info-modal-header h1
{
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  /* Lighten "About" text */
  color: #e9eef6;
}

.info-modal-header .gold
{
  color: #f4c542;
}

.info-modal-header .white
{
  color: white;
}

.info-modal-header .copyright
{
  color: white;
  opacity: 0.7;
}

#infoModal::backdrop
{
  background: rgba(0, 0, 0, 0.25);
}

#infoModal h2
{
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
}

#infoModal p
{
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Center the Open User Guide link on the Info page and style it */
.info-user-guide-link
{
  color: #337ab7;
  display: block;
  font-size: 1.15em;
  font-weight: 500;
  margin: 1.5rem auto;
  max-width: 18.75rem;
  text-align: center;
  text-decoration: underline;
}

#info-disclaimer
{
  color:#444;
  display: block;
  font-size:0.97em;
  margin-top:1em;
  text-align: justify !important;
}

.info-contact-link
{
  color: #337ab7;
  text-decoration: underline;
}

#infoModalOK
{
  display: block;
  margin: 0 auto;
  background: #e9eef6;
  border: 1.5px solid #bbb;
  border-radius: 8px;
  padding: 6px 18px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}

#infoModalOK:hover
{
  background: #d0e0f6;
}

/* Insert directly after :root{ ... } block ends, or after your first button style block */

/* Button for Reset Temp Allow All */
#clear-temp-exclusion-btn
{
  background: var(--button-background);
  border: 1px solid var(--button-border);
  border-radius: 8px;
  box-shadow: 0 2px 8px #337ab73a;
  color: #fff;
  cursor: pointer;
  font-size: 1em;
  margin-left: 1em;
  /* Space to the right of Reset Defaults */
  min-width: 210px;
  /* Adjust as needed for your text */
  padding: 0.5em 1.2em;
  transition: background 0.2s;
}

#clear-temp-exclusion-btn:hover
{
  background: var(--button-hover-background);
  color: var(--button-hover-color);
  box-shadow: 0 2px 8px var(--button-hover-box-shadow-color);
}

#clear-temp-exclusion-btn:disabled
{
  opacity: 0.6;
  cursor: not-allowed;
}

/* Style for the note in the popup that comes up if open on an excluded weekend/holiday */
.popup-note
{
  font-size: 0.98em;
  color: #444;
  margin: 12px 0 0 0;
  padding: 0.5em 0;
  background: #f6f8fa;
  border-radius: 6px;
  text-align: left;
}

.popup-btn:hover
{
  background: var(--button-hover-background);
  border: 1px solid var(--button-background);
  color: var(--button-hover-color);
  box-shadow: 0 2px 8px var(--button-hover-box-shadow-color);
}

/* ---------- Start Date and  Offset Date Header Row ---------- */
.dates-header-container
{
  background: white;
  /* background-color: rgb(247, 249, 251); */
  display: flex;
  flex-wrap: wrap;
}

.offset-header-container
{
  /* Gray line that acts as seperator */
  border-top: 1px solid #e0e8ef;
  padding-top: 1rem;
  padding-bottom: .5rem;
}

/* ---------- Offset Date Labels Row ---------- */
.offset-row-container
{
  align-items: flex-end;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 0;
  margin-top: 0rem;
  /* max-width: 100rem; */
}

/* ***** Offset Input and Labels Container ***** */
.offset-inputs-and-labels-container
{
  display: flex;
  flex-wrap: wrap;
  /* max-width: 50rem; */
  /* background-color: coral; */
}

/* **** Offset Input and Labels First 2 (Days & Weeks) Container **** */
.first-two-offsets-container
{
  display: flex;
  flex-wrap: wrap;
  /* background-color: aqua; */
}

/* Days Label and Input Container */
.days-container
{
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

/* Weeks Label and Input Container */
.weeks-container
{
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

/* **** Offset Input and Labels Second 2 (Months & Years) Container **** */
.second-two-offsets-container
{
  display: flex;
  flex-wrap: wrap;
  /* background-color:red; */
}

/* Months Label and Input Container */
.months-container
{
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

/* Years Label and Input Container */
.years-container
{
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

/* *** Input and Label Styling for Individual Items *** */

/* Below are the input's labels themselves*/
.offset-input-labels
{
  align-content: flex-end;
  box-sizing: border-box;
  /* background: lightgreen; */
  color: #3a4a5a;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .25px;
  text-transform: uppercase;
  width: 4rem;
}

/* Below are the inputs */
.offset-date-input
{
  /* background: lightgreen; */
  border: 1px solid gray;
  border-radius: var(--border-radius);
  font: inherit;
  font-size: .9rem;
  margin-right: .5rem;
  padding: .35rem .55rem;
  width: 4rem;
}

/* **** Offset Date Label and Item Container **** */
.offset-date-label-and-item-container
{
  /* background-color: silver; */
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  /* max-width: 30rem; */
  width: clamp(5rem, 17rem, 20rem);
}

/* Offset Date Label is below with other labels */


/* Start Date and Offset Date */
.start-date-and-offset-date
{
  background-color: white;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  /* max-width: 20rem; */
  /* width: clamp(5rem, 17rem, 17rem); */
  min-width: 5rem;
  width: 17.8rem;
  /* width: auto; */
  max-width: 17.8rem;
  /* flex: 0 1 auto */
  overflow: hidden;
  padding: .35rem .5rem;
  text-overflow: ellipsis;
  /* white-space: nowrap; */
}



/* **** Height and Margin-Right for all main items ************************************ */

/* All Input Row Labels */
/* #days-label, #weeks-label, #months-label, #years-label, #offset-date-label */
.offset-input-labels,
#offset-date-label
{
  align-content: flex-end;
  color: #3a4a5a;
  font-weight: 600;
  height: 2rem;
  letter-spacing: .25px;
  padding-left: .5rem;
  text-transform: uppercase;
}

/* TABLES */
.table-container
{
  overflow-x: auto;
}

table
{
  width: 100%;
  border-collapse: collapse;
}

td
{
  padding: .375rem;
  border-bottom: 1px solid #eee;
}

tr.selected
{
  /* background: #337ab7; */
  background: #1d5fd1;
  color: white;
}

tr:hover
{
  background: #a2c3f6db;
}

tr.selected:hover
{
  background: #0173f6;
  /* same as .date-panel-buttons:hover */
  color: white;
}

#days-input,
#weeks-input,
#months-input
{
  margin-right: .5rem;
}

/* ========== BUTTONS ========== */
/* Alternative Info button - black letters on gold background */
.header button
{
  background: #f5c542;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  border-width: var(--1halfpx);
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  transition: background 0.2s ease;
}

.header button:hover
{
  background: #e2b537;
}

/* Alternative - Info button with with letters and dark blue background */
.header button
{
  background: none;
  border: 1px solid white;
  color: white;
  padding: .3125rem .625rem;
  border-radius: .3125rem;
  cursor: pointer;
}

/* **** Start Date Row Buttons and Offset Buttons  (Set as Start Date and Reset Offset) Container **** */
.start-buttons-container,
.offset-buttons-container
{
  align-items: end;
  background-color: white;
  display: flex;
  flex-wrap: wrap;
  /* margin-left: 2rem;       */
  /* margin-right: 1rem; */
  margin-right: 0;
  /* max-width: 20rem; */

}

.start-buttons-container
{
  margin-left: 0;
  margin-right: 0;
}

.offset-buttons-container
{
  /* un-comment out for testing */
  /* background-color: pink; */
  margin-left: .75rem;
  margin-right: 0;
  width: 23rem;
  display: flex;
  justify-content: space-around;
}

/* All Non-Copy Buttons */
.date-panel-buttons
{
  background: #1d5fd1;
  /* background:var(--accent-bg); */
  border: 1.5px solid var(--border-color);
  border-radius: var(--corner);
  color: #fff;
  /* color: purple; */
  /* color:var(--text); */
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  /* flex: 1 1 auto; */
  font-size: .88rem;
  font-weight: 600;
  margin-left: 0;
  margin-right: .5rem;
  min-height: 2rem;
  padding: .5rem .9rem;
  white-space: nowrap;
  width: clamp(2rem, 10rem, 10rem);
}

.date-panel-buttons:hover
{
  /* grayish */
  /* background: #d0d0d0; */
  /* darker blue */
  /* background: #004494; */
  /* lighter blue */
  background: #0173f6;
}

#calendar-button
{
  background: none;
  border: none;
  padding-inline-start: 2;
  /* padding-inline-end: 2; */
  height: 2rem;
  transform: translateY(-.6rem);
  margin-right: .5rem;
}

.calendar-icon
{
  background-color: none;
  font-size: 2.2rem;
  height: 2rem;
}


/* ===== Disable Colors for Date Panel Buttons =====  */
.copy-buttons:disabled,
.date-panel-buttons:disabled
{
  background: #e0e0e0;
  /* light gray background */
  border-color: #cccccc;
  /* medium gray text */
  color: #888888;
  cursor: not-allowed;
  /* keep full opacity for clarity */
  opacity: 1;
}

/* === COPY BUTTONS === */
.copy-buttons
{
  background: #0056b3;
  border: none;
  border-radius: .375rem;
  color: white;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
  padding: .375rem .625rem
}

.copy-buttons-container
{
  display: flex;
  gap: .75rem;
  /* margin-top: .75rem; */
}


.copy-buttons-container .copy-buttons
{
  flex: 1;
  font-size: 0.95rem;
}

.copy-buttons:hover
{
  background: #0173f6;
}

/* === FOOTER === */
.footer
{
  color: #666;
  font-size: 0.85rem;
  padding: .625rem;
  text-align: center;
}

#start-date,
#offset-date
{
  align-items: center;
  box-sizing: border-box;
  display: flex;
  font-size: 1rem;
  height: 2rem;
  padding: .35rem .5rem;
}

/* ==== DATE MOVED TOOLTIP ==== */
.date-moved-tooltip
{
  background: linear-gradient(180deg, #fff 70%, #e3ecff 100%);
  border: 1px solid #337ab7;
  border-radius: 8px;
  box-shadow: 0 2px 8px #337ab73a;
  color: #222;
  font-size: 1.05em;
  max-width: 25rem;
  pointer-events: none;
  position: absolute;
  opacity: 0;
  padding: 12px 18px;
  transition: opacity 0.18s;
  white-space: normal;
  z-index: 99999;
}

.date-moved-tooltip.show
{
  opacity: 1;
}

.date-moved-tooltip::after
{
  border-bottom: 10px solid #fff;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  content: "";
  filter: drop-shadow(0 -2px 2px #337ab73a);
  height: 0;
  left: 24px;
  position: absolute;
  top: -10px;
  width: 0;
}

/* Force number input spinners in WebKit browsers */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button
{
  margin: 0;
  -webkit-appearance: auto;
}

input[type="number"]
{
  margin: 0;
  -webkit-appearance: none;
}

/* Show Flatpickr calendar lower and taller */
.flatpickr-calendar
{
  left: 3.2rem !important;
  /* Move calendar lower */
  top: 12.75rem !important;
}

/* Attempt to Hide Flatpickr calendar arrow for clean border */
/* to get rid of "notches" but didn't work */
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after,
.flatpickr-calendar:before,
.flatpickr-calendar:after
{
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  content: none !important;
  display: none !important;
  height: 0 !important;
  position: static !important;
  width: 0 !important;
}

/* Next 2 hide native number input spinners for Flatpickr year field */
.flatpickr-calendar .numInputWrapper input[type="number"]::-webkit-inner-spin-button,
.flatpickr-calendar .numInputWrapper input[type="number"]::-webkit-outer-spin-button
{
  -webkit-appearance: none;
  margin: 0;
}

.flatpickr-calendar .numInputWrapper input[type="number"]
{
  -moz-appearance: textfield;
}

/* Container for all 4 card */
.date-cards-container
{
  display: grid;
  grid-auto-rows: auto;
  /* Consistent spacing between all items */
  grid-gap: 1.25rem;
  /* Automatically creates columns */
  grid-template-columns: repeat(auto-fit, minmax(25rem, 2fr));
  gap: 4rem;
  justify-content: space-between;
}

/* **** Days & Weeks Cards Container **** */
.days-weeks-container
{
  /* position: absolute; Takes this div out of the flow, so 'justify-content: center' can work on the remaining element */
  /* left: 0; */
  display: flex;
  flex-wrap: wrap;
}

/* **** Months & Years Cards Container Container **** */
.months-years-container
{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Make the first column of date card tables wider */
.date-cards-container table td:first-child
{
  min-width: 7.5rem;
  /* 120px */
  width: 35%;
  /* optional: let it take more space */
}

/* ==== DATE OPTIONS DIALOG STYLES ==== */
/* filepath: /Users/stuart/KC/JudgeCalc/style_flex.css */

.date-options-dialog
{
  background: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  max-width: 56.25rem;
  min-width: 43.75rem;
  padding: 2em;
  width: 80vw;
}

.date-options-dialog::backdrop
{
  background: rgba(0, 0, 0, 0.5);
}

.dialog-content
{
  margin-bottom: 1.5em;
}

.two-column-layout
{
  display: flex;
  gap: 2.5em;
}

.column-left,
.column-right
{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

fieldset
{
  border: none;
  margin: 0 0 1.1em 0;
  padding: 0;
}

legend
{
  font-size: 1.15em;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 0.08em;
  /* much less space */
  padding-bottom: 0;
}

.group-divider-underline
{
  border-bottom: 1px solid #ccc;
  margin: 0.08em 0 0.7em 0;
  width: 100%;
}

#clear-temp-exclusion-btn
{
  margin-right: 1em;
}

label
{
  display: inline;
  margin-bottom: 0.5em;
  vertical-align: middle;
}

input[type="radio"]
{
  margin-right: 0.5em;
  vertical-align: middle;
}

.dialog-buttons
{
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em;
  justify-content: flex-end;
  margin-top: 1.5em;
}

#reset-default-date-options-button
{
  margin-right: 0;
  order: 1;
}

#reset-default-date-options-button:hover
{
  background-color: var(--button-hover-background);
  box-shadow: 0 2px 8px var(--button-hover-box-shadow-color);
  color: var(--button-hover-color);
}

#clear-temp-exclusion-btn
{
  order: 2;
  margin-left: 1em;
  /* space between Reset Defaults and Reset Temp Allow All */
  margin-right: auto;
}

#cancel-button
{
  order: 3;
}

#cancel-button:hover
{
  background-color: #e0e0e0;
  color: #222;
}

#submit-button
{
  order: 4;
}

#submit-button:hover
{
  background-color: var(--button-hover-background);
  color: var(--button-hover-color);
  box-shadow: 0 2px 8px var(--button-hover-box-shadow-color);
}

#reset-default-date-options-button
{
  background-color: #f0f0f0;
  border: 1px solid #bbb;
  border-radius: 6px;
  color: #333;
  cursor: pointer;
  font-size: .92em;
  margin-right: auto;
  min-width: 54px;
  padding: 0.32em .85em;
  transition: background 0.2s, color 0.2s;
}

#reset-default-date-options-button.enabled
{
  background-color: var(--button-background);
  border-color: var(--button-border);
  color: #fff;
}

#reset-default-date-options-button.enabled:hover
{
  background-color: var(--button-hover-background);
  color: var(--button-hover-color);
}

#reset-default-date-options-button:disabled,
#reset-default-date-options-button.disabled
{
  background-color: #e0e0e0;
  border-color: #bbb;
  color: #888;
  cursor: not-allowed;
}

#reset-default-date-options-button:hover
{
  background-color: #e0e0e0;
}

#cancel-button,
#submit-button
{
  border-radius: 6px;
  cursor: pointer;
  font-size: .92em;
  min-width: 54px;
  padding: 0.32em .85em;
}


#cancel-button
{
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: none !important;
  color: #222;
  cursor: pointer;
  outline: none;
  transform: none;
}

#cancel-button:active
{
  background: #ddd;
  border: 1px solid #ccc;
  box-shadow: none !important;
  outline: none;
}

#submit-button
{
  background-color: var(--button-background);
  border: 1px solid var(--button-border);
  color: white;
}

#use-court-days+label
{
  display: inline-block;
  max-width: 16em;
  white-space: normal;
  line-height: 1.2;
  vertical-align: middle;
}

/* ==== END OF DATE OPTIONS DIALOG STYLES ==== */

/* ==== WEEKEND AND HOLIDAY POPUP IF START ON ONE */
#weekendAndHolidayPopup
{
  background: #f9fafc;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  padding: 2.5em 2em;
  min-width: 280px;
  max-width: 420px;
  z-index: 99999;
  border: none;
}

.popup-form
{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-header
{
  font-size: 1.25em;
  font-weight: 600;
  color: #2a4197;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.popup-icon
{
  font-size: 1.5em;
  vertical-align: middle;
}

.popup-msg
{
  font-size: 1.1em;
  margin-bottom: 18px;
  font-weight: 500;
  color: #333;
}

#weekendAndHolidayPopup label
{
  margin-bottom: 0.5em;
  font-size: 1em;
  padding: 0.4em 0.7em;
  border-radius: 6px;
  transition: background 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

#weekendAndHolidayPopup input[type="radio"]
{
  accent-color: #007bff;
  margin-right: 0.5em;
}

#weekendAndHolidayPopup input[type="radio"]:checked+label,
#weekendAndHolidayPopup label:has(input[type="radio"]:checked)
{
  background: #e6f0ff;
  border-radius: 6px;
}

.popup-ok
{
  align-self: flex-end;
  background: var(--button-background);
  border: 1px solid #bbb;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  color: #fff;
  cursor: pointer;
  font-size: 1.1em;
  margin-top: 24px;
  padding: 0.7em 2em;
  transition: background 0.2s;
}

.popup-ok:disabled
{
  background: #e0e0e0;
  color: #888;
  cursor: not-allowed;
}

/* Must make choice for Weekend/Holiday Popup */
#mustChoosePopup
{
  background: #fff8f0;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(217, 83, 79, 0.18);
  padding: 2em 2em;
  min-width: 260px;
  max-width: 380px;
  z-index: 100000;
  border: none;
}

.must-choose-header
{
  font-size: 1.2em;
  color: #d9534f;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.must-choose-icon
{
  font-size: 1.5em;
  vertical-align: middle;
}

.must-choose-msg
{
  font-size: 1.05em;
}

.must-choose-ok
{
  background: #d9534f;
  color: #fff;
  font-size: 1.1em;
  padding: 0.7em 2em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  align-self: flex-end;
}

.must-choose-ok:hover
{
  background: #c9302c;
}

#mustChoosePopup button[type="submit"]
{
  background: #d9534f;
  color: #fff;
  font-size: 1.1em;
  padding: 0.7em 2em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

#mustChoosePopup button[type="submit"]:hover
{
  background: #c9302c;
}

/* Styles exclusion radio button when checked with the weekendAndHolidayPopup*/
.exclusion-radio input[type="radio"]:checked+label,
.exclusion-radio input[type="radio"]:checked
{
  background: #e6f0ff;
  border-radius: 6px;
}


/* ===== FLATPICKR CUSTOM STYLES ===== */

/* Flatpickr calendar background and border */
.flatpickr-calendar
{
  border-radius: 12px !important;
  box-shadow: 0 4px 24px #0003 !important;
  border: 2px solid #337ab7 !important;
  font-family: 'Segoe UI', Arial, sans-serif !important;
  z-index: 99999 !important;
}

/* Month and year backgrounds */
.flatpickr-calendar .flatpickr-months .flatpickr-month,
.flatpickr-calendar .flatpickr-months .flatpickr-month .flatpickr-current-month,
.flatpickr-calendar .flatpickr-months .flatpickr-month .cur-year
{
  background: #e9eef6 !important;
}

.flatpickr-day.holiday-excluded
{
  border: 2px solid #bbb !important;
  border-radius: 50%;
  box-sizing: border-box;
}

/* Day cell styles */
.flatpickr-day
{
  color: #222;
  border-radius: 50%;
  transition: background 0.2s;
  font-size: 1.1em;
  width: 2.8em;
  height: 2.8em;
  line-height: 2.8em;
  margin: 2px;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Hover effect */
.flatpickr-day:hover
{
  background-color: #cceeff !important;
}

/* Today's date */
.flatpickr-day.today
{
  border: 2px solid #007bff !important;
  border-radius: 50%;
}

/* Selected (Start Date) */
.flatpickr-day.selected
{
  background-color: #4ea7ff !important;
  color: white !important;
  box-shadow: 0 2px 8px #4ea7ff3a;
}

/* Disabled/excluded dates */
.flatpickr-day.disabled,
.flatpickr-day.flatpickr-disabled
{
  background: none !important;
  color: #ccc !important;
  pointer-events: none !important;
  opacity: 1 !important;
}

/* Outside current month */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay
{
  color: #bbb !important;
}

/* Always show Flatpickr year spinner arrows */
.flatpickr-calendar .numInputWrapper .arrowUp,
.flatpickr-calendar .numInputWrapper .arrowDown
{
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* Year picker popup styles */
/* Responsive Year Picker Popup */
#yearPopup
{
  align-items: center;
  background: #fff;
  border: 2px solid #337ab7;
  border-radius: 10px;
  box-shadow: 0 4px 24px #0003;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: 1.1em;
  gap: 1.2em;
  justify-content: center;
  max-width: 600px;
  min-width: 0;
  overflow: visible;
  padding: 32px 48px;
  position: absolute;
  text-align: center;
  width: auto;
  z-index: 99999;
}

#yearPopup .year-label
{
  margin-bottom: 12px;
  font-size: 2em;
  background: #fff;
  padding: 2px 12px;
  border-radius: 6px;
  border: none;
  box-shadow: none;
  word-break: break-word;
}

#yearGridTable
{
  width: 100%;
  max-width: 600px;
  min-width: 0;
  table-layout: auto;
}

#yearGridTable td
{
  padding: 8px 16px;
  font-size: 1.2em;
  height: 3em;
  text-align: center;
}

#yearGridTable td span
{
  width: 2.8em;
  height: 2.8em;
  line-height: 2.8em;
  font-size: 1em;
  display: inline-block;
  border-radius: 50%;
  vertical-align: middle;
}

#yearGridTable td.selected span
{
  background: #4ea7ff;
  color: #fff;
  box-shadow: 0 2px 8px #4ea7ff3a;
}

#yearGridTable td .today-year
{
  border: 2px solid #007bff;
  /* match Flatpickr today */
  border-radius: 50%;
  box-sizing: border-box;
}

#yearGridTable td:hover span
{
  background: #cceeff;
}

/* Responsive adjustments for small screens */
@media (max-width: 1100px)
{
  .offset-buttons-container
  {
    width: 20rem;
    /* display: flex; */
    /* justify-content: space-around; */
  }

  #set-as-start-date-button,
  #reset-offset-button
  {
    /* width: 7rem; */
    width: auto;
    padding-left: .25rem;
    padding-right: .25rem;
  }
}

/* iPad: make Reset Temp Allow All bigger */
@media (max-width: 1024px) and (min-width: 768px)
{
  #clear-temp-exclusion-btn
  {
    font-size: 1.1em !important;
    padding: 0.7em 2em !important;
    width: 17rem;
  }
}

.popup-buttons-row
{
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 24px;
}

.popup-btn
{
  background: var(--button-background);
  border: 1px solid var(--button-border);
  border-radius: 8px;
  box-shadow: 0 2px 8px #337ab73a;
  color: #fff;
  cursor: pointer;
  font-size: 1.1em;
  min-width: 120px;
  padding: 10px 24px;
  transition: background 0.2s;
}

.popup-btn:disabled
{
  background: #e0e0e0;
  color: #888;
  cursor: not-allowed;
  opacity: 0.6;
}

@media (max-width: 1029px)
{
  .offset-buttons-container
  {
    flex-basis: 100%;
    justify-content: left;
    margin-left: 0;
    margin-top: 1rem;
    width: 100%;
  }
}

/* Switch Date Options dialog to one column at <= 730px */
@media (max-width: 730px)
{
  .date-options-dialog
  {
    box-sizing: border-box;
    margin-left: 2vw;
    margin-right: 2vw;
    max-width: calc(100vw - 4vw);
    min-width: 0;
    padding: 1.5em 1.2em;
    width: auto;
  }

  .two-column-layout
  {
    flex-direction: column;
    gap: 1.2em;
  }

  .column-left,
  .column-right
  {
    min-width: 0;
    width: 100%;
  }
}

/* ==== Make offset-date tall enough to hold the date once it gets this narrow ==== */
@media (max-width: 715px)
{
  #offset-date
  {
    min-height: 3.5rem;
  }
}

@media (max-width: 700px)
{

  /*  ****************************************** */
  /* Make start and offset button containers stack vertically */
  .start-buttons-container,
  .offset-buttons-container
  {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
    margin-right: 0;
    width: 100%;
  }

  /* Make all buttons fill their row */
  .start-buttons-container>*,
  .offset-buttons-container>*
  {
    display: flex;
    margin-bottom: 0.5rem;
    margin-right: 0;
    width: 100%;
  }

  .start-buttons-container>*:last-child,
  .offset-buttons-container>*:last-child
  {
    margin-bottom: 0;
  }

  .date-panel-buttons
  {
    box-sizing: border-box;
    margin-right: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Allow Start Date and Offset Date to Wrap with room to do so */
  #start-date,
  #offset-date
  {
    /* ensure block layout */
    display: block;
    /* let height grow */
    height: auto;
    /* improve readability */
    line-height: 1.3;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: .7rem .5rem;
    /* allow wrapping */
    text-overflow: ellipsis;
    white-space: normal;
    /* more vertical space for 2 lines */
    width: 100%;
  }

  .start-date-and-flatpicker-container
  {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    min-width: 0;
  }

  .start-date-and-offset-date
  {
    flex: 1 1 0;
    margin-bottom: 0 !important;
    max-width: 100%;
    min-width: 0 !important;
    width: auto !important;
  }

  #calendar-button
  {
    flex: 0 0 auto;
    margin-right: 0.5rem;
  }

  .offset-row-container
  {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .offset-date-label-and-item-container,
  .offset-buttons-container
  {
    max-width: 100%;
    width: 100%;
  }

  .offset-date-label-and-item-container
  {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }

  #offset-date
  {
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    margin-left: .75rem;
    margin-right: 1rem;
    min-width: 0;
    width: 100%;
  }

  .offset-buttons-container
  {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }

  #yearPopup
  {
    font-size: 1em;
    max-width: 98vw;
    min-width: 0;
    overflow-x: auto;
    padding: 1em 0.5em;
    width: 98vw;
  }

  #yearGridTable
  {
    max-width: 100vw;
    min-width: 0;
    overflow-x: auto;
    width: 100vw;
  }

  #yearPopup
  {
    font-size: 1em;
    max-width: 98vw;
    padding: 16px 8px;
  }

  #yearPopup .year-label
  {
    font-size: 1.2em;
    padding: 2px 8px;
  }

  #yearGridTable td
  {
    font-size: 1em;
    height: 2em;
    padding: 4px 6px;
  }

  #yearGridTable td span
  {
    font-size: 0.95em;
    height: 1.6em;
    line-height: 1.6em;
    width: 1.6em;
  }

  .date-cards-container table td:first-child
  {
    min-width: 8rem;
    /* 120px */
    width: 40%;
    /* optional: let it take more space */
  }

}

/* Date Options Tooltip  */

/* Background gradient */
#dateOptionsTooltip
{
  /* background: linear-gradient(180deg, #fff 90%, #f3f7ff 100%); */
  background: linear-gradient(180deg, #fff 70%, #e3ecff 100%);
  border: 1px solid #337ab7;
  border-radius: 8px;
  box-shadow: 0 2px 8px #337ab73a;
  color: #222;
  font-size: 1.05em;
  line-height: 1.7;
  /* Put a bit a space between the lines */
  padding: 12px 18px;
  pointer-events: none;
  position: absolute;
  max-width: 25rem;
  opacity: 0;
  /* transition: opacity 0.18s; */
  transition: opacity 1.5s;
  white-space: normal;
  z-index: 99999;
}

#dateOptionsTooltip.show
{
  opacity: 1;
}

#dateOptionsTooltip::after
{
  border-bottom: 10px solid #fff;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  content: "";
  filter: drop-shadow(0 -2px 2px #337ab73a);
  height: 0;
  left: 24px;
  position: absolute;
  top: -10px;
  width: 0;
}


/* Responsive adjustments for small screens */
@media (max-width: 600px)
{

  .wrapper
  {
    /* border-radius: 10px; */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    max-width: 98vw;
    /* margin-top is only if using sticky header */
    margin-top: 3.85rem;
    padding: .75rem 4vw;
  }

  .dialog-buttons
  {
    align-items: stretch;
    flex-direction: column;
    gap: 0.8em;
  }

  .dialog-buttons-row
  {
    display: flex;
    gap: 0.8em;
    justify-content: stretch;
  }

  #reset-default-date-options-button,
  #clear-temp-exclusion-btn
  {
    font-size: 1em;
    padding: 0.7em 0;
    width: 100%;
  }

  #clear-temp-exclusion-btn
  {
    font-size: 1em;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0.7em 0;
    width: 100%;
  }

  #cancel-button,
  #submit-button
  {
    font-size: 1em;
    padding: 0.7em 0;
    width: 100%;
  }

  #yearPopup
  {
    font-size: 1em;
    max-width: 100vw;
    padding: 1em 0.5em;
  }

  #yearPopup .year-label
  {
    font-size: 1.2em;
    padding: 0.2em 0.5em;
  }

  #yearGridTable td
  {
    font-size: 0.95em;
    height: 2em;
    padding: 0.3em 0.4em;
  }

  #yearGridTable td span
  {
    font-size: 0.95em;
    height: 1.6em;
    line-height: 1.6em;
    width: 1.6em;
  }
}

@media (max-width: 540px)
{
  .start-date-and-flatpicker-container
  {
    align-items: center;
    flex-wrap: wrap;
  }

  .start-date-and-offset-date
  {
    flex: 1 1 0;
    margin-bottom: 1rem !important;
    max-width: 100%;
    min-width: 0 !important;
    width: auto !important;
  }

  #calendar-button
  {
    flex: 0 0 auto;
    margin-right: 0.5rem;
  }

  #offset-date
  {
    min-height: 3.75rem;
  }

}

/* For the Date Options Dialog */
@media (max-width: 500px)
{
  .date-options-dialog
  {
    box-sizing: border-box;
    font-size: 0.95em;
    margin-left: 2vw;
    margin-right: 2vw;
    max-width: calc(100vw - 4vw);
    padding: 1em 0.7em;
    width: auto;
  }

  .two-column-layout
  {
    gap: 0.7em;
  }
}

@media (max-width: 435px)
{

  .copy-buttons-container
  {
    flex-direction: column;
    gap: 0.5rem;
  }

  .copy-buttons-container .copy-buttons
  {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }

}

/* End of File */