/* ============================
   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: #fa9c9f; }
span.plan_blue     { background-color: #c0ffff; }
span.plan_green    { background-color: #80ff80; }
span.plan_fuchsia  { background-color: #ffc0ff; }
span.plan_yellow   { background-color: #ffffc0; }
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: #C0FFFF; }
ul.r li.rd, ul#ajax_cart li.rd { background-color: #FFC0C0; }
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: #FFFFC0; }
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; }




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

  --seatplan-min-h: 500px;      /* Keep adjustable via inline CSS if needed */
  --seatplan-pd: 0 0 30px 0;
  /* Seat sizing (desktop defaults) — we’ll only change these per breakpoint */
  --seat-w: 18px;
  --seat-h: 16px;
  --seat-rh: 24px;
  --seat-fs: 9px;
  --seat-br: 5px 5px 0 0;       /* rounded top corners */
}

/* ============================
   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: var(--stage-max-w);
  /* height: var(--stage-max-h); */
  width: min(100%, var(--stage-max-w));
  aspect-ratio: 98 / 17;   /* height auto-scales from width */
  /* optional: cap the height if you want */
  max-height: 170px;        /* or var(--stage-max-h) */
  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: #808080;

  /* 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 {

	box-sizing: border-box;
	width: var(--stage-max-w);
	margin-left:auto !important;
	margin-right:auto !important;
	margin-top:10px;
	padding-bottom:30px;
	/*min-height: var(--seatplan-min-h);      
	/*min-height: 0 !important;
	height: auto !important;                  
	aspect-ratio: 1100 / 500 !important; */
	background:url('../../bg.webp') no-repeat center top;	
	background-size: 100% 100% !important;   
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	outline:0px solid blue;
} 

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

ul.hidden { display: none !important; }

ul.r {
  padding: 0;
  margin: 0;
  list-style: none;
  height:var(--seat-rh);
  z-index: 1;
}

ul.r li {
  float:left;    
  margin-left:0px;
  margin-right:0px;     
  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 {
  font-weight: bold;
  color: #ff0000;
  margin: 0 2px;
  outline: 0 solid #c0c0c0;
  background-color: transparent;        /* LEGACY: “none” is invalid for background-color */
  cursor: default;
  border: 0 solid #808080;
  box-shadow: none;                      /* LEGACY: was -webkit-box-shadow + box-shadow */
}

ul.r li.b{
	background:none repeat scroll 0 0 transparent;
	cursor:default;
	outline:0px solid transparent;
	border:0px solid #808080;
	box-shadow:none ;
	}
	
ul.r li.c{
	background:none repeat scroll 0 0 transparent;
	cursor:default;
	outline:0px solid transparent;
	border:0px solid #808080;
	box-shadow:none ;
	}
	
ul.r li.h{
	width:9px;
	background:none repeat scroll 0 0 transparent;
	outline:0px solid transparent;
	cursor:default;
	border:0px solid #808080;
	box-shadow:none ;
	}
	
ul.r li.sd{
	background:#ccc;
	cursor:default;
	outline:0px solid transparent;
	border:0px solid #808080;
	box-shadow:none;
	}
	
#gap{height:60px;}
 
@media (max-width: 1200px) {
	:root {
    --stage-max-w: 926px;
	--seatplan-pd: 0 0 30px 0;
	--seat-w: 17px;
    --seat-h: 16px;
    --seat-fs: 8px;
	--seat-rh: 19px;
    --seat-br: 5px 5px 0 0;
    }
	
ul.r li.ltr {
  margin: 0 2px;
}
	
ul.r li.h{
	width:10px;
	}
	
ul.r li.sd{
	background:#ccc;
	}
	
#gap{height:55px;}
	
div.seatplan{outline:0px solid red;}

} 

@media (max-width: 992px) {
	:root {
	--stage-max-w: 730px;
	--seatplan-pd: 0 0 20px 0;
	--seat-w: 13.5px;
	--seat-h: 12px;
	--seat-fs: 7px;
	--seat-rh: 17px;
	--seat-br: 4px 4px 0 0;

	}

#stage_label {

  width: 730px;
  
}
	
ul.r li.ltr {
  margin: 0;
}
	
ul.r li.h{
	width:10px;
	}
	
ul.r li.sd{
	background:#ccc;
	}

#gap{height:50px;}

div.seatplan{outline:0px solid blue;}
}

@media (max-width: 768px) {
	:root {
	--stage-max-w: 488px;
	--seatplan-pd: 0 0 20px 0;
	--seat-w: 9px;
	--seat-h: 9px;
	--seat-rh: 16px;
	--seat-fs: 4px;
	--seat-br: 50%;

	}
	
#stage_label {

  width: 488px;
  
}	
	
ul.r li.ltr {
  margin: 0;
}
	
ul.r li.h{
	width:10px;
	}
	
ul.r li.sd{
	background:#ccc;
	}
	
#gap{height:40px;}

div.seatplan{outline:0px solid green;}

}
/*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;   
	--seat-w: 9px;
    --seat-h: 9px;
    --seat-fs: 5px;
    --seat-br: 2px 2px 0 0;
  } */
	/* 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; } }


@media (max-width: 767px) {
	.clear {overflow-x: scroll;-webkit-overflow-scrolling: touch;}
}
@media (max-width: 575px) {
	.clear {overflow-x: scroll;-webkit-overflow-scrolling: touch;}
} 

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

