/* ============================
   Seatplan stylesheet (modernized, conservative)
   - Keep class names & behaviors
   - Use CSS vars to avoid repeating sizes across breakpoints
   - Make containers fluid; remove hard-coded widths per breakpoint
   ============================ */


/* Legend + price cubes */
.legend ul { padding-left: 0; }

/* NOTE: This hits ALL .plan_* classes instead of trying "span.plan_" (which doesn’t wildcard) */
span.cube { display: inline-block; height: 18px; width: 18px; margin-bottom: -3px;border-radius: var(--seat-br);  }
span[class^="plan_"] { background: none; border: 1px solid grey; }  /* NEW base for plan_* */
span.plan_red      { background-color: #ff0000; }
span.plan_blue     { background-color: #0000ff; }
span.plan_green    { background-color: #80ff80; }
span.plan_fuchsia  { background-color: #ffc0ff; }
span.plan_yellow   { background-color: #ffff00; }
span.plan_salmon   { background-color: #FA8072; }
span.plan_skyblue  { background-color: #87CEEB; }
span.plan_teal     { background-color: #04aca9; }
span.plan_thistle  { background-color: #D8BFD8; }
span.plan_palegreen{ background-color: #98FB98; }
span.plan_orange   { background-color: #FFA500; }
span.plan_incart   { background-color: #FF00FF; border-color: #808080; }
span.plan_reserved { background-color: #808080; border-color: #808080; }
span.plan_locked   { background-color: #8080C0; border-color: #808080; }
span.plan_own      { background-color: #FFFFFF; border-color: #808080; }

/* Old Opera outline fixes kept as-is (harmless) */
body.opera ul.r li,
body.opera ul.r li.ltr { outline: 0; }

/* Seat color classes (unchanged except minor cleanups) */
ul.r li.bl, ul#ajax_cart li.bl { background-color: #0000ff; }
ul.r li.rd, ul#ajax_cart li.rd { background-color: #ff0000; }
ul.r li.gr                      { background: #80ff80 url('../../images/wheelchair.svg') no-repeat center top; }
ul.r li.or, ul#ajax_cart li.or { background-color: #FFA500; }
ul.r li.fu, ul#ajax_cart li.fu { background-color: #ffc0ff; }
ul.r li.ye, ul#ajax_cart li.ye { background-color: #ffff00; }
ul.r li.sa, ul#ajax_cart li.sa { background-color: #FA8072; }
ul.r li.sb, ul#ajax_cart li.sb { background-color: #87CEEB; }
ul.r li.te, ul#ajax_cart li.te { background-color: #008080; }
ul.r li.th, ul#ajax_cart li.th { background-color: #D8BFD8; }
ul.r li.pg, ul#ajax_cart li.pg { background-color: #98FB98; }

ul.r li.o { color: #000; background-color: #FFF; cursor: default; }
ul.r li.x { color: #FFF; background-color: #808080; cursor: default; }
ul.r li.y { color: #FFF; background-color: #FF00FF; cursor: pointer; }
ul.r li.z { color: #FFF; background-color: #8080C0; cursor: default; }
ul.r li.s:hover { background-color: #000; color: #FFF; }


.colors {
color:white;
text-shadow: 2px 2px #000000;
text-align:center;
border-radius:15px;	
width:50%;
font-size:26px;
}
.color_red{background-color:#ff0000;}
.color_blue{background-color:#0000ff;}
.color_green{background-color:#80ff80;}
.color_fuchsia{background-color:#ffc0ff;}
.color_yellow{background-color:#ffff00;}
.color_salmon{background-color:#FA8072;}
.color_skyblue{background-color:#87CEEB;}
.color_teal{background-color:#04aca9;}
.color_thistle{background-color:#FFA500;}
.color_palegreen{background-color:#98FB98;}
.color_orange{background-color:#98FB98;}


/* Buttons (kept) */
.btn-ga {
  background: blue;
  border: 2px solid #2F312F;
  color: #2F312F !important;
  padding: 5px;
}
.btn-ga:hover {
  background: none !important;
  color: #2F312F !important;
  border: 2px solid #2F312F;
}
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  color: #fff;
  background-color: #555;
}



:root {
  /* Container sizing */
  --stage-max-w: 1100px;
  --stage-max-h: 100px;         /* NEW: min-height avoids text clipping vs max-height */

  --seatplan-min-h: 680px;      /* Keep adjustable via inline CSS if needed */

  /* Seat sizing (desktop defaults) — we’ll only change these per breakpoint */
  --seat-w: 16px;
  --seat-h: 16px;
  --seat-fs: 0px;
  --seat-br: 50%;       /* rounded top corners */
  --seat-q-br: 50%;            /* “q” special */
}

/* ============================
   Stage label
   ============================ */

/* Centered text, fluid width, vertical centering via flex */
/* ---- Stage label: keep your styles, add exact ratio ---- */
#stage_label {
  box-sizing: border-box;
  width: min(100%, var(--stage-max-w));
  /* This line makes the height follow the width using the image’s ratio */
  aspect-ratio: 1100 / 100; /* 17 / 110 also works */

  /* Remove max-height; it prevents responsive scaling */
  /* max-height: var(--stage-max-h);  <-- delete this */

  margin-inline: auto;
  margin-block: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  font-weight: 700;
  line-height: 1.15;
  color: #555;
  /*box-shadow: 0 2px 2px rgba(0, 0, 0, .2);  NEW: unprefixed only */
  /* Your background set from PHP */
  background-repeat: no-repeat;
  background-position: center bottom;

  /* With aspect-ratio, container matches image ratio; either is fine: */
  background-size: 100% 100%; /* or keep 'contain' */

  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;

  outline: 0px solid red; /* debug */
}

/* Your font-size steps can stay exactly as-is */
#stage_label { font-size: 1.25rem; }
@media (min-width: 576px) { #stage_label { font-size: 1.5rem; } }
@media (min-width: 768px) { #stage_label { font-size: 2rem; } }
@media (min-width: 992px) { #stage_label { font-size: 2.5rem; } }
@media (min-width: 1200px){ #stage_label { font-size: 2.875rem; } }


/* ============================
   Seatplan container
   ============================ */



div.seatplan {
	position: relative !important;
	box-sizing: border-box;
	width: min(100%, var(--stage-max-w));  /* NEW: fluid container */
	/*min-height: var(--seatplan-min-h);      You can comment this out if you prefer PHP to control it */
	margin: auto;
	min-height: 0 !important;
	height: auto !important;                  /* ← kills any fixed height */
	aspect-ratio: 1100 / 500 !important;      /* ← sets the box height from width */
	background-repeat: no-repeat;
	background-position: center top;
	background-size: 100% 100% !important;    /* Switch to 'cover' if you prefer cropping on mobile */
	padding: 0 !important;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	outline:0px solid blue;
	background: none;
	
}

/* ============================
   Rows & Seats
   ============================ */

ul.hidden { display: none !important; }

.seatplan li[id^="s"] {
  position: absolute !important;
  margin-top: 0 !important;

  transform-origin:50% 100%;
}


ul.r {
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1;
  /* LEGACY repeated in every breakpoint ⇒ no need anymore */
}

ul.r li {
  position: absolute;       /* was relative */
  margin-top: 0;            /* remove the pull-up */
  transform-origin: top left;
  width: var(--seat-w);                  /* NEW: use variables instead of repeating per breakpoint */
  height: var(--seat-h);
  font-size: var(--seat-fs);
  padding: 0;
  text-align: center;
  border: 1px solid #808080;
  border-radius: var(--seat-br);         /* NEW: no -webkit- prefix needed */
  box-shadow: 0 2px 2px rgba(0, 0, 0, .2); /* NEW: unprefixed only */
  color: #000;
  cursor: pointer;
  z-index: 10;
}

ul.r li.ltr {
  position: absolute; 
  font-weight: bold;
  color: #ffffff;
  outline: 0 solid #c0c0c0;
  background-color: transparent;        /* LEGACY: “none” is invalid for background-color */
  cursor: default;
  border: 0 solid #808080;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .2); /* NEW: unprefixed only */  
  text-shadow: black 2px 2px;
}

/* Before:
ul.r li.q { position: relative; ... }
*/
ul.r li.q {
  position: absolute;       /* keep absolute positioning like other seats */
  font-size: 20px;
  font-weight: bold;
  color: #808080;
  outline: 0px solid #c0c0c0;
  background-color: transparent;
  cursor: default;
  border: 2px solid #808080;
  border-radius: var(--seat-q-br);
  box-shadow: 0 2px 2px rgba(0, 0, 0, .2);
  padding:0;
}


 
@media (max-width: 1200px) {
	:root {
    --seat-w: 16px;
    --seat-h: 16px;
    --seat-fs: 0px;
    --seat-br: 50%; 
    --seat-q-br: 15px;
    }
	/* div.seatplan{width:935px;height:425px;outline:1px solid yellow;}
	ul.r{padding:0px;margin:0px;list-style-type:none;height:0px;}
	ul.r li{position:relative;width:20px;height:20px;font-size:9px;} */
	div.seatplan{outline:0px solid red;}
} 
@media (max-width: 992px) {	
	:root {
    --seat-w: 12px;
    --seat-h: 12px;
    --seat-fs: 0px;
    --seat-br: 50%; 
    --seat-q-br: 10px;
    }
/* 	div.seatplan{width:680px;height:309px;outline:1px solid red;}
	ul.r{padding:0px;margin:0px;list-style-type:none;height:0px;}
	ul.r li{position:relative;width:22px;height:21px;font-size:12px;}
	ul.r li.q{border:2px solid #808080;-webkit-border-radius:10px;border-radius:10px;} */
	div.seatplan{outline:0px solid green;}
}
@media (max-width: 768px) {
	:root {
	--seat-w: 20px;
	--seat-h: 18px;
	--seat-fs: 0px;
	--seat-br: 50%; 
	--seat-q-br: 6px; 
	}
/* 	div.seatplan{width:500px;height:227px;outline:1px solid orange;padding:0px;margin-top:16px}
	ul.r{padding:0px;margin:0px;list-style-type:none;height:0px;}
	ul.r li{position:relative;width:20px;height:18px;font-size:10px;}
	ul.r li.q{border:2px solid #808080;-webkit-border-radius:6px;border-radius:6px;} */
}
/*If you delete a @media here....make sure you also delete the associated @media in the classes/seatplan.php tep_renderSeatplanCSS*/
@media (max-width: 576px) {
  :root {
    --stage-max-w: 250px;   /* now width = min(100%, 250px) */
	--seat-w: 18px;
    --seat-h: 18px;
    --seat-fs: 0px;
    --seat-br: 50%; 
    --seat-q-br: 5px;
  }
	/* div#stage_label{width:250px;}
	div.seatplan{width:250px;} */
}

/* default widths come from :root; override only for pages with columns */
/* clamp seatplan/stage to ~700px whenever this page has side columns */
@media (min-width: 993px) { .seatplan-wrap.has-cols { --stage-max-w: 800px; } }
@media (max-width: 992px) and (min-width: 769px) { .seatplan-wrap.has-cols { --stage-max-w: 500px; } }
@media (max-width: 768px) and (min-width: 577px) { .seatplan-wrap.has-cols { --stage-max-w: 500px; } }
@media (max-width: 576px) { .seatplan-wrap.has-cols { --stage-max-w: 250px; } }




/* Optional: fallback horizontal scrolling if you ever collapse breakpoints too far
.clear { overflow-x: auto; -webkit-overflow-scrolling: touch; } */