/* Base styles */
.szb-wrapper { box-sizing: border-box; }
.szb-slot { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 24px; }
.szb-slot-inner { padding: 24px; }
.szb-reels { display: grid; grid-template-columns: repeat(1, minmax(0,1fr)); gap: 16px; }
@media (min-width: 768px) { .szb-reels { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; } }
.szb-reel { position: relative; min-height: 120px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 20px; background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)); }
.szb-reel-text { font-weight: 600; font-size: 20px; line-height: 1.2; word-break: break-word; transition: transform .15s ease, opacity .15s ease, color .15s ease; display: inline-flex; align-items: center; gap: .5em; }
.szb-reel-text.szb-bounce { transform: scale(1.08); }
.szb-reel-icon i { line-height: 1; display: inline-block; }
.szb-reel-icon .szb-icon-img { display: inline-block; }
.szb-lock { position:absolute; top:8px; right:8px; left:auto; border:none; background:transparent; color:#9ca3af; cursor:pointer; }
.szb-lock.left { left:8px; right:auto; }
.szb-lock.right { right:8px; left:auto; }
.szb-lock[aria-pressed="true"] { color:#f59e0b; }
.szb-result { margin: 24px 0 0; font-size: 18px; }
.szb-buttons { margin-top: 16px; }
.szb-buttons-inner { display: flex; gap: 12px; flex-wrap: wrap; }
.szb-btn { cursor: pointer; border: 1px solid transparent; padding: 10px 16px; border-radius: 10px; font-weight: 600; display: inline-flex; align-items: center; }
.szb-btn .szb-icon { display: inline-flex; }
.szb-btn .szb-icon-left { margin-right: 8px; }
.szb-btn .szb-icon-right { margin-left: 8px; }
.szb-history-wrap { margin-top: 24px; }
.szb-history-heading { font-weight: 600; font-size: 1.125rem; margin-bottom: 12px; }
.szb-history { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.szb-history-item { font-size: 14px; color: #e5e7eb; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 8px 12px; }

/* Alignment helpers */
.szb-buttons-left .szb-buttons-inner { justify-content: flex-start; }
.szb-buttons-center .szb-buttons-inner { justify-content: center; }
.szb-buttons-right .szb-buttons-inner { justify-content: flex-end; }
.szb-buttons-split .szb-buttons-inner { justify-content: space-between; }
.szb-result-left .szb-result { text-align: left; }
.szb-result-center .szb-result { text-align: center; }
.szb-result-right .szb-result { text-align: right; }


/* Ensure icons inside result/history match text size */
.szb-result .szb-text-icon i,
.szb-history .szb-text-icon i { font-size: 1em; line-height: 1; display: inline-block; }
.szb-result .szb-text-icon .szb-icon-img,
.szb-history .szb-text-icon .szb-icon-img { width: 1em; height: 1em; line-height: 1; display: inline-block; }


/* v1.7.40: Share modal & inline preview */
/* Overlay for share image */
.szb-share-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.szb-share-dialog{
  position: relative;
  background: #fff;
  padding: 1.5rem;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.szb-share-preview{
  max-width: 100%;
  max-height: 60vh;
  display: block;
}

.szb-share-actions{
  display: flex;
  justify-content: center;
}

.szb-share-download{
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  box-sizing: border-box;
  background-clip: padding-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.szb-share-download:focus,
.szb-share-download:focus-visible,
.szb-share-download:active{
  outline: none;
}

.szb-share-close{
  position: absolute;
  bottom: .75rem;
  right: .75rem;
  border: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  outline: none;
}

.szb-share-close:focus,
.szb-share-close:focus-visible,
.szb-share-close:active{
  outline: none;
}

.szb-share-system{
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  box-sizing: border-box;
  background-clip: padding-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.szb-share-system:focus,
.szb-share-system:focus-visible,
.szb-share-system:active{
  outline: none;
}

/* Safari/WebKit: reduce jagged border rendering on rounded buttons */
.szb-share-actions .szb-share-download,
.szb-share-actions .szb-share-system{
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* v2.0.12: Share-Popup Override-Layer (conflict-safe)
   Activated by wrapper class .szb-popup-override
   - avoids collisions with legacy controls
   - consumes CSS variables written by Elementor controls
*/
.szb-popup-override .szb-share-dialog{
  border-radius: var(--szb-popup-radius, 16px);
  background: var(--szb-popup-bg, #fff);
}

.szb-popup-override.szb-popup-footer-layout .szb-share-dialog{
  padding: 0 !important;
  gap: 0 !important;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
}

.szb-popup-override.szb-popup-footer-layout .szb-share-preview{
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.szb-popup-override.szb-popup-footer-layout .szb-share-actions{
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--szb-popup-footer-pad-top, 16px) var(--szb-popup-footer-pad-right, 20px) var(--szb-popup-footer-pad-bottom, 16px) var(--szb-popup-footer-pad-left, 20px);
  border-top: 1px solid var(--szb-popup-footer-border-color, rgba(0,0,0,.08));
  background: var(--szb-popup-footer-bg, #fff);
  position: relative;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

/* Harden buttons inside footer (no default outlines/appearance, crisp corners) */
.szb-popup-override .szb-share-actions .szb-share-download,
.szb-popup-override .szb-share-actions .szb-share-system{
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  background-clip: padding-box;
  box-sizing: border-box;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.szb-popup-override .szb-share-actions .szb-share-download:focus,
.szb-popup-override .szb-share-actions .szb-share-download:focus-visible,
.szb-popup-override .szb-share-actions .szb-share-download:active,
.szb-popup-override .szb-share-actions .szb-share-system:focus,
.szb-popup-override .szb-share-actions .szb-share-system:focus-visible,
.szb-popup-override .szb-share-actions .szb-share-system:active{
  outline: none;
}

/* Close button positioning in footer layout (robust offsets) */
.szb-popup-override.szb-popup-footer-layout .szb-share-close{
  position: absolute !important;
  top: auto !important;
  bottom: calc(16px + var(--szb-popup-close-offset-y, 0px)) !important;
  transform: none !important;
}
.szb-popup-override.szb-popup-footer-layout.szb-popup-close-right .szb-share-close{
  left: auto !important;
  right: calc(16px + var(--szb-popup-close-offset-x, 0px)) !important;
}
.szb-popup-override.szb-popup-footer-layout.szb-popup-close-left .szb-share-close{
  right: auto !important;
  left: calc(16px + var(--szb-popup-close-offset-x, 0px)) !important;
}

/* Inline preview in Elementor editor */
.szb-share-inline-preview-wrapper{
  margin-top: 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.szb-share-inline-preview-note{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .7;
}

.szb-share-inline-preview{
  max-width: 100%;
  border-radius: 8px;
  display: block;
}



/* v1.7.46: Ensure reel text does not overlap lock icon */
.szb-reel-text{
  padding-right: 56px;
  padding-left: 32px;
}

@media (min-width: 1024px){
  /* Auf größeren Screens etwas weniger streng, falls nötig */
  .szb-reel-text{
    padding-right: 48px;
    padding-left: 32px;
  }
}


/* v1.7.93: On small screens, only show the system-share button in the popup */
@media (max-width: 767px){
  .szb-share-actions .szb-share-download{
    display: none;
  }
}


/* v1.7.94: On desktop, only show the download button in the popup */
@media (min-width: 768px){
  .szb-share-actions .szb-share-system{
    display: none;
  }
}


/* v1.8.9: Option für 2 Buttons pro Zeile auf Mobile */
@media (max-width: 767px){
  .szb-buttons-mobile-2 .szb-buttons-inner{
    flex-wrap: wrap;
  }
  .szb-buttons-mobile-2 .szb-buttons-inner .szb-btn{
    flex: 0 0 calc(50% - 6px);
    justify-content: center;
  }
}
