/* Módulo Oportunidades — estilos propios (layout admin usa module_app_ui) */

.oportunidades-app .opp-msg {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
}

.oportunidades-app .opp-msg--ok {
  background: #e8f6ec;
  color: #1b7a3a;
}

.oportunidades-app .opp-msg--error {
  background: #fdecea;
  color: #a1281c;
}

.oportunidades-app .opp-form-hint {
  display: block;
  margin-top: 0.25rem;
  font-weight: 400;
  color: #777;
  font-size: 0.8rem;
}

.oportunidades-app .opp-foto-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.35rem;
}

.oportunidades-app .opp-foto-label {
  display: block;
  margin-bottom: 0;
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.oportunidades-app .opp-foto-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 2px;
}

.oportunidades-app .opp-foto-thumb-wrap {
  position: relative;
}

.oportunidades-app .opp-foto-thumb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  padding: 4px;
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.oportunidades-app .opp-foto-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}

.oportunidades-app .opp-foto-thumb.is-selected {
  border-color: #d41316;
  box-shadow: 0 0 0 1px rgba(212, 19, 22, 0.25);
}

.oportunidades-app .opp-foto-thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.oportunidades-app .opp-foto-thumb-del:hover,
.oportunidades-app .opp-foto-thumb-del:focus-visible {
  background: #d41316;
  outline: none;
}

body.oportunidades-app #oppModal .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 12px;
  margin: 0;
}

body.oportunidades-app #oppModal .form-grid .full {
  grid-column: 1 / -1;
}

body.oportunidades-app #oppModal .form-grid label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  line-height: 1.3;
}

body.oportunidades-app #oppModal .form-grid label.opp-foto-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  min-height: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--dot-brand, #d41316);
  background: var(--dot-brand-light, #f4d3d5);
  border: 1px solid var(--dot-brand-light, #f4d3d5);
  box-sizing: border-box;
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  flex-shrink: 0;
}

body.oportunidades-app #oppModal .form-grid label.opp-foto-upload-btn:hover {
  background: var(--dot-brand-light-hover, #e8c1c4);
  border-color: #ddb6b9;
  color: var(--dot-brand, #d41316);
}

body.oportunidades-app #oppModal .form-grid label.opp-foto-upload-btn i {
  font-size: 11px;
  line-height: 1;
  color: inherit;
}

body.oportunidades-app #oppModal .form-grid input,
body.oportunidades-app #oppModal .form-grid textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

body.oportunidades-app #oppModal .form-grid textarea {
  min-height: 110px;
  resize: vertical;
}

body.oportunidades-app #oppModal .form-grid input:focus,
body.oportunidades-app #oppModal .form-grid textarea:focus {
  outline: none;
  border-color: var(--dot-brand, #d41316);
  box-shadow: 0 0 0 3px rgba(212, 19, 22, 0.1);
}

body.oportunidades-app #oppModal .label-req {
  color: #d41316;
  font-weight: 700;
}

body.oportunidades-app #oppModal form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.oportunidades-app .opp-estado {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: middle;
}

.oportunidades-app .opp-estado--publicada {
  color: #166534;
  background: #dcfce7;
}

.oportunidades-app .opp-estado--borrador {
  color: #92400e;
  background: #fef3c7;
}

.oportunidades-app .opp-estado--cerrada {
  color: #4b5563;
  background: #e5e7eb;
}

.oportunidades-app .opp-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.25rem 0.25rem;
}

.oportunidades-app .opp-page-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.oportunidades-app .opp-page-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.oportunidades-app .opp-page-info {
  color: #666;
  font-size: 0.9rem;
}

/* Plantilla designer */
.opp-plantilla-layout {
  display: block;
}

.opp-plantilla-stage-wrap {
  position: relative;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1rem;
  overflow: auto;
  max-height: calc(100vh - 220px);
}

.opp-plantilla-stage {
  position: relative;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.opp-plantilla-stage img.opp-fondo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.opp-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
}

.opp-guide {
  position: absolute;
  background: transparent;
  opacity: 0.95;
}

.opp-guide--v {
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed #d41316;
}

.opp-guide--h {
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed #d41316;
}

.opp-size-tip {
  position: fixed;
  z-index: 80;
  left: 0;
  top: 0;
  transform: translate(12px, 16px);
  pointer-events: none;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.opp-size-tip[hidden] {
  display: none !important;
}

.opp-block {
  position: absolute;
  box-sizing: border-box;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  background: rgba(212, 19, 22, 0.12);
  color: #fff;
  cursor: move;
  overflow: hidden;
  padding: 4px;
  line-height: 1.2;
  word-break: break-word;
}

.opp-block.is-selected {
  border-color: #d41316;
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(212, 19, 22, 0.35);
  z-index: 3;
}

.opp-block--qr {
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border-style: solid;
  border-width: 1px;
}

.opp-block--foto {
  background: rgba(212, 19, 22, 0.32);
  border: 1px solid rgba(212, 19, 22, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(212, 19, 22, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.opp-block--foto.is-selected {
  background: rgba(212, 19, 22, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 2px rgba(212, 19, 22, 0.45);
}

.opp-block-qr-label {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.opp-block--qr-logo .opp-block-qr-label {
  opacity: 0.35;
  font-size: 10px;
}

.opp-block-qr-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28%;
  height: 28%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 4px;
  padding: 2px;
  pointer-events: none;
  z-index: 2;
}

.opp-props-panel {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}

.opp-props-panel[hidden] {
  display: none !important;
}

.opp-qr-designs {
  gap: 2px;
}

.opp-foto-aspects {
  gap: 2px;
}

.opp-aspect-btn {
  width: auto !important;
  min-width: 28px;
  padding: 0 5px !important;
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: 0;
}

.opp-qr-swatch {
  width: 26px !important;
  height: 22px !important;
}

.opp-qr-swatch__preview {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  background:
    linear-gradient(90deg, currentColor 2px, transparent 2px) 0 0 / 4px 4px,
    linear-gradient(currentColor 2px, transparent 2px) 0 0 / 4px 4px;
  background-color: #fff;
  color: #111;
}

.opp-qr-swatch__preview--classic {
  color: #000;
  background-color: #fff;
}

.opp-qr-swatch__preview--brand {
  color: #d41316;
  background-color: #fff;
}

.opp-qr-swatch__preview--inverted {
  color: #fff;
  background-color: #1a1a1a;
  border-color: #333;
}

.opp-qr-swatch__preview--soft {
  color: #374151;
  background-color: #f3f4f6;
}

.opp-qr-swatch__preview--logo,
.opp-qr-swatch__preview--brand-logo {
  position: relative;
  color: #000;
  background-color: #fff;
}

.opp-qr-swatch__preview--brand-logo {
  color: #d41316;
}

.opp-qr-swatch__preview--logo::after,
.opp-qr-swatch__preview--brand-logo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 1px;
  background: #d41316;
}

.opp-block-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  background: #d41316;
  cursor: nwse-resize;
}

.opp-props-toolbar {
  position: absolute;
  z-index: 30;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 2px 4px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  pointer-events: auto;
  font-size: 10px;
  line-height: 1.1;
}

.opp-props-toolbar[hidden] {
  display: none !important;
}

.opp-tb-font {
  width: 5.75rem;
  height: 22px;
  padding: 0 3px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
  color: #374151;
}

.opp-tb-field {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  font-size: 10px;
}

.opp-tb-hint {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
}

.opp-tb-field:has(.opp-tb-size) .opp-tb-hint {
  font-size: 8px;
}

.opp-props-toolbar input[type="number"].opp-tb-size,
.opp-props-toolbar input[type="number"].opp-tb-max {
  width: 2.5rem;
  height: 22px;
  padding: 0 2px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
  line-height: 1.1;
  color: #374151;
  text-align: center;
}

.opp-props-toolbar input[type="number"].opp-tb-max {
  width: 2.75rem;
}

.opp-tb-color {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.opp-tb-sep {
  width: 1px;
  height: 14px;
  background: #d1d5db;
  margin: 0 1px;
  flex-shrink: 0;
}

.opp-tb-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.opp-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
}

.opp-tb-btn:hover:not(:disabled) {
  background: #e5e7eb;
  color: #111827;
}

.opp-tb-btn.is-active {
  background: #fff;
  color: #d41316;
  box-shadow: 0 0 0 1px #d1d5db;
}

.opp-tb-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.opp-tb-btn__txt {
  font-size: 10px;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.opp-tb-btn i {
  font-size: 10px;
}

.opp-preview-card {
  max-width: min(480px, 100%) !important;
}

.opp-preview-body {
  text-align: center;
}

.opp-preview-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Público — cartelera */
body.opp-public-page.rb-public-page {
  background-image: url("../../img/fondo.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.opp-public-page .rb-public-inner.opp-cartelera-wrap {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.opp-public-page .opp-cartelera-shell {
  max-width: none !important;
}

.opp-public-page .opp-cartelera-shell .form-flow {
  margin-bottom: 1.15rem;
}

.opp-cartelera {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.opp-cartelera-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem 1rem;
}

.opp-cartelera-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.opp-cartelera-card:disabled {
  cursor: default;
  opacity: 0.85;
}

.opp-cartelera-card:hover:not(:disabled),
.opp-cartelera-card:focus-visible:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  outline: none;
}

.opp-cartelera-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #111;
  border-radius: 0;
  overflow: hidden;
}

.opp-cartelera-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.opp-cartelera-poster__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.45);
  font-size: 2rem;
  background: linear-gradient(160deg, #2a2a2a, #111);
}

.opp-cartelera-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem 0 0;
}

.opp-cartelera-meta__ubi {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: #555;
  padding: 0 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opp-cartelera-meta__ubi i {
  color: #d41316;
  margin-right: 0.2rem;
}

.opp-cartelera-banner {
  display: block;
  background: #d41316;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
  text-align: center;
  padding: 0.55rem 0.65rem;
  border-radius: 4px;
  box-shadow: 0 3px 0 rgba(176, 16, 19, 0.55);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.opp-public-empty {
  text-align: center;
  color: #666;
  padding: 2rem 1rem;
}

.modal .for-modal-card.opp-poster-modal-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  width: max-content;
  max-width: 96vw;
  max-height: min(94dvh, 100%);
  padding: 0 !important;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.opp-poster-modal-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.opp-poster-modal-close:hover,
.opp-poster-modal-close:focus-visible {
  background: #fff;
}

.opp-poster-modal-body {
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
  flex: 0 0 auto;
  width: max-content;
  max-width: 96vw;
  background: transparent !important;
  line-height: 0;
}

.opp-poster-modal-img {
  display: block;
  width: auto;
  max-width: min(92vw, 560px);
  max-height: min(78vh, 860px);
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  vertical-align: top;
}

.opp-poster-modal-footer {
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 12px 14px !important;
  border-top: none;
  background: #fff;
}

.opp-poster-modal-footer .dot-btn-primary,
.opp-poster-modal-footer .dot-btn-secondary {
  text-decoration: none;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}

@media (max-width: 900px) {
  .opp-cartelera-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .opp-cartelera-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
}

.opp-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.opp-detail-body {
  white-space: pre-wrap;
  line-height: 1.55;
  color: #333;
}

.opp-detail-ubicacion {
  margin: 0.35rem 0 1rem;
  color: #d41316;
  font-weight: 600;
}

.opp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.opp-btn--primary {
  background: #d41316;
  color: #fff;
  border-color: #b01013;
}

.opp-btn--secondary {
  background: #fff;
  color: #333;
  border-color: #ccc;
}
