.insert-slot {
  min-height: 160px;
  margin: 8px 0;
  clear: both;
}

@media (max-width: 767px) {
  .insert-slot {
    min-height: 120px;
  }
}
#wpdcom .wpd-comment-text {
    word-break: normal !important;
}
.wmu-upload-wrap .wmu-add::after {
    font-size: 16px;
    margin-left: 6px;
    color: #555;
    cursor: pointer;
    vertical-align: middle;
}
html[lang^="en"] .wmu-upload-wrap .wmu-add::after {
    content: " Add photo";
}

html[lang^="pl"] .wmu-upload-wrap .wmu-add::after {
    content: " Dodaj zdjęcie";
}

/* ========================================================
   SHARED CARD STYLES
======================================================== */

.kadence-posts-list .entry-list-item,
.sp-kadence-archive-shortcode .entry-list-item {
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.kadence-posts-list .entry-header,
.sp-kadence-archive-shortcode .entry-header {
    display: flex;
    min-height: 5.5rem;
    margin-bottom: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-left: 7px;
    padding-right: 7px;
}

.entry.loop-entry .post-thumbnail {
    margin-bottom: 0 !important;
}

.kadence-posts-list .entry-header .entry-title,
.sp-kadence-archive-shortcode .entry-header .entry-title {
    font-size: 1.25rem;
}

.kadence-posts-list .entry-header .entry-title a,
.sp-kadence-archive-shortcode .entry-header .entry-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.loop-entry .entry-content-wrap {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.loop-entry .entry-content-wrap .entry-header {
    order: 2;
}

.loop-entry .entry-content-wrap .post-thumbnail {
    order: 1;
    margin-bottom: 0;
    overflow: hidden;
}

.post-thumbnail {
    position: relative;
}

/* ========================================================
   BADGES
======================================================== */

.sp-badge {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.sp-badge-time {
    top: 10px;
    left: 10px;
    padding: 6px 10px;
    background: #734060;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.sp-badge-difficulty {
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    min-width: 28px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(115, 64, 96, 0.16);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.sp-difficulty-bars {
    display: inline-flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    height: 14px;
    white-space: nowrap;
}

.sp-difficulty-bars .sp-bar {
    display: block;
    width: 4px;
    flex: 0 0 4px;
    border-radius: 999px;
    background: rgba(115, 64, 96, 0.22);
}

.sp-difficulty-bars .sp-bar + .sp-bar {
    margin-left: 3px;
}

.sp-difficulty-bars .sp-bar:nth-child(1) {
    height: 6px;
}

.sp-difficulty-bars .sp-bar:nth-child(2) {
    height: 10px;
}

.sp-difficulty-bars .sp-bar:nth-child(3) {
    height: 14px;
}

.sp-difficulty-bars .sp-bar.sp-active {
    background: #734060;
}

/* ========================================================
   IMAGE HOVER
======================================================== */

.post-thumbnail img {
    transform: scale(1);
    transition: transform 0.4s ease;
}

.loop-entry:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* ========================================================
   CAROUSEL ONLY
======================================================== */

.sp-recipes-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 15px!important;
    padding-left: 4px;
    padding-right: 4px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(115, 64, 96, 0.35) transparent;
}

.sp-recipes-carousel > * {
    min-width: 0;
    scroll-snap-align: start;
}

.sp-recipes-carousel::-webkit-scrollbar {
    height: 8px;
}

.sp-recipes-carousel::-webkit-scrollbar-thumb {
    background: rgba(115, 64, 96, 0.35);
    border-radius: 999px;
}

.sp-recipes-carousel-wrap {
    position: relative;
}

/* fade edges */
.sp-recipes-carousel-wrap::before,
.sp-recipes-carousel-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 12px;
    width: 10px;
    z-index: 15;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sp-recipes-carousel-wrap::before {
    left: 0;
    background: linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.sp-recipes-carousel-wrap::after {
    right: 0;
    background: linear-gradient(to left, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.sp-recipes-carousel-wrap.is-at-start::before {
    opacity: 0;
}

.sp-recipes-carousel-wrap.is-at-end::after {
    opacity: 0;
}

/* arrows */
.sp-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #734060;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sp-carousel-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.sp-carousel-arrow-prev {
    left: -10px;
}

.sp-carousel-arrow-next {
    right: -10px;
}

.sp-carousel-arrow span {
    font-size: 28px;
    line-height: 1;
    margin-top: -2px;
}

/* ========================================================
   ORDER ONLY FOR GRID, NOT CAROUSEL
======================================================== */

.kadence-posts-list:not(.sp-recipes-carousel) .entry-content-wrap,
.sp-recipes-grid .entry-content-wrap {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.kadence-posts-list:not(.sp-recipes-carousel) .entry-content-wrap .entry-header,
.sp-recipes-grid .entry-content-wrap .entry-header {
    order: 2;
}

.kadence-posts-list:not(.sp-recipes-carousel) .entry-content-wrap .post-thumbnail,
.sp-recipes-grid .entry-content-wrap .post-thumbnail {
    order: 1;
    margin-bottom: 0;
    overflow: hidden;
}

/* ========================================================
   MOBILE GRID ONLY (KADENCE GRID + SHORTCODE GRID)
   EXCLUDES CAROUSEL
======================================================== */

@media (max-width: 767px) {

  .kadence-posts-list:not(.sp-recipes-carousel),
  .sp-recipes-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .entry-list-item,
  .sp-recipes-grid .entry-list-item {
    width: 100% !important;
    margin: 0 !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .entry-header,
  .sp-recipes-grid .entry-header {
    min-height: 64px;
    padding: 8px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .entry-header .entry-title,
  .sp-recipes-grid .entry-header .entry-title {
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .entry-header .entry-title a,
  .sp-recipes-grid .entry-header .entry-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-badge-time,
  .sp-recipes-grid .sp-badge-time {
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-badge-difficulty,
  .sp-recipes-grid .sp-badge-difficulty {
    top: 8px;
    right: 8px;
    padding: 6px 8px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-difficulty-bars,
  .sp-recipes-grid .sp-difficulty-bars {
    height: 12px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-difficulty-bars .sp-bar,
  .sp-recipes-grid .sp-difficulty-bars .sp-bar {
    width: 3px;
    flex: 0 0 3px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-difficulty-bars .sp-bar + .sp-bar,
  .sp-recipes-grid .sp-difficulty-bars .sp-bar + .sp-bar {
    margin-left: 2px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-difficulty-bars .sp-bar:nth-child(1),
  .sp-recipes-grid .sp-difficulty-bars .sp-bar:nth-child(1) {
    height: 5px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-difficulty-bars .sp-bar:nth-child(2),
  .sp-recipes-grid .sp-difficulty-bars .sp-bar:nth-child(2) {
    height: 8px;
  }

  .kadence-posts-list:not(.sp-recipes-carousel) .sp-difficulty-bars .sp-bar:nth-child(3),
  .sp-recipes-grid .sp-difficulty-bars .sp-bar:nth-child(3) {
    height: 12px;
  }
}