/* Comunidad — Muro del Misterio */

.feed-mode-nav {
  display: flex;
  width: 100%;
  background: #141414;
  border-bottom: 1px solid #3e4042;
  position: sticky;
  top: 0;
  z-index: 111;
}

.feed-mode-tab {
  flex: 1;
  min-height: 48px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #b0b3b8;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  touch-action: manipulation;
}

.feed-mode-tab.active {
  color: #ff6b35;
}

.feed-mode-tab.active::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 3px;
  background: #ff6b35;
  border-radius: 2px;
}

.feed-panel-explorar.is-hidden,
.feed-panel-comunidad.is-hidden {
  display: none !important;
}

.feed-comunidad-intro {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 12px 0;
  color: #b0b3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Compositor colapsable */
.muro-composer-shell {
  max-width: 680px;
  margin: 12px auto 8px;
  padding: 0 12px;
}

.muro-composer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #3e4042;
  border-radius: 12px;
  background: #242526;
  color: #e4e6eb;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  gap: 12px;
}

.muro-composer-toggle:hover {
  border-color: #ff6b35;
  color: #ff6b35;
}

.muro-composer-toggle-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(139, 0, 0, 0.35);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}

.muro-composer-shell:not(.is-collapsed) .muro-composer-toggle {
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.muro-composer-body {
  border: 1px solid #3e4042;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: #242526;
  overflow: hidden;
}

.muro-composer-shell.is-collapsed .muro-composer-body {
  display: none;
}

.muro-composer {
  margin: 0;
  padding: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.muro-composer h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: #d4a574;
}

.muro-composer label {
  display: block;
  margin-bottom: 6px;
  color: #b0b3b8;
  font-size: 0.85rem;
}

.muro-composer input[type='text'],
.muro-composer textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 12px;
  background: #1a1a1a;
  border: 1px solid #3e4042;
  border-radius: 8px;
  color: #e4e6eb;
  font-size: 1rem;
  font-family: inherit;
}

.muro-composer textarea {
  min-height: 140px;
  resize: vertical;
}

.muro-image-hint {
  margin: -6px 0 10px;
  font-size: 0.78rem;
  color: #777;
  line-height: 1.4;
}

.muro-composer input[type='file'] {
  width: 100%;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #b0b3b8;
}

.muro-image-preview {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3e4042;
}

.muro-image-preview.is-hidden {
  display: none !important;
}

.muro-image-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.muro-image-preview-meta {
  display: block;
  padding: 8px 10px;
  font-size: 0.75rem;
  color: #888;
  background: #1a1a1a;
}

.muro-image-clear {
  margin-bottom: 14px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid #3e4042;
  border-radius: 6px;
  color: #888;
  font-size: 0.8rem;
  cursor: pointer;
}

.muro-image-clear.is-hidden {
  display: none !important;
}

.feed-comunidad-image {
  margin: -4px -4px 12px;
  border-radius: 8px;
  overflow: hidden;
}

.feed-comunidad-image img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.muro-composer-terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 16px;
  font-size: 0.85rem;
  color: #b0b3b8;
  line-height: 1.45;
}

.muro-composer-terms.is-hidden {
  display: none !important;
}

.muro-composer-terms input {
  margin-top: 4px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.muro-composer-terms-applied {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: rgba(74, 144, 226, 0.1);
  border: 1px solid rgba(74, 144, 226, 0.25);
  border-radius: 8px;
  color: #9ec5f0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.muro-composer-terms-applied.is-hidden {
  display: none !important;
}

.muro-composer-submit {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 8px;
  background: #8b0000;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
}

.muro-composer-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.muro-composer-submit:hover:not(:disabled) {
  background: #a50000;
}

.muro-composer-notice {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.muro-composer-notice.is-success {
  background: rgba(46, 125, 50, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.35);
  color: #a5d6a7;
}

.muro-composer-notice.is-error {
  background: rgba(183, 28, 28, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.35);
  color: #ef9a9a;
}

.muro-composer-guest {
  text-align: center;
  padding: 20px 16px;
}

.muro-composer-shell .muro-composer-guest {
  border: none;
  background: transparent;
}

.muro-composer-guest p {
  color: #b0b3b8;
  margin-bottom: 16px;
}

.muro-composer-guest a {
  display: inline-block;
  margin: 0 6px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.muro-btn-primary {
  background: #8b0000;
  color: #fff !important;
}

.muro-btn-secondary {
  background: #3a3b3c;
  color: #e4e6eb !important;
}

.feed-comunidad-list {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 12px 32px;
}

/* Skeleton de carga (mismas clases que Explorar en feed-styles.css) */
.feed-comunidad-loading.feed-loading-container {
  padding-top: 8px;
}

.feed-comunidad-loading-text {
  margin: 0 0 14px;
  text-align: center;
  font-size: 0.88rem;
  color: #b0b3b8;
  animation: feedPulse 1.5s ease-in-out infinite;
}

.feed-comunidad-card {
  animation: feedFadeInUp 0.4s ease;
}

.feed-comunidad-error .muro-comunidad-retry {
  margin-top: 12px;
  padding: 10px 18px;
  border: 1px solid #3e4042;
  border-radius: 8px;
  background: #8b0000;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: manipulation;
}

.feed-comunidad-error .muro-comunidad-retry:hover {
  background: #a50000;
}

.feed-comunidad-card {
  background: #242526;
  border: 1px solid #3e4042;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.feed-comunidad-card h3 {
  margin: 0 0 8px;
  color: #e4e6eb;
  font-size: 1rem;
}

.feed-comunidad-meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 12px;
}

.feed-comunidad-card .feed-comunidad-body {
  color: #b0b3b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.feed-comunidad-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.feed-legal-notice {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 0;
  border-top: 1px solid #3e4042;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #888;
}

.feed-legal-notice p {
  margin: 0 0 10px;
}

.feed-legal-notice strong {
  color: #aaa;
  font-weight: 600;
}

.feed-legal-links a {
  color: #9ec5f0;
  text-decoration: none;
}

.feed-legal-links a:hover {
  text-decoration: underline;
}

body.admin-bar.cdm-muro-page .feed-mode-nav {
  top: 46px;
}

@media (max-width: 767px) {
  .feed-comunidad-intro,
  .muro-composer-shell,
  .feed-comunidad-list,
  .feed-legal-notice {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .muro-composer-shell {
    margin-left: 0;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (min-width: 782px) {
  body.admin-bar.cdm-muro-page .feed-mode-nav {
    top: 32px;
  }
}
