/* Slide-out widget ("ślizgacz") for ELMA ROI calculator */

.elma-roi-widget{
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
}

.elma-roi-widget__tab{
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  pointer-events: auto;
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(0,0,0,.14);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  cursor: pointer;
}

.elma-roi-widget__tab:focus{
  outline: 2px solid rgba(0,0,0,.35);
  outline-offset: 2px;
}

.elma-roi-widget__overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.elma-roi-widget__panel{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(440px, 92vw);
  background: #ffffff;
  transform: translateX(100%);
  transition: transform .22s ease;
  pointer-events: auto;
  box-shadow: -12px 0 40px rgba(0,0,0,.16);
  display: flex;
  flex-direction: column;
}

.elma-roi-widget__panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.10);
}

.elma-roi-widget__panel-title{
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
}

.elma-roi-widget__close{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.elma-roi-widget__panel-body{
  padding: 12px 14px 18px;
  overflow: auto;
}

/* When opened */
.elma-roi-widget[data-state="open"] .elma-roi-widget__overlay{
  opacity: 1;
  pointer-events: auto;
}

.elma-roi-widget[data-state="open"] .elma-roi-widget__panel{
  transform: translateX(0);
}

/* Make calculator header a bit more compact inside the widget */
.elma-roi-widget .elma-roi-calc__title{
  font-size: 18px;
}

.elma-roi-widget .elma-roi-calc__subtitle{
  font-size: 13px;
}

/* Mobile: hide the floating tab while panel is open (avoid overlap) */
@media (max-width: 480px){
  .elma-roi-widget[data-state="open"] .elma-roi-widget__tab{ display:none; }
}
