/* ========================================
   POST CREATOR - Editor de posts estilizados
   ======================================== */

.modal-post-creator {
  max-width: 420px;
  height: 90vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-creator-preview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: background 0.3s ease;
}

.post-creator-preview.has-bg-image {
  background-size: cover;
  background-position: center;
}

.post-creator-text {
  width: 100%;
  min-height: 100px;
  padding: 20px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  overflow: hidden;
}

.post-creator-text::placeholder {
  color: rgba(255,255,255,0.7);
}

.post-creator-text.with-bg {
  background: rgba(0,0,0,0.4);
  border-radius: 12px;
  padding: 16px 20px;
  width: auto;
  max-width: 90%;
}

/* Límite de caracteres */
.char-limit {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 10px;
}

.char-limit.warning {
  color: #ffcc00;
}

.char-limit.exceeded {
  color: #ff4444;
}

/* Panel de herramientas */
.post-creator-tools {
  background: #fff;
  border-top: 1px solid var(--borde);
  padding: 12px;
}

.tools-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.tools-row:last-child {
  margin-bottom: 0;
}

.tool-label {
  font-size: 12px;
  color: var(--gris);
  font-weight: 600;
  min-width: 60px;
}

/* Paleta de colores de fondo */
.bg-palette {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bg-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.bg-option:hover {
  transform: scale(1.1);
}

.bg-option.active {
  border-color: var(--azul);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--azul);
}

.bg-option.add-image {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Selector de fuente */
.font-selector {
  display: flex;
  gap: 4px;
}

.font-option {
  padding: 6px 10px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}

.font-option:hover {
  border-color: var(--azul);
}

.font-option.active {
  background: var(--azul);
  color: #fff;
  border-color: var(--azul);
}

/* Colores de texto */
.color-palette {
  display: flex;
  gap: 4px;
}

.color-option {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}

.color-option:hover {
  transform: scale(1.15);
}

.color-option.active {
  box-shadow: 0 0 0 2px var(--azul);
}

/* Toggle switches */
.toggle-group {
  display: flex;
  gap: 12px;
}

.toggle-btn {
  padding: 6px 12px;
  border: 1px solid var(--borde);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.toggle-btn:hover {
  border-color: var(--azul);
}

.toggle-btn.active {
  background: var(--azul);
  color: #fff;
  border-color: var(--azul);
}

/* Tamaño de fuente */
.size-slider {
  flex: 1;
  max-width: 150px;
  height: 6px;
  -webkit-appearance: none;
  background: var(--borde);
  border-radius: 3px;
  outline: none;
}

.size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--azul);
  cursor: pointer;
}

/* Footer con acciones */
.post-creator-footer {
  padding: 12px;
  border-top: 1px solid var(--borde);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.post-creator-footer .btn {
  flex: 1;
}

/* Input oculto para imagen de fondo */
.bg-image-input {
  display: none;
}

/* ========================================
   POSTS ESTILIZADOS EN EL FEED
   ======================================== */

.post-styled {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-size: cover;
  background-position: center;
  border-radius: 0;
  margin: 0 -10px;
}

.post-styled-text {
  text-align: center;
  padding: 16px 20px;
  max-width: 100%;
  word-wrap: break-word;
}

/* Overlay para legibilidad */
.post-styled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.1);
  pointer-events: none;
}

.post-styled .post-styled-text {
  position: relative;
  z-index: 1;
}
