.print-poster-tool-page {
  background: #f3f4f6;
}

.print-poster-tool {
  margin-bottom: 2rem;
}

/* Columna config: por encima del preview si algo se solapa */
.print-poster-tool__panel {
  position: relative;
  z-index: 20;
}

@media (min-width: 992px) {
  .print-poster-tool__panel {
    position: sticky;
    top: 1rem;
  }
}

.print-poster-tool__panel .card {
  border-radius: var(--theme-border-radius-2, 12px);
}

.print-poster-tool__field-select {
  position: relative;
  z-index: 30;
}

/* Panel colapsable: tamaño, orientación, plantilla */
.print-poster-tool__config-collapse {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--theme-border-radius-1, 10px);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.print-poster-tool__config-toggle {
  align-items: center;
  background: #f9fafb;
  border: 0;
  border-radius: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  text-align: left;
  width: 100%;
}

.print-poster-tool__config-collapse:not(.is-collapsed) .print-poster-tool__config-toggle {
  border-bottom: 1px solid #e5e7eb;
}

.print-poster-tool__config-toggle:hover {
  background: #f3f4f6;
}

.print-poster-tool__config-toggle-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.print-poster-tool__config-toggle-title {
  margin-bottom: 0;
}

.print-poster-tool__config-summary {
  color: #4b5563;
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.print-poster-tool__config-collapse.is-collapsed .print-poster-tool__config-toggle-title {
  display: none;
}

.print-poster-tool__config-collapse:not(.is-collapsed) .print-poster-tool__config-summary {
  display: none !important;
}

.print-poster-tool__config-chevron {
  color: #6b7280;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.print-poster-tool__config-collapse.is-collapsed .print-poster-tool__config-chevron {
  transform: rotate(-90deg);
}

.print-poster-tool__config-body {
  background: #fafbfc;
  padding: 0.55rem 0.65rem 0.65rem;
}

.print-poster-tool__config-collapse.is-collapsed .print-poster-tool__config-body {
  display: none;
}

.print-poster-tool__config-body .print-poster-tool__config-block:last-child {
  margin-bottom: 0 !important;
}

@media (min-width: 992px) {
  .print-poster-tool__config-toggle {
    display: none;
  }

  .print-poster-tool__config-collapse {
    background: transparent;
    border: 0;
    margin-bottom: 0;
    overflow: visible;
  }

  .print-poster-tool__config-body {
    background: transparent;
    display: block !important;
    padding: 0;
  }
}

.print-poster-tool__intro {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.print-poster-tool__section-title {
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.print-poster-tool__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Tamaño y orientación en una fila */
.print-poster-tool__options--inline {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

.print-poster-tool__options--inline .print-poster-tool__option {
  align-items: center;
  flex: 1 1 0;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.55rem 0.35rem;
  text-align: center;
}

.print-poster-tool__options--inline .form-check-input {
  float: none;
  margin: 0;
}

.print-poster-tool__options--inline .print-poster-tool__option-body {
  width: 100%;
}

.print-poster-tool__options--inline .print-poster-tool__option-title {
  font-size: 0.8125rem;
  line-height: 1.25;
}

.print-poster-tool__options--inline .print-poster-tool__option-meta {
  font-size: 0.65rem;
  line-height: 1.25;
  margin-top: 0.1rem;
}

.print-poster-tool__options--duo .print-poster-tool__option {
  flex-basis: calc(50% - 0.2rem);
}

/* Iconos de formato (visibles en fila compacta móvil) */
.print-poster-tool__option-icon {
  display: none;
}

.print-poster-tool__option-title-short {
  display: none;
}

.print-poster-tool__option-icon--a4,
.print-poster-tool__option-icon--a5,
.print-poster-tool__option-icon--feed {
  aspect-ratio: 4 / 5;
  background: linear-gradient(180deg, #e2e8f0 0 72%, #fff 72%);
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgba(136, 17, 85, 0.25);
}

.print-poster-tool__option-icon--story,
.print-poster-tool__option-icon--landscape,
.print-poster-tool__option-icon--portrait {
  border: 2px solid #9ca3af;
  border-radius: 3px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.print-poster-tool__option:has(.form-check-input:checked) .print-poster-tool__option-icon {
  border-color: var(--bs-primary, #0d6efd);
}

.print-poster-tool__option-icon--a4 {
  height: 22px;
  width: 30px;
}

.print-poster-tool__option-icon--a5 {
  height: 18px;
  width: 22px;
}

.print-poster-tool__option-icon--story {
  border-radius: 4px;
  height: 30px;
  width: 17px;
}

.print-poster-tool__option-icon--landscape {
  height: 20px;
  width: 28px;
}

.print-poster-tool__option-icon--portrait {
  height: 28px;
  width: 20px;
}

.print-poster-tool__option {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--theme-border-radius-1, 10px);
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.print-poster-tool__option:hover {
  border-color: #d1d5db;
}

.print-poster-tool__option:has(.form-check-input:checked) {
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.04);
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 0 0 1px var(--bs-primary, #0d6efd);
}

.print-poster-tool__option .form-check-input {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.print-poster-tool__option-body {
  flex: 1;
  min-width: 0;
}

.print-poster-tool__option-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.print-poster-tool__option-meta {
  color: #6b7280;
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.print-poster-tool__template-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.print-poster-tool__template-picker--grid {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-poster-tool__template-picker--grid .print-poster-tool__template-option {
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem;
}

.print-poster-tool__template-picker--grid .form-check-input {
  margin: 0 auto;
}

.print-poster-tool__template-picker--grid .print-poster-tool__template-option-body {
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
  width: 100%;
}

.print-poster-tool__template-picker--grid .print-poster-tool__template-thumb {
  height: 56px;
  margin: 0 auto;
  width: 40px;
}

.print-poster-tool__template-picker--grid .print-poster-tool__option-title {
  font-size: 0.8125rem;
}

.print-poster-tool__template-picker--grid .print-poster-tool__option-meta {
  font-size: 0.65rem;
  margin-top: 0.05rem;
}

.print-poster-tool__template-option {
  align-items: stretch;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--theme-border-radius-1, 10px);
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  margin: 0;
  padding: 0.65rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.print-poster-tool__template-option:hover {
  border-color: #d1d5db;
}

.print-poster-tool__template-option:has(.form-check-input:checked) {
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.04);
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 0 0 1px var(--bs-primary, #0d6efd);
}

.print-poster-tool__template-option .form-check-input {
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.print-poster-tool__template-option-body {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 0.75rem;
  min-width: 0;
}

.print-poster-tool__template-thumb {
  background: #f3f4f6;
  border-radius: 6px;
  flex-shrink: 0;
  height: 72px;
  overflow: hidden;
  width: 48px;
}

.print-poster-tool__template-thumb-img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.print-poster-tool__template-thumb--mock {
  border: 1px solid #e5e7eb;
  position: relative;
}

.print-poster-tool__template-thumb--status1 {
  background: linear-gradient(180deg, #94a3b8 0 38%, #f3f4f6 38% 55%, #e5e7eb 55% 72%, #fff 72%);
}

.print-poster-tool__template-thumb--status1::after {
  background: var(--bs-primary, #881155);
  border-radius: 2px;
  content: "";
  height: 8px;
  left: 50%;
  position: absolute;
  top: 32%;
  transform: translateX(-50%);
  width: 70%;
}

.print-poster-tool__template-thumb--status2 {
  background: linear-gradient(180deg, #64748b 0 62%, #fff 62%);
}

.print-poster-tool__template-thumb--status2::after {
  background: #fff;
  border-radius: 2px;
  bottom: 18%;
  content: "";
  height: 6px;
  left: 12%;
  position: absolute;
  width: 50%;
}

.print-poster-tool__template-thumb--status3 {
  background: linear-gradient(180deg, #cbd5e1 0 40%, var(--bs-primary, #881155) 40% 52%, #f3f4f6 52%);
}

.print-poster-tool__template-thumb--status4 {
  background: linear-gradient(165deg, #94a3b8 0 48%, #1c1c1e 48%);
}

.print-poster-tool__template-thumb--status4::after {
  background: var(--bs-primary, #881155);
  content: "";
  height: 36px;
  left: 0;
  position: absolute;
  top: 28%;
  width: 6px;
}

.print-poster-tool__template-thumb--status5 {
  background: #f0ebe0;
}

.print-poster-tool__template-thumb--status5::after {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  content: "";
  height: 28px;
  left: 50%;
  position: absolute;
  top: 22%;
  transform: translateX(-50%) rotate(-4deg);
  width: 70%;
}

.print-poster-tool__template-thumb--status6 {
  background: linear-gradient(180deg, #334155 0 100%);
}

.print-poster-tool__template-thumb--feed1 {
  background: linear-gradient(180deg, #94a3b8 0 88%, #fff 88%);
  box-shadow: inset 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, 0.12);
}

.print-poster-tool__template-thumb--feed2,
.print-poster-tool__template-thumb--feed3,
.print-poster-tool__template-thumb--feed4,
.print-poster-tool__template-thumb--feed5,
.print-poster-tool__template-thumb--feed6 {
  background: linear-gradient(180deg, #64748b 0 70%, rgba(0, 0, 0, 0.55) 70%);
}

.print-poster-tool__option-meta--feed-h,
.print-poster-tool__option-meta--feed-v {
  display: none;
}

.print-poster-tool__form--feed-mode .print-poster-tool__option-meta--feed-h,
.print-poster-tool__form--feed-mode .print-poster-tool__option-meta--feed-v {
  display: block;
}

.print-poster-tool__form--feed-mode .print-poster-tool__option-meta--print {
  display: none;
}

.print-poster-tool__feed-photos {
  align-content: start;
  display: grid;
  gap: 0.5rem;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 12.5rem;
  overflow-y: auto;
  padding-right: 2px;
  width: 100%;
}

.print-poster-tool__feed-photo {
  appearance: none;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  line-height: 0;
  margin: 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.print-poster-tool__feed-photo-frame {
  display: block;
  overflow: hidden;
  padding-top: 100%;
  position: relative;
  width: 100%;
}

.print-poster-tool__feed-photo-frame img {
  display: block;
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
}

.print-poster-tool__feed-photos > .print-poster-tool__feed-photo {
  float: none;
  inset: auto;
  transform: none;
}

.print-poster-tool__feed-photo.is-selected {
  border-color: var(--bs-primary, #881155);
  box-shadow: 0 0 0 1px var(--bs-primary, #881155);
}

.print-poster-tool__feed-photo-order {
  align-items: center;
  background: var(--bs-primary, #881155);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 0.75rem;
  font-weight: 700;
  height: 1.35rem;
  justify-content: center;
  left: 0.35rem;
  line-height: 1;
  min-width: 1.35rem;
  padding: 0 0.25rem;
  position: absolute;
  top: 0.35rem;
  z-index: 2;
}

.print-poster-tool__feed-caption {
  font-size: 0.875rem;
  resize: vertical;
}

.print-poster-tool__ai-caption-btn.is-busy {
  opacity: 0.75;
  pointer-events: none;
}

.print-poster-tool__ai-caption-btn.is-busy .print-poster-tool__ai-caption-btn-label::after {
  animation: print-poster-ai-dots 1.2s steps(4, end) infinite;
  content: "";
  display: inline-block;
  width: 0.5rem;
}

@keyframes print-poster-ai-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.print-poster-tool__feed-progress {
  margin-top: 0.5rem;
  width: 100%;
}

.print-poster-tool__feed-capture-iframe {
  height: 0;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 0;
}

.print-poster-tool__template-thumb--status6::after {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  content: "";
  height: 40%;
  left: 50%;
  position: absolute;
  top: 30%;
  transform: translateX(-50%);
  width: 65%;
}

.print-poster-tool__template-option-text {
  flex: 1;
  min-width: 0;
}

/* Preview: no desbordar sobre la columna izquierda */
.print-poster-tool__preview-col {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.print-poster-tool__preview.card {
  border-radius: var(--theme-border-radius-2, 12px);
  overflow: visible;
}

.print-poster-tool__preview-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  border-radius: var(--theme-border-radius-2, 12px) var(--theme-border-radius-2, 12px) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
}

.print-poster-tool__preview-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.print-poster-tool__preview-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.print-poster-tool__preview-badge {
  background: #f3f4f6;
  border-radius: 999px;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
}

.print-poster-tool__preview-hint {
  color: #9ca3af;
  font-size: 0.8rem;
  margin: 0;
}

.print-poster-tool__preview-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.print-poster-tool__preview-btn-text-short {
  display: none;
}

.print-poster-tool__ig-account-modal .modal-dialog {
  max-width: 22rem;
}

.print-poster-tool__ig-account-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.print-poster-tool__ig-account-option {
  align-items: center;
  background: #fff;
  border: 1px solid var(--bs-gray-300, #dee2e6);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  width: 100%;
}

.print-poster-tool__ig-account-option:hover,
.print-poster-tool__ig-account-option:focus {
  background: var(--bs-gray-100, #f8f9fa);
  border-color: var(--bs-primary, #0d6efd);
  outline: none;
}

.print-poster-tool__ig-account-option.is-suggested {
  border-color: var(--bs-primary, #0d6efd);
}

.print-poster-tool__ig-account-option__icon {
  color: #e1306c;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.print-poster-tool__ig-account-option__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

.print-poster-tool__ig-account-option__meta {
  color: var(--bs-gray-600, #6c757d);
  display: block;
  font-size: 0.78rem;
  line-height: 1.3;
}

.print-poster-tool__ig-account-option__badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  margin-left: auto;
}

.print-poster-tool__instagram-feedback {
  font-size: 0.8125rem;
  line-height: 1.35;
  padding: 0.35rem 0.55rem 0;
  width: 100%;
}

.print-poster-tool__instagram-feedback--ok {
  color: #047857;
}

.print-poster-tool__instagram-feedback--ok a {
  color: #065f46;
  font-weight: 600;
  text-decoration: underline;
}

.print-poster-tool__instagram-feedback--ok a:hover {
  color: #064e3b;
}

.print-poster-tool__instagram-feedback--err {
  color: #b91c1c;
}

@media (min-width: 992px) {
  .print-poster-tool__preview-toolbar {
    flex-wrap: wrap;
  }

  .print-poster-tool__instagram-feedback {
    flex: 1 1 100%;
    padding-left: 0;
  }
}

.print-poster-tool__preview-actions .ud-btn .print-poster-tool__preview-btn-icon {
  font-size: 1rem;
  margin-left: 0;
  margin-right: 0.5rem;
  pointer-events: none;
  transform: none;
}

.print-poster-tool__preview-actions .ud-btn:hover .print-poster-tool__preview-btn-icon,
.print-poster-tool__preview-actions .ud-btn:focus .print-poster-tool__preview-btn-icon {
  transform: none;
}

.print-poster-tool__preview-actions .btnPublishInstagram.is-not-configured {
  opacity: 0.72;
}

.print-poster-tool__preview-actions .btnPublishInstagram.is-busy {
  cursor: wait;
  opacity: 0.85;
}

.print-poster-tool__preview-actions .btnPublishInstagram:not(.d-none) {
  pointer-events: auto;
}

.print-poster-tool__preview-stage {
  background: linear-gradient(180deg, #eef1f6 0%, #e5e9f0 100%);
  border-radius: 0 0 var(--theme-border-radius-2, 12px) var(--theme-border-radius-2, 12px);
  min-height: min(75vh, 880px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
  position: relative;
}

.print-poster-tool__preview-stage-inner {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: min(70vh, 820px);
  width: 100%;
}

@media (min-width: 992px) {
  .print-poster-tool-page > .container-fluid {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .print-poster-tool {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
  }

  .print-poster-tool > .row {
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
  }

  .print-poster-tool__preview-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .print-poster-tool__preview.card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }

  .print-poster-tool__preview-stage {
    flex: 1 1 auto;
    min-height: 0;
  }

  .print-poster-tool__preview-stage-inner {
    height: 100%;
    min-height: 100%;
  }
}

.print-poster-tool__iframe-wrap {
  background: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
  flex: 0 0 auto;
  line-height: 0;
  overflow: hidden;
  position: relative;
}

.print-poster-tool__iframe-scaler {
  transform-origin: 0 0;
}

#printPosterView {
  border: 0;
  display: block;
  max-width: none;
  vertical-align: top;
}

.print-poster-tool__preview-stage--loading .print-poster-tool__iframe-wrap {
  opacity: 0.55;
  pointer-events: none;
}

.print-poster-tool__loader {
  align-items: center;
  color: #4b5563;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  inset: 0;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

.print-poster-tool__preview-stage--loading .print-poster-tool__loader {
  display: flex;
}

/* Dropdown del selectpicker en body */
body.print-poster-tool-page .bootstrap-select .dropdown-menu {
  max-width: min(520px, calc(100vw - 2rem));
  z-index: 1080 !important;
}

/* —— Móvil y tablet estrecha —— */
@media (max-width: 991.98px) {
  body.print-poster-tool-page {
    -webkit-text-size-adjust: 100%;
  }

  body.print-poster-tool-page .container-fluid {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .print-poster-tool {
    margin-bottom: 1rem;
  }

  .print-poster-tool > .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 1rem;
    margin-left: 0;
    margin-right: 0;
  }

  .print-poster-tool > .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }

  .print-poster-tool__panel-body {
    padding: 0.65rem 0.75rem !important;
  }

  .print-poster-tool__config-block {
    margin-bottom: 0.5rem !important;
  }

  .print-poster-tool__section-title {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
  }

  /* Tamaño y orientación: iconos pequeños en una fila */
  .print-poster-tool__options--icon-row {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option {
    align-items: center;
    flex: 1 1 0;
    flex-direction: column;
    gap: 0.2rem;
    justify-content: center;
    min-height: 3.35rem;
    min-width: 0;
    padding: 0.35rem 0.15rem;
    position: relative;
    text-align: center;
    width: auto;
  }

  .print-poster-tool__options--icon-row .form-check-input {
    height: 1px;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 1px;
    z-index: 1;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option-icon {
    display: block;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option-body {
    width: 100%;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option-meta {
    display: none;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option-title {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option-title-long {
    display: none;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option-title-short {
    display: inline;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option-title:not(:has(.print-poster-tool__option-title-short)) {
    font-size: 0.75rem;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option:has(.form-check-input:focus-visible) {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
  }

  .print-poster-tool__options--icon-row .print-poster-tool__option:has(.form-check-input:checked) .print-poster-tool__option-icon {
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1);
  }

  /* Plantillas: solo icono, 5 por fila (4 en pantallas muy angostas) */
  .print-poster-tool__template-picker--icons-mobile {
    gap: 0.3rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .print-poster-tool__template-picker--icons-mobile .print-poster-tool__template-option {
    align-items: center;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    margin: 0;
    min-height: 0;
    padding: 0.25rem;
    position: relative;
  }

  .print-poster-tool__template-picker--icons-mobile .form-check-input {
    height: 1px;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 1px;
    z-index: 1;
  }

  .print-poster-tool__template-picker--icons-mobile .print-poster-tool__template-option-body {
    align-items: center;
    flex-direction: column;
    gap: 0;
    justify-content: center;
    width: 100%;
  }

  .print-poster-tool__template-picker--icons-mobile .print-poster-tool__template-option-text {
    display: none;
  }

  .print-poster-tool__template-picker--icons-mobile .print-poster-tool__template-thumb {
    height: 100%;
    margin: 0;
    max-height: 2.5rem;
    width: 100%;
  }

  .print-poster-tool__template-picker--icons-mobile .print-poster-tool__template-thumb--mock {
    max-height: 2.5rem;
    min-height: 2rem;
    width: 72%;
  }

  .print-poster-tool__template-picker--icons-mobile .print-poster-tool__template-thumb-img {
    object-fit: contain;
  }

  .print-poster-tool__template-picker--icons-mobile .print-poster-tool__template-option:has(.form-check-input:focus-visible) {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 1px;
  }

  body.print-poster-tool-page .bootstrap-select > .dropdown-toggle {
    font-size: 0.875rem;
    min-height: 2.35rem;
    padding: 0.4rem 0.65rem;
  }

  /* Barra de vista previa compacta en una fila */
  .print-poster-tool__preview-toolbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
  }

  .print-poster-tool__instagram-feedback {
    flex: 1 1 100%;
    order: 10;
    padding: 0.15rem 0 0;
  }

  .print-poster-tool__preview-heading {
    align-items: center;
    flex: 1 1 auto;
    flex-direction: row;
    gap: 0;
    min-width: 0;
  }

  .print-poster-tool__preview-badge {
    font-size: 0.75rem;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    padding: 0.2rem 0.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .print-poster-tool__preview-hint {
    display: none !important;
  }

  .print-poster-tool__preview-actions {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 0.35rem;
    width: auto;
  }

  .print-poster-tool__preview-actions .ud-btn {
    align-items: center;
    display: inline-flex;
    font-size: 0.8125rem;
    justify-content: center;
    line-height: 1.2;
    min-height: 2.15rem;
    padding: 0.3rem 0.55rem;
    white-space: nowrap;
    width: auto;
  }

  .print-poster-tool__preview-actions .ud-btn .print-poster-tool__preview-btn-icon {
    margin-right: 0.3rem;
  }

  .print-poster-tool__preview-actions .print-poster-tool__preview-btn-text {
    display: none;
  }

  .print-poster-tool__preview-actions .ud-btn .print-poster-tool__preview-btn-icon {
    margin-left: 0;
    margin-right: 0;
    transform: none;
  }

  .print-poster-tool__preview-actions .ud-btn {
    min-width: 2.15rem;
    padding: 0.3rem 0.45rem;
  }

  .print-poster-tool__preview-stage {
    min-height: 58vh;
    padding: 0.75rem;
  }

  .print-poster-tool__preview-stage-inner {
    min-height: 52vh;
  }
}

@media (max-width: 380px) {
  body.print-poster-tool-page .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .print-poster-tool__template-picker--icons-mobile {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
