#stillanothersite-modal .dialog-lightbox-widget-content {
  width: 90vw;
  max-width: 1100px;
  height: 70vh;
  max-height: 720px;
  border-radius: 12px;
  overflow: hidden;
}

#stillanothersite-modal .dialog-lightbox-widget,
#stillanothersite-modal .dialog-widget-content,
#stillanothersite-modal .dialog-lightbox-widget-content,
#stillanothersite-modal .dialog-message {
  height: 100%;
}

#stillanothersite-modal .dialog-widget-content {
  display: flex;
  flex-direction: column;
  background: #f7f8f9;
  border: 1px solid #d5dadd;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

#stillanothersite-modal .dialog-message {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  line-height: 1;
}

.stillanothersite-templates-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
  overflow: hidden;
  background: #ffffff;
  border-radius: 10px;
}

.stillanothersite-templates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e6e8ec;
  background: #ffffff;
}

.stillanothersite-templates-header .elementor-templates-modal__header__logo__title {
  color: #3a3a3a;
}

.stillanothersite-templates-header .elementor-templates-modal__header__logo-area {
  padding-inline-start: 0;
}

.stillanothersite-templates-header .elementor-templates-modal__header__logo__icon-wrapper {
  background: #000000;
  color: #3a3a3a;
}

.stillanothersite-templates-header-logo {
  width: 18px;
  height: 18px;
  display: block;
}

.stillanothersite-templates-header .elementor-templates-modal__header__item {
  cursor: pointer;
}

.stillanothersite-templates-header .elementor-templates-modal__header__close--normal {
  border-inline-start: none;
}

.stillanothersite-templates-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  background: #ffffff;
}

.stillanothersite-templates-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #e6e8ec;
  background: #f8f9fb;
  flex-wrap: wrap;
}

.stillanothersite-templates-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stillanothersite-templates-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stillanothersite-templates-upgrade-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
  white-space: nowrap;
}

.stillanothersite-templates-upgrade-link:hover {
  color: #5b21b6;
  text-decoration: underline;
}

.stillanothersite-templates-upgrade-link i {
  font-size: 11px;
}

.stillanothersite-templates-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.stillanothersite-templates-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.stillanothersite-templates-select {
  height: 32px;
  border-radius: 4px;
  border: 1px solid #d5dadd;
  background: #ffffff;
  padding: 0 28px 0 10px;
  font-size: 12px;
  color: #374151;
}

.stillanothersite-templates-select-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
}

.stillanothersite-templates-select-clear.is-visible {
  display: flex;
}

.stillanothersite-templates-select-clear:hover {
  background: #f3f4f6;
  color: #111827;
}

.stillanothersite-templates-select:disabled {
  color: #9ca3af;
  background: #f3f4f6;
}

.stillanothersite-templates-search {
  position: relative;
}

.stillanothersite-templates-cache-clear {
  height: 30px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #d5dadd;
  background: #ffffff;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  display: none;
}

.stillanothersite-templates-cache-clear.is-visible {
  display: inline-flex;
  align-items: center;
}

.stillanothersite-templates-cache-clear:hover {
  background: #f3f4f6;
}

.stillanothersite-templates-cache-clear.is-loading {
  opacity: 0.6;
  cursor: default;
}

.stillanothersite-templates-search input {
  height: 32px;
  border-radius: 4px;
  border: 1px solid #d5dadd;
  background: #ffffff;
  padding: 0 28px 0 10px;
  font-size: 12px;
  color: #374151;
  min-width: 180px;
}

.stillanothersite-templates-search i {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.stillanothersite-templates-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
  color: #6b7280;
}

.stillanothersite-templates-sidebar {
  flex: 0 0 240px;
  border-right: 1px solid #e6e8ec;
  padding: 16px;
  background: #f8f9fb;
  border-radius: 0;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

.stillanothersite-templates-main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  padding: 16px 20px;
}

.stillanothersite-templates-categories {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: none;
  padding-right: 4px;
}

.stillanothersite-templates-category {
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e6e8ec;
  cursor: pointer;
  font-size: 12px;
  color: #374151;
  transition: all 0.15s ease;
}

.stillanothersite-templates-category.is-active {
  background: #eef2ff;
  color: #1f2937;
  border-color: #c7d2fe;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
}

.stillanothersite-templates-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 20px 20px;
  overflow-y: auto;
  width: 100%;
  align-items: stretch;
}

.stillanothersite-templates-sentinel {
  height: 1px;
  width: 100%;
}

.stillanothersite-template-card {
  display: block;
  width: 100%;
  border: 1px solid #e6e8ec;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  position: relative;
}

.stillanothersite-template-card:hover {
  transform: none;
  border-color: #c7cdd3;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}

.stillanothersite-template-thumb {
  display: block;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 1 / 1;
}

.stillanothersite-template-pro {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stillanothersite-template-pro-icon {
  width: 10px !important;
  height: 10px !important;
  object-fit: contain;
  vertical-align: middle;
}

.stillanothersite-template-insert {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.stillanothersite-template-insert-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.stillanothersite-template-card:hover .stillanothersite-template-insert {
  opacity: 1;
  transform: translateY(0);
}

.stillanothersite-template-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f3f4f6;
  display: block;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.stillanothersite-template-thumb.is-loaded img {
  opacity: 1;
}

.stillanothersite-template-thumb.is-error .stillanothersite-template-thumb-loader {
  opacity: 0;
}

.stillanothersite-template-thumb.is-error::after {
  content: '!';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-weight: 700;
  font-size: 18px;
}

.stillanothersite-template-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-top: 8px;
}

.stillanothersite-template-preview {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e6e8ec;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.stillanothersite-template-preview:hover {
  background: #f3f4f6;
  color: #111827;
}

.stillanothersite-preview {
  max-width: 90vw;
  max-height: 80vh;
  position: relative;
}

.stillanothersite-preview img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}

.stillanothersite-preview-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stillanothersite-preview-close:hover {
  color: #111827;
  background: transparent;
}

.stillanothersite-templates-loading,
.stillanothersite-templates-empty {
  font-size: 12px;
  color: #6b7280;
  padding: 12px 0;
}

.stillanothersite-templates-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50vh;
  width: 100%;
  text-align: center;
  grid-column: 1 / -1;
}

.stillanothersite-templates-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.stillanothersite-templates-empty-message {
  font-size: 13px;
  color: #6b7280;
}

.stillanothersite-templates-empty-arrow {
  display: none;
}

.stillanothersite-templates-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.stillanothersite-templates-loading-more {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 0 24px;
}

.stillanothersite-templates-loading-text {
  font-size: 12px;
  color: #6b7280;
}

.stillanothersite-templates-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: #111827;
  animation: stillanothersite-spin 0.8s linear infinite;
}

@keyframes stillanothersite-spin {
  to {
    transform: rotate(360deg);
  }
}

#elementor-template-library-templates-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 30px 20px;
  color: #6b7280;
  font-size: 14px;
  width: 100%;
  grid-column: 1 / -1;
  justify-self: stretch;
  min-height: 100%;
}

#elementor-template-library-templates-empty .elementor-template-library-blank-icon img {
  width: 80px;
  height: auto;
  display: block;
}

#elementor-template-library-templates-empty .elementor-template-library-blank-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

#elementor-template-library-templates-empty .elementor-template-library-blank-message {
  max-width: 360px;
}

#elementor-template-library-templates-empty .elementor-template-library-blank-footer-link {
  color: #2563eb;
  text-decoration: none;
}

#elementor-template-library-templates-empty .elementor-template-library-blank-footer-link:hover {
  text-decoration: underline;
}

.stillanothersite-templates-button {
  margin-left: 6px;
  padding: 0;
  --e-a-bg-active: #000000;
  background-color: #000000 !important;
  background-image: none !important;
  border: 0;
}

.elementor-add-section-area-button.stillanothersite-templates-button {
  background-color: #000000 !important;
  background-image: none !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.elementor-editor-active .elementor-add-section-area-button.stillanothersite-templates-button {
  background-color: #000000 !important;
  background-image: none !important;
}

.stillanothersite-templates-button svg {
  display: block;
}

.stillanothersite-templates-button-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

#stillanothersite-modal .dialog-lightbox-close-button {
  display: none;
}

#stillanothersite-modal .elementor-templates-modal__header__close--normal {
  box-shadow: none !important;
}

.stillanothersite-templates-header .elementor-templates-modal__header__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  box-shadow: none;
}

.stillanothersite-templates-header .elementor-templates-modal__header__close:hover {
  background: transparent;
  color: #111827;
}

@media (max-width: 960px) {
  #stillanothersite-modal .dialog-lightbox-widget-content {
    width: 95vw;
    height: 80vh;
    border-radius: 14px;
  }

  .stillanothersite-templates-modal {
    flex-direction: column;
  }

  .stillanothersite-templates-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .stillanothersite-templates-body {
    flex-direction: column;
  }

  .stillanothersite-templates-toolbar {
    padding: 12px 14px;
  }

  .stillanothersite-templates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .stillanothersite-templates-grid {
    grid-template-columns: 1fr;
  }
}
.stillanothersite-template-thumb-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  transition: opacity 0.2s ease;
}

.stillanothersite-template-thumb-loader::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  border-top-color: #6b7280;
  animation: stillanothersite-spin 0.8s linear infinite;
}

.stillanothersite-template-thumb.is-loaded .stillanothersite-template-thumb-loader {
  opacity: 0;
  pointer-events: none;
}

@keyframes stillanothersite-spin {
  to {
    transform: rotate(360deg);
  }
}
