/* Shell */
.dcms-placed-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.dcms-no-members {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.05rem;
}
.dcms-no-members i {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

/* Toolbar */
.dcms-placed-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  gap:12px;
}
.dcms-placed-toolbar__fill{
  flex:1 1 auto;
}

/* Toggle pill */
.dcms-view-toggle{
  display:inline-flex;
  gap:8px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:4px;
  background:#fff;
}
.dcms-view-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:34px;
  border:0;
  background:transparent;
  cursor:pointer;
  border-radius:8px;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease;
  color:#34495e;
}
.dcms-view-btn:hover{
  background:#f3f4f6;
}
.dcms-view-btn.is-active{
  background:#eef2ff;
  color:#6B2528;
  box-shadow: inset 0 0 0 1px #c7d2fe;
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}

/* Grid */
.dcms-placed-grid{
  --dcms-cols: 4;
  display:grid;
  grid-template-columns: repeat(var(--dcms-cols), minmax(0, 1fr));
  gap: 22px;
}

/* Card */
.dcms-placed-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease;
}
.dcms-placed-card:hover{
  transform: translateY(-2px);
  box-shadow:0 8px 22px rgba(0,0,0,.12);
}

/* Hidden state for pagination */
.dcms-placed-card.is-hidden{
  display:none;
}

/* Card image – strict 3:4 for card view */
.dcms-placed-image{
  position:relative;
  display:block;
  background:#f3f4f6;
  aspect-ratio: 3 / 4;   /* width : height => 3:4 */
}
.dcms-placed-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Badge (top-right) */
.dcms-badge{
  position:absolute;
  right:8px;
  top:8px;
  z-index:2;
  width:42px;
  height:42px;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  border:1px solid #e2e8f0;
  display:grid;
  place-items:center;
  box-shadow:0 1px 6px rgba(0,0,0,.10);
}
.dcms-badge img{
  max-width:100%;
  max-height:100%;
  display:block;
}

/* Name (hidden in Card view) */
.is-card .dcms-placed-name{
  display:none;
}

/* ===== List view ===== */
.is-list .dcms-placed-grid{
  grid-template-columns: 1fr;
  gap:14px;
}
.is-list .dcms-placed-card{
  display:flex;
  align-items:center;
  gap:16px;
  padding:12px 14px;
  border-radius:14px;
}
.is-list .dcms-placed-image{
  flex:0 0 160px;
  aspect-ratio:auto;   /* normal image behaviour in list view */
  height:110px;
  border-radius:10px;
  overflow:hidden;
}
.is-list .dcms-placed-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.is-list .dcms-placed-name{
  display:block;
  font-weight:700;
  letter-spacing:.3px;
  color:#2c3e50;
  text-transform:uppercase;
}

/* Badge slightly smaller in list */
.is-list .dcms-badge{
  width:32px;
  height:32px;
  right:6px;
  top:6px;
  border-radius:8px;
}

/* Responsive columns (Card view) */
@media (max-width: 1200px){
  .dcms-placed-grid{ --dcms-cols: 3; }
}
@media (max-width: 992px){
  .dcms-placed-grid{ --dcms-cols: 2; }
}
@media (max-width: 560px){
  .dcms-placed-grid{ --dcms-cols: 1; }
  .dcms-badge{ width:32px; height:32px; }
}

/* Floating toolbar aligned with content */
.dcms-placed-toolbar{
  position: absolute;
  right: 8px;
  top: -44px;   /* keeps grid aligned with left menu header */
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  z-index: 5;
}

/* View more button */
.dcms-placed-more{
  margin-top: 20px;
  text-align: center;
}
.dcms-view-more{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 22px;
  border-radius:999px;
  border:1px solid #6B2528;
  background:#6B2528;
  color:#fff;
  font-weight:600;
  font-size:0.95rem;
  letter-spacing:.02em;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.dcms-view-more:hover{
  background:#8b3034;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  transform: translateY(-1px);
}
.dcms-view-more:disabled,
.dcms-view-more[disabled]{
  opacity:.6;
  cursor:default;
  box-shadow:none;
  transform:none;
}
