.hdrbaf-container {
  position: relative;
  display: inline-block;
}


.hdrbaf-slider {
  position: relative; 
  overflow: hidden;   
  margin-left: -131px;
  width: 850px;
}

.hdrbaf-slider img.alignnone.size-large{
	margin-left: 0px; 
}

/* SDR image at bottom, fills container */
.hdrbaf-sdr {
  display: block;
  width: 100%;
  height: auto;
}

/* Wrapper for HDR overlay, sits on top */
.hdrbaf-hdr-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;  /* clicks go to slider */
}

/* HDR image—full-size, initially half-clipped */
.hdrbaf-hdr {
  /* tell the browser we’ll be animating clip-path */
  will-change: clip-path;
  /* force a new GPU layer */
  transform: translateZ(0);
  /* avoid backface flicker */
  backface-visibility: hidden;

  display: block;
  width: 100%;
  height: auto;
  /* clip-path: inset(top, right, bottom, left) */
  clip-path: inset(0% 50% 0% 0%);           /* hide right 50% */  
  -webkit-clip-path: inset(0% 50% 0% 0%);


}

/* Slider styling */
.hdrbaf-input {
  position: absolute;
  bottom: 10px;
  left: 5px;
  width: calc(100% - 20px);
  appearance: none;
  height: 0px;
  border-radius: 10px;
  outline: none;
  background: rgba(0,0,0,0.5);
}

.hdrbaf-input::-webkit-slider-thumb,
.hdrbaf-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #333;
  cursor: pointer;
}

/* Hide the notice by default */
.hdrbaf-notice {
  display: none;
  text-align: center;
  padding: 0.5em;
  background: #50000080;
  color: #ffe5e5;
  font-size: 1.0em;
  border: 1px solid #ffeeba;
  border-radius: 3px;
  z-index: 20;
  position: relative;
  bottom: 75px;
  left: -28px;
  width:calc(100% + 100px);
}

/* common label style */
.hdrbaf-label {
  position: absolute;
  top: 30px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.5);
  color: #f0f0f080;
  font-size: 1.5vh;
  font-weight: bold;
  border-radius: 3px;
  pointer-events: none;
  z-index: 9;
  opacity: 1;
  transition: opacity 0.3s ease;  /* fade over 300ms */
}

/* top-left label */
.hdrbaf-label-left {
  left: -122px;
}

/* top-right label */
.hdrbaf-label-right {
  right: -184px;
}
/* Hide the old input rail entirely */
.hdrbaf-input {
  display: none;
}

/* The draggable split‐line */
.hdrbaf-split-line {
  position: absolute;
  top: 20px;
  bottom: 30px;
  left: 50%;                /* start at 50% */
  width: 2px;
  background: rgba(255,255,255,0.8);
  /*mix-blend-mode: difference;*/
  cursor: ew-resize;        /* east-west resize cursor */
  z-index: 8;
  pointer-events: all;      /* allow pointer events on the line */
}

/* A round “handle” at the split point for easier grabbing */
.hdrbaf-split-handle {
  position: absolute;
  top: 50%;
  left: -9px;               /* half the handle’s width */
  width: 16px;
  height: 16px;
  background: rgb(200, 200, 200);
  border: 2px solid #eee;
  border-radius: 50%;
  transform: translateY(-50%);
  mix-blend-mode: normal;
  cursor: ew-resize;
  z-index: 9;
}

button.hdrbaf-toggle{
    padding: 5px 15px;
    margin: 5px 15px 5px 10px;
    background: #505050;
    color: #fff;
    border: 1px solid #888;
    border-radius: 10px;
    box-shadow: 1px 1px 20px #202020;
}
button.hdrbaf-toggle:hover{
	background: #606060;
	box-shadow: none;
	border-color: #a0a0a0;
}

/* Lightbox overlay */
#hdrbaf-lightbox-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9999;
}

/* semi-transparent backdrop */
#hdrbaf-lightbox-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
}

/* Lightbox content: 90% of viewport */
#hdrbaf-lightbox-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 97vw;            /* force 90% width */
  max-height: 97vh;           /* force 90% height */
  overflow: hidden;       /* hide scrollbars */
  background: transparent;
  z-index: 10000;
}

/* Override width and margins for lightbox */
#hdrbaf-lightbox-content .hdrbaf-slider{
	width: 100%;
	margin: 0px;
}
/* Override Margins of the buttons for the lightbox */
/* top-left label */
#hdrbaf-lightbox-content .hdrbaf-label-left {
  left: 3%;
}

/* top-right label */
#hdrbaf-lightbox-content .hdrbaf-label-right {
  right: 3%;
}

#hdrbaf-lightbox-content .hdrbaf-split-line {
  top: 0px;
  bottom: 0px;
}


/* close button */
#hdrbaf-lightbox-close {
  position: absolute;
  top: 10px; right: 10px;
  background: #ffffff80;
  border: none;
  font-size: 1.5em;
  line-height: 1;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}
/* Container inside the lightbox: fills parent */
#hdrbaf-lightbox-slider-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Make cloned slider expand to full lightbox */
#hdrbaf-lightbox-slider-container .hdrbaf-container {
  width: 100% !important;
  height: 100% !important;
  overflow: visible;
}

/* And ensure the slider’s images fill height proportionally */
#hdrbaf-lightbox-slider-container .hdrbaf-sdr,
#hdrbaf-lightbox-slider-container .hdrbaf-hdr-wrapper {
  height: 100%;
}
#hdrbaf-lightbox-slider-container .hdrbaf-sdr img,
#hdrbaf-lightbox-slider-container .hdrbaf-hdr-wrapper .hdrbaf-hdr {
  height: 100%;
  width: auto;
  object-fit: contain;
}

#hdrbaf-lightbox-slider-container .hdrbaf-notice {
  left: -1px;
  width:calc(100% - 14px);
}


/** small screens */
@media (max-width: 900px) {
	.hdrbaf-slider {
		margin-left: -20px;
    	width: calc(100% + 40px);
    	margin-right: -20px;
	}
	.hdrbaf-slider img.alignnone.size-large{
		max-width: 100% !important; 
	}
	/* both labels */
	.hdrbaf-label {
		font-size: 1em;
	}
	/* top-left label */
	.hdrbaf-label-left {
		left: 0px;
	}

	/* top-right label */
	.hdrbaf-label-right {
		right: 0px;
	}
	.hdrbaf-notice{
		font-size: 1.0em;
		bottom: 90px;
		left: 0px;
		width: calc(100% - 30px);
	}
}