﻿/*
 * Mixpost enterprise customizations
 * Registry ID: MPX-SIDEBAR-001
 *
 * Major switch controlled by MIXPOST_ENTERPRISE_ENABLED.
 * Add future major customizations here.
 */

/* Hide sidebar Create Post row. */
.default-sidebar div.flex.px-xl:has(> a[href*="/posts/create"]),
.default-sidebar .w-full.h-full.flex.flex-col.py-2xl.bg-white.border-r.border-gray-200 > div.flex.px-xl:not(.flex-col) {
  display: none !important;
}

/* Templates index card readability/layout (vendor page, overlay-only) */
body.mixpost-route-templates-index .row-px > .relative.mt-lg > .flex.gap-xs {
  flex-wrap: wrap !important;
  gap: 14px !important;
}

body.mixpost-route-templates-index .row-px > .relative.mt-lg > .flex.gap-xs > .flex.flex-col.gap-xs.grow.basis-0 {
  flex: 0 0 calc(25% - 11px) !important;
  max-width: calc(25% - 11px) !important;
}

@media (max-width: 1600px) {
  body.mixpost-route-templates-index .row-px > .relative.mt-lg > .flex.gap-xs > .flex.flex-col.gap-xs.grow.basis-0 {
    flex: 0 0 calc(33.333% - 10px) !important;
    max-width: calc(33.333% - 10px) !important;
  }
}

@media (max-width: 1200px) {
  body.mixpost-route-templates-index .row-px > .relative.mt-lg > .flex.gap-xs > .flex.flex-col.gap-xs.grow.basis-0 {
    flex: 0 0 calc(50% - 7px) !important;
    max-width: calc(50% - 7px) !important;
  }
}

@media (max-width: 900px) {
  body.mixpost-route-templates-index .row-px > .relative.mt-lg > .flex.gap-xs > .flex.flex-col.gap-xs.grow.basis-0 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

body.mixpost-route-templates-index .group .w-full.font-medium {
  line-height: 1.45 !important;
  font-weight: 600 !important;
  overflow-wrap: anywhere !important;
}

body.mixpost-route-templates-index .group .w-full.font-medium .mpx-template-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.mixpost-route-templates-index .group .w-full.font-medium .mpx-template-title-top {
  font-weight: 700;
  line-height: 1.35;
}

body.mixpost-route-templates-index .group .w-full.font-medium .mpx-template-title-bottom {
  font-weight: 600;
  line-height: 1.35;
  color: #374151;
}

body.mixpost-route-templates-index .group .bg-gray-50 {
  padding: 12px !important;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-structured-wrapper {
  margin: 0;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-structured {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.mixpost-route-templates-index .group .bg-gray-50 .ProseMirror p,
body.mixpost-route-templates-index .group .bg-gray-50 .tiptap p {
  margin: 0 0 8px !important;
  line-height: 1.45 !important;
}

body.mixpost-route-templates-index .group .bg-gray-50 .ProseMirror p:last-child,
body.mixpost-route-templates-index .group .bg-gray-50 .tiptap p:last-child {
  margin-bottom: 0 !important;
}

body.mixpost-route-templates-index .group .bg-gray-50 .ProseMirror ol,
body.mixpost-route-templates-index .group .bg-gray-50 .tiptap ol {
  margin: 0 0 10px !important;
  padding-left: 20px !important;
  line-height: 1.45 !important;
}

body.mixpost-route-templates-index .group .bg-gray-50 .ProseMirror li,
body.mixpost-route-templates-index .group .bg-gray-50 .tiptap li {
  margin-bottom: 4px !important;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-section {
  margin-bottom: 10px;
  border: 1px solid #dbe0ea;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 11px;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-section:last-child {
  margin-bottom: 0;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-label {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-weight: 600;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-elements {
  margin: 0;
  padding-left: 0;
  line-height: 1.45;
  list-style: none;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-elements li {
  margin-bottom: 6px;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-elements li:last-child {
  margin-bottom: 0;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-element-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-element-ref {
  flex: 0 0 auto;
  min-width: 36px;
  border-radius: 9999px;
  background: #eef2ff;
  border: 1px solid #d8defe;
  color: #4f46bb;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  text-align: center;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-element-text {
  flex: 1 1 auto;
  color: #111827;
}

body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-caption,
body.mixpost-route-templates-index .group .bg-gray-50 .mpx-template-comment {
  margin: 0;
  line-height: 1.45;
}

/* Template preview image: always full width and last row of the tile */
body.mixpost-route-templates-index .group .bg-gray-50 > .flex.flex-wrap.gap-xs.mt-xs {
  width: 100%;
  margin-top: 12px !important;
}

body.mixpost-route-templates-index .group .bg-gray-50 > .flex.flex-wrap.gap-xs.mt-xs > div {
  width: 100%;
}

body.mixpost-route-templates-index .group .bg-gray-50 > .flex.flex-wrap.gap-xs.mt-xs figure {
  width: 100%;
}

body.mixpost-route-templates-index .group .bg-gray-50 > .flex.flex-wrap.gap-xs.mt-xs img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: cover;
}
