/* ==========================================================================
   1. GLOBAL VARIABLE HUB (:root)
   ========================================================================== */
:root {
  /* Jim's Irish Themed Base Colours */
  --clr-mossgreen-bg: hsl(110, 18%, 36%);
  --clr-softcream-bg: hsl(40, 35%, 93%);
  --clr-slategrey-bg: hsl(191, 6%, 38%);
  --clr-mutedgold-bg: hsl(41, 39%, 55%);
  --clr-lightgrey-bg: hsl(191, 5%, 78%);
  --clr-orange-bg: hsl(28, 89%, 57%);

  /* Layout Core & Background Shades */
  --clr-primary-bg: hsl(218, 100%, 96%);
  --clr-secondary-bg: hsl(232, 43%, 13%);
  --clr-tertiary-bg: hsl(217, 100%, 93%);
  --clr-cardbg-bg: hsl(186, 6%, 68%);
  --clr-pink-bg: hsl(275, 63%, 90%);
  --clr-white-bg: hsl(218, 100%, 96%);
  --clr-brightwhite-bg: hsl(218, 100%, 100%);
  --clr-card-bg: hsl(207, 22%, 30%);
  --clr-header-bg: hsl(232, 65%, 11%);
  --clr-textarea-bg: hsl(0, 0%, 100%);
  --clr-display-results-bg: #f3f3f3;
  --clr-cardbody-bg: #f1f1f1;

  /* Data Table Row Background Profiles */
  --clr-tblrow-light-bg: hsl(225, 100%, 99%);
  --clr-tblrow-dark-bg: hsl(41, 39%, 55%);
  --clr-tblheader-bg: hsl(191, 6%, 38%);

  /* System UI Structural Borders & Shadows */
  --clr-border-blk: hsl(0, 0%, 0%);
  --clr-boxshadow-grey: hsla(0, 0%, 0%, 0.24);
  --input-border-radius: 0.25rem;

  /* Interactive Button & Checkbox Components */
  --clr-button-bg: hsl(218, 37%, 63%);
  --clr-button-clk-bg: hsla(204, 29%, 97%, 0.95);
  --clr-button-hover-bg: hsl(0, 0%, 100%);
  --clr-button-active-bg: hsl(210, 74%, 13%);
  --clr-button-input-bg: hsl(110, 18%, 36%);
  --clr-chkbox-active-bg: hsl(213, 100%, 32%);

  /* Navigation Link Coloration Mapping */
  --clr-link-text: hsl(210, 90%, 40%);
  --clr-link-hover: hsl(214, 70%, 29%);
  --clr-link-card-bg: hsl(210, 90%, 40%);
  --clr-link-card-hover: hsl(214, 70%, 29%);
  --clr-link-card-dis: rgba(0, 0, 0, 0.08);
  --clr-card-link-dis-text: rgba(0, 0, 0, 0.3);

  /* Typography Text Contrast Overrides */
  --clr-list-text: hsl(0, 0%, 50%);
  --clr-text-light: hsla(0, 0%, 100%, 0.75);
  --clr-text-dark: hsla(180, 3%, 8%, 100%);
  --clr-text-blue: hsl(213, 100%, 32%);
  --clr-text-white: hsl(220, 0%, 100%);
  --clr-text-pink: hsl(309, 68%, 54%);
  --clr-text-grey: hsl(220, 6%, 40%);
  --clr-text-lightgrey: hsl(0, 0%, 66%);
  --clr-select-opt: hsl(0, 0%, 0%);

  /* Form Layout Grid Calculations */
  --size-1: 30rem;
  --size-gap: 1rem;
  --size-2: calc(var(--size-1) / 2 - var(--size-gap) / 2);

  /* Clamp-Based Dynamic Fluid Typography Hierarchy Scales */
  --fontsize--3: clamp(0.65rem, 0.64rem + 0.02vw, 0.7rem);
  --fontsize--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
  --fontsize--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
  --fontsize-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --fontsize-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
  --fontsize-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
  --fontsize-3: clamp(1.9438rem, 1.7707rem + 0.8652vw, 2.4413rem);
  --fontsize-4: clamp(2.3325rem, 2.0823rem + 1.2511vw, 3.0519rem);
  --fontsize-5: clamp(2.7994rem, 2.4461rem + 1.7663vw, 3.815rem);
}

/* ==========================================================================
   2. DOM STRUCTURE RESETS & TYPOGRAPHY BASELINES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "TASA Explorer", sans-serif;
  font-size: var(--fontsize--1);
  background-color: var(--clr-softcream-bg);
}

p {
  padding-bottom: 1rem;
  padding-left: 1rem;
}

h3 {
  padding-bottom: 0.5rem;
  padding-left: 1rem;
  font-weight: 700;
}

ul {
  margin-left: 0.75rem;
  text-align: left;
}

a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none;
}

.wrapper {
  position: relative;
  transform: none !important;
  margin: 0 auto !important;
  float: none !important;
}

/* ==========================================================================
   3. STRUCTURAL SITE NAVIGATION BAR
   ========================================================================== */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  background-color: var(--clr-slategrey-bg);
  color: var(--clr-text-light);
}

.nav-link {
  padding: 1rem 2rem 1rem 1rem;
  font-size: 1.1rem;
}

.nav-link a:link {
  color: var(--clr-text-light);
}

.nav-link a:visited,
.nav-link a:hover,
.nav-link a:focus {
  color: var(--clr-text-white);
}

/* ==========================================================================
   4. GLOBAL BANNER STYLES (DEFAULT & TABLET VERTICAL STACK)
   ========================================================================== */
.banner {
  display: flex;
  flex-direction: column; /* Default style: Elements stack on top of each other */
  align-items: center; /* Centers everything horizontally */
  text-align: center;
  padding: 2rem 1rem;
  width: 100%;
}

.site-name {
  font-family: "Righteous", serif;
  font-size: var(--fontsize-3);
  font-weight: 500;
  color: var(--clr-mossgreen-bg);
  margin-bottom: 0.5rem;
}

.site-strapline {
  font-size: var(--fontsize-0);
  font-weight: 200;
  line-height: 1.3;
  color: var(--clr-mutedgold-bg);
  margin-bottom: 1.5rem;
}

.banner-image-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.banner-image-wrap img {
  width: 50%;
  max-width: 220px; /* A healthy, larger size for tablets */
  height: auto;
  border-radius: 50%;
  border: var(--clr-border-blk) solid 2px;
}

/* ==========================================================================
   5. UPCOMING EVENTS SCHEDULE MODULE
   ========================================================================== */
.events {
  background-color: var(--clr-mossgreen-bg);
  border-radius: 1rem;
  padding-bottom: 2rem;
}

.events-text {
  width: 100%;
  text-align: center;
  font-size: var(--fontsize-2);
  color: var(--clr-text-light);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.event {
  background-color: var(--clr-mossgreen-bg);
  border-radius: 1rem;
  margin: 1rem 0 0 0;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.event-text-box {
  display: flex;
  flex-direction: column;
  margin: auto;
  width: clamp(15rem, 45rem, 55rem);
}

.event-text-title,
.event-text-info,
.event-date-info {
  color: var(--clr-text-light);
  font-weight: 100;
  white-space: normal;
}

.event-text-title {
  font-size: var(--fontsize-2);
}

.event-text-info,
.event-date-info {
  font-size: var(--fontsize-0);
  line-height: 1.5rem;
  padding-top: 0.75rem;
}

.event-text-info {
  font-size: 0.9rem;
  padding-top: 0;
}

.event-bar {
  width: 100%;
  height: 1px;
  background-color: var(--clr-white-bg);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.event-text-double {
  display: flex;
  justify-content: space-between;
}

.syllabuslink a:link {
  color: var(--clr-text-light);
}

.syllabuslink a:visited,
.syllabuslink a:hover,
.syllabuslink a:focus {
  color: var(--clr-text-white);
}

/* ==========================================================================
   6. CARD PANELS & INTERACTIVE TILES
   ========================================================================== */
.cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-left: 2rem;
  padding-right: 2rem;
}

.card {
  display: grid;
  grid-template-rows: 1fr;
  max-width: 16rem;
  max-height: 18rem;
  border-radius: 1rem;
  padding: 0.5rem;
  background-color: var(--clr-mutedgold-bg);
}

.card-text {
  font-size: var(--fontsize--1);
  font-weight: 100;
  color: var(--clr-text-white);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  margin-left: 1rem;
}

.card-text:last-of-type {
  padding-bottom: 1rem;
}
/* ==========================================================================
   7. INTERACTIVE CARD BUTTONS & ANCHORS
   ========================================================================== */
.card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--clr-mossgreen-bg);
  border: 0;
  border-radius: 2rem;
  color: var(--clr-text-white);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 100;
  line-height: 1rem;
  max-width: 10rem;
  min-height: 2rem;
  min-width: 0px;
  overflow: hidden;
  padding: 0 1rem;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  vertical-align: middle;
  margin-left: 1rem;
  margin-bottom: 1rem;
  transition:
    background-color 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s,
    box-shadow 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s,
    color 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

.card-link:hover,
.card-link:focus,
.card-link:active {
  background-color: var(--clr-slategrey-bg);
  color: var(--clr-softcream-bg);
}

.card-link:disabled {
  background: var(--clr-link-card-dis);
  color: var(--clr-card-link-dis-text);
  cursor: not-allowed;
}

/* ==========================================================================
   8. GLOBAL FORM LAYOUT CONTAINERS
   ========================================================================== */
.form-input {
  display: flex;
  flex-direction: column;
  align-items: start;
  max-width: 50%;
  margin: auto auto 3rem auto;
  padding-top: 3rem;
}

.form-input-comps {
  padding-top: 1rem;
}

.form-input p {
  margin-bottom: 1rem;
}

.form-header {
  font-size: var(--fontsize-2);
  font-weight: 100;
  padding-bottom: 0.5rem;
}

.form-header-smalltext {
  max-width: 65%;
  font-size: var(--fontsize-0);
  font-weight: 100;
  padding-bottom: 0.5rem;
}

label {
  display: block;
  font-size: 1rem;
  font-weight: 300;
  padding-bottom: 0.25rem;
  padding-top: 1.5rem;
}

/* ==========================================================================
   9. CORE FIELD ELEMENTS & STABLE SELECT BOX OVERRIDES
   ========================================================================== */
input,
select,
textarea {
  border: 1px solid var(--clr-border-blk);
  background-color: var(--clr-textarea-bg);
  border-radius: var(--input-border-radius);
  box-sizing: border-box;
}

.input-text,
.input-select-short,
.input-select-long {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem; /* Replaced rigid height constraints with internal padding */
  background-color: var(--clr-brightwhite-bg);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.input-text {
  font-size: clamp(1rem, var(--fontsize--1), 20px);
  width: var(--size-1);
}

.input-select-short {
  width: var(--size-2);
  max-width: 100%;
  height: 2.5rem; /* Maintains a consistent height with input-text fields */
  margin-top: 0.5rem;
}

.input-select-long {
  width: 30rem;
  max-width: 100%;
}

.input-text:hover,
.input-text:focus,
.input-select-short:hover,
.input-select-short:focus,
.input-select-long:hover,
.input-select-long:focus {
  border: 1px solid var(--clr-text-lightgrey);
  outline: none;
}

/* ==========================================================================
   ENFORCED FORM DROPDOWN ARCHITECTURE
   ========================================================================== */
select.input-select-short,
select.input-select-long {
  font-family: "TASA Explorer", sans-serif !important;
  font-size: 16px !important;
  color: var(--clr-text-dark) !important;
  background-color: var(--clr-brightwhite-bg) !important;
  min-height: 1.5rem;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1px solid var(--clr-border-blk);
  border-radius: var(--input-border-radius);
  cursor: pointer;

  /* Forces Chrome to render its own layout arrow engine sharply */
  -webkit-appearance: revert !important;
  appearance: revert !important;
}

/* Explicit contrast rules applied specifically to option elements */
select.input-select-short option,
select.input-select-long option {
  font-family: "TASA Explorer", sans-serif !important;
  font-size: 16px !important;
  color: #000000 !important;
  background-color: #ffffff !important;
}

/* Disabled option state handles styling contrast rules */
select.input-select-short option:disabled,
select.input-select-long option:disabled {
  color: var(--clr-text-lightgrey) !important;
}

.input-double {
  display: flex;
  flex-direction: row;
  align-items: left;
  gap: 1rem;
  width: var(--size-1);
  max-width: 100%;
}

.grid-col {
  display: flex;
  flex-direction: column;
  flex: 1; /* Forces both blocks to take up exactly 50% equal width side-by-side */
}

.grid-col label {
  padding-top: 0.5rem; /* Reduces huge top margins within the dual row columns */
}

/* ==========================================================================
   10. BUTTON CONTROLS & DECORATIVE GLYPHS
   ========================================================================== */
.button-box {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding-left: 5rem;
  padding-right: 5rem;
}

.delete-btn {
  background: none;
  border: none;
  padding: 0;
  color: #0066cc;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.delete-btn:hover {
  color: #003399;
}

.icon-up:before {
  content: "\25B2";
}

.icon-down:before {
  content: "\25BC";
}

.input-button,
.input-button-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--clr-button-input-bg);
  border: 0;
  border-radius: var(--input-border-radius);
  color: var(--clr-text-white);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 100;
  line-height: 1rem;
  min-height: 2.5rem;
  min-width: 0px;
  overflow: hidden;
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding: 1rem 2rem;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  vertical-align: middle;
  transition:
    background-color 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s,
    box-shadow 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s,
    color 0.167s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}
/* ==========================================================================
   11. EXTENDED INTERACTIVE BUTTON STATES
   ========================================================================== */
.input-button-outline {
  background-color: var(--clr-primary-bg);
  border: 1px solid var(--clr-text-blue);
  color: var(--clr-text-blue);
}

.input-button-outline:disabled {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.3);
  cursor: not-allowed;
}

.input-button:hover,
.input-button:focus {
  background-color: var(--clr-slategrey-bg);
  color: var(--clr-text-white);
}

.input-button:active {
  background: var(--clr-button-active-bg);
  color: var(--clr-text-lightgrey);
}

.input-button:disabled {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid var(--clr-border-blk);
  color: rgba(0, 0, 0, 0.3);
  cursor: not-allowed;
}

/* ==========================================================================
   12. CUSTOM SECURITY PRIVACY CHECKBOX HANDLERS
   ========================================================================== */
.input-privacy {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0 !important;
  margin: 0 1rem 0 0;
  background: none;
  border: 2px solid var(--clr-border-blk);
  border-radius: var(--input-border-radius);
  outline: 0;
  line-height: 0;
  vertical-align: text-top;
  cursor: pointer;
  opacity: 0.5;
}

.input-privacy:hover {
  opacity: 1;
}

.input-privacy:checked {
  background-color: var(--clr-chkbox-active-bg);
  opacity: 1;
}

/* Clean GPU-rendered sub-pixel centering for the checkmark */
.input-privacy:before {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 4px;
  height: 10px;
  border: solid var(--clr-tertiary-bg);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 2;
}


/* ==========================================================================
   13. DANCER PROFILE LAYOUT MODULES
   ========================================================================== */
.dancer-info-box {
  display: flex;
  flex-direction: row;
}

.dancer-info {
  flex-basis: 40%;
  display: grid;
  grid-gap: 10px;
  grid-template-columns: 4rem auto;
  grid-template-areas:
    "dancer-info-sidebar dancer-info-name"
    "dancer-info-sidebar dancer-info-yob"
    "dancer-info-sidebar dancer-info-school"
    "dancer-info-sidebar dancer-info-edit";
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.dancer-info-instructions {
  flex-basis: 60%;
  display: grid;
  grid-gap: 10px;
  grid-template-columns: 4rem auto;
  grid-template-areas:
    "dancer-info-sidebar instructions-text"
    "dancer-info-sidebar button-box";
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Explicit Named CSS Grid Area Track Placement Mapping */
.dancer-info-sidebar {
  grid-area: dancer-info-sidebar;
  background-color: var(--clr-text-blue);
  width: 0.1rem;
}

.dancer-info-name {
  grid-area: dancer-info-name;
}
.dancer-info-yob {
  grid-area: dancer-info-yob;
}
.dancer-info-school {
  grid-area: dancer-info-school;
}
.dancer-info-edit {
  grid-area: dancer-info-edit;
}
.dancer-info-remove {
  grid-area: dancer-info-remove;
}
.dancer-info-addcomps {
  grid-area: dancer-info-addcomps;
}
.dancer-info-ct {
  grid-area: dancer-info-ct;
  padding-top: 1rem;
  font-weight: bold;
}

/* Dancer Profile Sub-Link Modifications */
.dancer-info-edit > a {
  color: var(--clr-link-text);
}

.dancer-info-edit > a:hover {
  color: var(--clr-link-hover);
}

.dancer-info-basket {
  display: grid; /* Clean alignment container tracking edge boundary rules */
}

.dancer-info-basket > .dancer-info-school,
.dancer-info-basket > .dancer-info-yob,
.dancer-info-basket > .dancer-info-edit {
  font-size: var(--fontsize--1);
}
/* ==========================================================================
   14. CUSTOM ENTRIES TOGGLE COMPONENTS
   ========================================================================== */
.bold-txt {
  font-weight: bold;
}

input[type="checkbox"].toggle {
  display: none; /* Safely strips native field without layout disruption */
}

input[type="checkbox"].toggle + label {
  display: flex;
}

input[type="checkbox"].toggle + label::before {
  content: "Enter";
  width: 6rem;
  height: 2rem;
  padding-top: 0.5rem; /* Vertically balances inner text alignment */
  margin-right: 0.5rem;
  background-color: var(--clr-mossgreen-bg);
  border-radius: var(--input-border-radius);
  color: var(--clr-text-white);
  text-align: center;
  transition:
    background-color 500ms,
    border-color 500ms;
}

input[type="checkbox"].toggle:checked + label::before {
  content: "Remove";
  background-color: transparent;
  border: solid 1px var(--clr-border-blk);
  color: red;
  font-weight: 300;
}

/* ==========================================================================
   15. ENTER-DANCER.PHP SPECIFIC CUSTOM CHECKBOX MODULES
   ========================================================================== */
.chkbox-wrapper {
  display: flex;
  flex-direction: column;
}

.chkbox-item {
  text-align: left;
}

.chkbox-item input {
  float: right;
}

/* Hide default checkbox inputs cleanly while preserving layout accessibility */
.chkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chkboxlbl {
  position: relative;
  display: block;
  padding-left: 3rem;
  margin-bottom: 1rem;
  font-size: var(--fontsize--1);
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--clr-slategrey-bg);
  border-radius: var(--input-border-radius);
  transform: translateY(-50%);
}

.chkboxlbl input:checked ~ .checkmark {
  background-color: var(--clr-slategrey-bg);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.chkboxlbl input:checked ~ .checkmark:after {
  display: block;
}

/* Custom CSS Drawn Tick-Mark Styling */
.chkboxlbl .checkmark:after {
  left: 8px;
  bottom: 5px;
  width: 6px;
  height: 12px;
  border: solid var(--clr-white-bg);
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

/* ==========================================================================
   16. DATA TABLES CONFIGURATIONS
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
}

caption,
th,
td {
  padding: 0.5rem;
  font-weight: 400;
  background-color: transparent;
}

caption,
th {
  text-align: left;
  color: var(--clr-text-white);
  text-transform: none;
}

th {
  border-bottom: 2px solid var(--clr-border-blk);
}

/* Alternate row styling built using strict selector nesting routes */
.altrows tbody tr:nth-of-type(odd) {
  background-color: var(--clr-tblrow-light-bg);
}

.altrows tbody tr:nth-of-type(even) {
  background-color: var(--clr-tblrow-dark-bg);
}

.altrows thead tr,
.altrows tbody tr:first-of-type {
  background-color: var(--clr-tblrow-light-bg);
}
/* ==========================================================================
   17. NESTED SUB-TABLE ALIGNMENT MODULES
   ========================================================================== */
.subtbl tr {
  background-color: transparent;
}

/* ==========================================================================
   18. CHECKOUT SHOPPING BASKET MODULE SYSTEM
   ========================================================================== */
.basket-header {
  font-size: var(--fontsize-3);
  font-weight: 400;
  color: var(--clr-text-pink);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.basket {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: start; /* Locks down native flex boxes to anchor sticky sideboxes */
  gap: 1rem;
}

.basket-col .event {
  border-radius: 1rem;
  padding: 1rem;
}

.basket-col .event .event-text-box {
  padding-left: 2rem;
}

.dancer-info-basket {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.dancer-info-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
}

.dancer-info-col,
.dancer-info-dbl-col {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  font-size: var(--fontsize--1);
}

.dancer-info-col > a {
  color: var(--clr-link-text);
}

.dancer-info-col > a:hover {
  color: var(--clr-link-hover);
}

/* ==========================================================================
   19. STICKY PAYMENT SIDEBAR MODULE
   ========================================================================== */
.payment-box {
  position: sticky;
  top: 1rem; /* Safely offsets box block calculation calculations from ceiling view */
  font-size: var(--fontsize--1);
  z-index: 10;
}

.tbl-basket {
  font-size: var(--fontsize--2);
}

.td-basket-comp {
  width: 50%;
}

.td-basket-grade,
.td-basket-age,
.td-basket-price {
  width: 14%;
}

.input-privacy + label {
  color: var(--clr-text-grey);
}

/* ==========================================================================
   20. CORPORATE BILLING GRID MODULE (4 COLUMNS)
   ========================================================================== */
.payment-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(7, auto);
  background-color: var(--clr-lightgrey-bg);
  border: 1px solid var(--clr-text-blue);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  color: var(--clr-text-dark); /* Upgraded from non-existent --clr-text-black */
}

.payment-info-item {
  padding-top: 1rem;
}

/* Row 1 Layout Placements: Competitions Fee Base */
.item-a {
  grid-column: 1 / span 3;
  grid-row: 1;
}
.item-b {
  grid-column: 4 / span 1;
  grid-row: 1;
}

/* Row 2 Layout Placements: Pure Admin Baseline Fee */
.item-c {
  grid-column: 1 / span 3;
  grid-row: 2;
}
.item-d {
  grid-column: 4 / span 1;
  grid-row: 2;
}

/* Row 3 Layout Placements: Split Block Entrance Fees */
.item-c2 {
  grid-column: 1 / span 3;
  grid-row: 3;
  padding-top: 1rem;
}
.item-d2 {
  grid-column: 4 / span 1;
  grid-row: 3;
  padding-top: 1rem;
}

/* Row 4 Layout Placements: Calculated Grand Totals Pay Track */
.item-e {
  grid-column: 1 / span 3;
  grid-row: 4;
}
.item-f {
  grid-column: 4 / span 1;
  grid-row: 4;
}

/* Row 5 & 6 Layout Placements: Forms Agreements & Privacy Checklist Modules */
.item-g {
  grid-column: 1 / span 4;
  grid-row: 5;
}
.item-h {
  grid-column: 1 / span 4;
  grid-row: 6;
}
/* ==========================================================================
   21. BILLING INST DETAILS & CONTACT FORMS
   ========================================================================== */
.payment-notes {
  color: var(--clr-text-grey);
  padding: 1rem 0;
}

.payment-inst {
  background-color: var(--clr-pink-bg);
  border: 1px solid var(--clr-text-pink);
  border-radius: 1rem;
  color: var(--clr-text-grey);
  padding: 2rem;
}

.contact-details {
  width: 100%;
  padding-top: 2rem;
}

.contact-details .input-text {
  font-size: var(--fontsize--1);
  width: 100%;
}

.contact-details-title {
  font-size: var(--fontsize-1);
  padding-top: 1rem;
  margin-bottom: 10px;
}

.contact-details-info {
  color: var(--clr-text-grey);
}

.contact-details-item {
  display: flex;
  flex-direction: column;
  width: fit-content;
  padding-top: 1rem;
}

.contact-details-label {
  font-size: var(--fontsize--1);
  padding: 0;
}

/* ==========================================================================
   22. SITE FOOTER SYSTEM
   ========================================================================== */
.footer {
  display: flex;
  justify-content: center;
  gap: 5rem;
  width: 100%;
  min-height: 40px;
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding-top: 5px;
  background-color: var(--clr-slategrey-bg);
  color: var(--clr-text-light);
  font-size: var(--fontsize--1);
  font-weight: 200;
  line-height: 2rem;
}

.footer_link a:link {
  color: var(--clr-text-light);
}

.footer_link a:visited,
.footer_link a:hover,
.footer_link a:focus {
  color: var(--clr-text-white);
}

/* Utility Layout Padding */
.pad-t1 {
  padding-top: 1rem;
}

/* ==========================================================================
   23. NATIVE BROWSER SELECT DROPDOWN OVERRIDES (CHROME FIX)
   ========================================================================== */
select {
  -webkit-appearance: auto;
  appearance: auto; /* Reverts to steady standard browser calculations */
  font-size: 16px; /* Clean 16px baseline layout target */
  font-family: inherit;
}

select option {
  font-size: 16px;
  color: var(--clr-text-dark);
  background-color: var(--clr-brightwhite-bg);
}


/* ==========================================================================
   23A. MODAL DIALOG BOXES & OVERLAY INTERFACE
   ========================================================================== */
/* Modal Context Wrapper */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

/* Open State Trigger */
.modal-overlay.modal-open {
  opacity: 1;
  pointer-events: auto;
}

/* Main Modal Card Container */
.modal-card {
  background-color: #ffffff;
  width: 90%;
  max-width: 440px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.modal-open .modal-card {
  transform: scale(1);
}

/* Inner Sections Layout */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #212529;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #868e96;
  cursor: pointer;
  padding: 0;
}

.modal-close-btn:hover {
  color: #212529;
}

.modal-body {
  padding: 20px;
}

#modalMessage {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #495057;
}

.modal-footer {
  padding: 12px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: flex-end;
}

/* Action Button Interface */
.modal-btn {
  background-color: hsl(28, 89%, 57%);
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.modal-btn:hover {
  background-color: hsl(28, 89%, 47%);
}

.modal-btn-secondary {
    background-color: #e9ecef;
    color: #495057;
    margin-right: 8px;
    transition: background-color 0.15s ease-in-out;
}

.modal-btn-secondary:hover {
    background-color: #dee2e6;
    color: #212529;
}



/* ==========================================================================
   24. RESPONSIVE LAYOUTS - LARGE DESKTOP SYSTEMS
   ========================================================================== */
@media screen and (min-width: 1025px) {
  .wrapper {
    max-width: 1050px;
  }

  /* 1. Arranges Name, Strapline, and Image side-by-side horizontally */
  .banner {
    display: flex;
    flex-direction: row;
    align-items: center; /* Vertically centers all three items along the same middle line */
    justify-content: space-between; /* Spreads them evenly across the desktop width */
    text-align: left; /* Resets text alignment back to the left */
    padding: 2rem 0;
    min-height: 150px;
  }

  /* 2. Text layout sizes and alignments on desktop viewports */
  .site-name {
    font-size: 3.5rem; /* Large title text */
    margin-bottom: 0; /* Clears mobile margin drops */
    flex: 0 0 auto; /* Keeps the name from shrinking */
    padding-right: 1.5rem;
  }

  .site-strapline {
    font-size: 1.5rem; /* Clean desktop balance factor size */
    margin-bottom: 0;
    line-height: 1.3;
    flex: 1 1 auto; /* Lets the text expand naturally across 2 lines */
    max-width: 32rem; /* Sets a boundary limit to maintain exactly 2 lines */
    padding-right: 1.5rem;
  }

  /* 3. Turns the logo image wrapper into a flexible zone 
     that floats centrally in the remaining right layout space */
  .banner-image-wrap {
    display: flex;
    justify-content: center; /* Centrally balances the logo within the right empty void space */
    align-items: center;
    flex: 1 1 auto; /* Directs the box to safely occupy ALL remaining horizontal room */
    width: auto;
  }

  .banner-image-wrap img {
    width: 180px;
    max-width: 180px !important;
  }

  .event {
    padding: 1rem;
  }

  .form-input {
    max-width: 80%;
    margin-left: 25%;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
  }

  .input-select-smltxt {
    width: 18rem;
    font-size: var(--fontsize--1);
    margin: 0;
    padding: 0;
  }

  .setdancebox {
    display: flex;
    flex-direction: column;
  }

  .input-text > label {
    padding-top: 1rem;
    padding-bottom: 0;
  }

  .input-button {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .toggle-label {
    padding: 0;
  }

  .dancer-info-col {
    flex: 1;
  }

  .dancer-info-dbl-col {
    flex: 2;
  }
}
/* ==========================================================================
   25. RESPONSIVE LAYOUTS - MEDIUM TABLETS (Max 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .wrapper {
    max-width: 992px;
  }

  th {
    display: none;
  }

  td {
    display: grid;
    grid-template-columns: 15ch auto;
    padding: 0.5rem 1rem;
  }

  td::before {
    content: attr(data-cell) ": ";
    font-weight: 700;
    text-transform: capitalize;
  }

  .event-text-box {
    width: clamp(15rem, 35rem, 55rem);
  }

  .basket {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
  }
}

/* ==========================================================================
   26. RESPONSIVE LAYOUTS - SMALL TABLETS & IPADS (Max 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
  .wrapper {
    max-width: 768px;
  }

  th {
    display: none;
  }

  td {
    display: grid;
    grid-template-columns: 15ch auto;
    padding: 0.5rem 1rem;
  }

  td::before {
    content: attr(data-cell) ": ";
    font-weight: 700;
    text-transform: capitalize;
  }

  .basket {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    flex: 2;
  }
}

/* ==========================================================================
   27. RESPONSIVE LAYOUTS - SMARTPHONES & MOBILE VIEWS (Max 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {
  .wrapper {
    max-width: 480px;
  }

  th {
    display: none;
  }

  td {
    display: grid;
    grid-template-columns: 15ch auto;
    padding: 0.1rem;
  }

  td::before {
    content: attr(data-cell) ": ";
    font-weight: 700;
    text-transform: capitalize;
  }

  .site-name {
    font-size: 2rem;
    font-weight: 400;
    color: var(--clr-text-pink);
    margin-bottom: 16px;
  }

  .site-strapline {
    font-size: 1.5rem;
    font-weight: 100;
    line-height: 1.2;
    color: var(--clr-text-blue);
  }

  .banner-image-wrap {
    display: none !important;
  }

  .cards {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-right: 1rem;
  }

  .card {
    display: grid;
    grid-template-rows: 1fr;
    max-width: 15rem;
    max-height: 18rem;
    border-radius: 1rem;
    padding: 0.5rem;
    background-color: #3c4e5d;
  }

  .event-text-box {
    display: flex;
    flex-direction: column;
    margin: auto;
    padding-left: 0.5rem;
    width: clamp(15rem, 25rem, 45rem);
  }

  .event-text-double {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
  }

  .input-double {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  #form-choosedancer label {
    font-size: 1rem;
    font-weight: 300;
    margin: 1rem 0 0 0;
    padding: 0;
  }

  .altrows {
    font-size: var(--fontsize--2);
    margin-top: 0;
    margin-left: 0.2rem;
  }

  .dancer-info {
    display: grid;
    grid-gap: 10px;
    grid-template-columns: 2rem auto;
    grid-template-areas:
      "dancer-info-sidebar dancer-info-name"
      "dancer-info-sidebar dancer-info-yob"
      "dancer-info-sidebar dancer-info-school"
      "dancer-info-sidebar dancer-info-edit";
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    margin-left: 1rem;
  }

  /* Safe fluid rendering widths for fields on small device screens */
  .input-select-long,
  .input-select-short,
  .input-text {
    width: 100%;
    max-width: 20rem;
    margin: 0;
    padding: 0.5rem; /* Restored internal padding safety metrics */
  }

  input[type="checkbox"].toggle + label::before {
    width: 4rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    font-size: var(--fontsize--1);
  }

  .form-header {
    font-size: var(--fontsize-0);
    font-weight: 100;
    padding-bottom: 0.5rem;
  }

  .form-input {
    display: flex;
    flex-direction: column;
    align-items: start;
    max-width: 90%;
    margin: auto;
    padding-top: 1rem;
    margin-bottom: 1rem;
  }

  .button-box {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0;
    padding-right: 0;
  }

  .basket {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    flex: 2;
  }

  #form-basket {
    margin: 0;
    padding: 0;
  }

  #form-basket > .input-button-outline {
    width: auto;
    margin: 0.5rem auto;
    padding: 0.5rem;
  }

  .tbl-basket > tbody > tr > td {
    min-width: 35ch;
  }

  .basket-col > .event > .event-text-box > .event-text-title {
    max-width: 15ch;
    white-space: normal;
  }

  .contact-details-item > .input-text {
    width: 15rem;
    font-size: var(--fontsize--2);
  }

  .footer {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
}

/* ==========================================================================
   28. APPLICATION UTILITIES & INTEGRATION HOOKS (STRIPE)
   ========================================================================== */
.hidden {
  display: none;
}

.display_results {
  background-color: var(--clr-display-results-bg);
  padding: 10px;
  border-radius: 6px;
  font-size: 10px;
  max-height: 250px;
  overflow: scroll;
}

/* Account Details Identity Documents Media Handles */
#file_id_front_visual img,
#file_id_back_visual img,
#file_proof_of_address_visual img {
  max-width: 70%;
  max-height: 220px;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Stripe Payment Element Component Fields */
.StripeElement {
  background-color: var(--clr-brightwhite-bg);
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid var(--clr-border-blk);
  box-shadow: 0 1px 3px 0 #575858;
  transition: box-shadow 150ms ease;
}

.StripeElement--focus {
  box-shadow: 0 1px 3px 0 #cfd7df;
}

.StripeElement--invalid {
  border-color: #fa755a;
}

.StripeElement--webkit-autofill {
  background-color: #fefde5 !important;
}

.data_textarea {
  height: 24px;
  width: 130px;
}

.cardbody {
  border-radius: 1rem;
  padding: 1rem;
  background-color: var(--clr-cardbody-bg);
  margin-top: 5px;
  margin-bottom: 5px;
}

.conf-text-box {
  margin-left: auto;
  margin-right: auto;
  width: 50%;
  padding-top: 2rem;
  font-weight: bold;
}
