.store-custom-popup.modal {
  --bs-modal-margin: 0;
}

.store-custom-popup .modal-content {
  overflow: hidden;
}

/* İçeriğe göre: genişlik/yükseklik içerik kadar */
.store-custom-popup__dialog--content {
  width: auto;
  max-width: min(var(--store-popup-max-width, 420px), calc(100vw - 1.5rem));
  margin-left: auto;
  margin-right: auto;
}

.store-custom-popup__dialog--content .modal-content {
  width: auto;
  max-width: 100%;
}

.store-custom-popup__dialog--content .store-custom-popup__body {
  max-height: min(85vh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tam ekran: dört kenardan boşlukla */
.store-custom-popup--size-full.modal {
  align-items: stretch;
  padding: 0;
}

.store-custom-popup__dialog--fullscreen {
  margin: var(--store-popup-inset-top, 0) var(--store-popup-inset-right, 0)
    var(--store-popup-inset-bottom, 0) var(--store-popup-inset-left, 0) !important;
  width: auto;
  max-width: none;
  height: calc(
    100% - var(--store-popup-inset-top, 0) - var(--store-popup-inset-bottom, 0)
  );
  max-height: calc(
    100% - var(--store-popup-inset-top, 0) - var(--store-popup-inset-bottom, 0)
  );
  transform: none !important;
  display: flex;
  flex-direction: column;
}

.store-custom-popup__dialog--fullscreen .modal-content {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--store-popup-radius, 16px);
}

.store-custom-popup__dialog--fullscreen .store-custom-popup__header {
  flex-shrink: 0;
}

.store-custom-popup__dialog--fullscreen .store-custom-popup__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}


.store-popup-blocks__text {
  margin: 0 0 0.75rem;
}

.store-popup-blocks__text:last-child {
  margin-bottom: 0;
}

.store-popup-blocks__heading:last-child {
  margin-bottom: 0.35rem !important;
}

.store-popup-blocks__image-wrap {
  margin: 0 0 0.85rem;
}

.store-popup-blocks__image-link {
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  cursor: pointer;
  text-decoration: none;
}

.store-popup-blocks__image-link:hover .store-popup-blocks__image {
  opacity: 0.92;
}

.store-popup-blocks__image {
  display: inline-block;
  vertical-align: middle;
}

.store-popup-blocks__list {
  margin: 0 0 0.85rem !important;
}

.store-popup-blocks__btn-wrap {
  margin: 0.5rem 0 0;
}

.store-popup-blocks__btn-wrap--left {
  text-align: left;
}

.store-popup-blocks__btn-wrap--center {
  text-align: center;
}

.store-popup-blocks__btn-wrap--right {
  text-align: right;
}

.store-popup-blocks__btn-wrap--stretch .store-popup-blocks__btn {
  display: block;
  width: 100%;
  text-align: center;
}

.store-popup-blocks__btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s ease;
}

.store-popup-blocks__btn:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.store-popup-blocks__btn--primary {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.store-popup-blocks__btn--outline {
  background: transparent;
  border-color: #0f766e;
  color: #0f766e;
}

.store-popup-blocks__btn--link {
  background: transparent;
  border-color: transparent;
  color: #0f766e;
  padding-left: 0;
  padding-right: 0;
}

.store-popup-hub-list {
  margin-top: 0.5rem;
}

/* Story boyutu popup önizleme (hub kart + modal) */
.store-popup-story-preview {
  --store-popup-story-frame-width: 112px;
  --store-popup-story-frame-height: 168px;
  --store-popup-story-ref-width: 280px;
  position: relative;
  flex-shrink: 0;
}

.store-popup-story-preview__screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.store-popup-story-preview__content {
  width: var(--store-popup-story-ref-width);
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.store-popup-story-preview__empty {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: inherit;
  opacity: 0.55;
  text-align: center;
}

.store-popup-story-preview--compact {
  width: var(--store-popup-story-frame-width);
  height: var(--store-popup-story-frame-height);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
  background: #0f172a;
}

.store-popup-story-preview--compact .store-popup-story-preview__scale {
  width: var(--store-popup-story-ref-width);
  transform: scale(calc(var(--store-popup-story-frame-width) / var(--store-popup-story-ref-width)));
  transform-origin: top left;
}

.store-popup-story-preview--compact .store-popup-story-preview__screen {
  box-sizing: border-box;
}

.store-popup-story-preview--compact .store-popup-story-preview__content {
  width: 100%;
  transform: none;
}

.store-popup-story-preview--compact .store-popup-blocks__btn,
.store-popup-story-preview--compact .store-popup-blocks__image-link {
  pointer-events: none;
}

.store-popup-story-preview--modal {
  width: min(var(--store-popup-story-ref-width), calc(100vw - 3rem));
  height: min(calc(var(--store-popup-story-ref-width) * 1.5), 75vh);
  max-height: 75vh;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  background: #0f172a;
}

.store-popup-story-preview--modal .store-popup-story-preview__screen {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: calc(1rem - 3px);
}

.store-popup-story-preview--modal .store-popup-story-preview__content {
  width: var(--store-popup-story-ref-width);
  max-width: 100%;
  margin: 0 auto;
  pointer-events: auto;
  user-select: auto;
}

.store-popup-preview-modal__dialog {
  max-width: min(680px, calc(100vw - 1.5rem));
  margin-left: auto;
  margin-right: auto;
}

.store-popup-preview-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0 0.15rem;
}

.store-popup-preview-modal__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.store-popup-preview-modal__body {
  padding: 0;
}

.store-popup-block-card__head {
  background: #f8fafc;
}

.store-popup-add-toolbar {
  background: #fff;
}
