/* Foro VGTV — extiende estética del chat (chat.css) */

.forum-host-embed-chrome h2 {
  margin: 0 0 6px;
  text-align: center;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  line-height: 1.5;
}

.forum-wrapper {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 15px;
  width: 100%;
  max-width: 100%;
  margin: 30px auto 24px;
  padding: 10px;
  background-color: black;
  border: 2px solid red;
  border-radius: 8px;
  box-shadow: 0 0 10px yellow;
  box-sizing: border-box;
}

.forum-menu {
  flex: 1 1 260px;
  min-width: 200px;
  max-width: 340px;
}

.forum-menu-actions {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.forum-menu-actions .chat-auth-submit {
  width: 100%;
}

.forum-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.forum-category-btn {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 2px solid red;
  border-radius: 8px;
  box-shadow: 0 0 5px yellow;
  background: rgba(15, 15, 15, 0.9);
  color: #fff;
  font-family: "Silkscreen", Verdana, Tahoma, sans-serif;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.forum-category-btn:hover,
.forum-category-btn.forum-category-btn--active {
  background-color: yellow;
  color: red;
}

.forum-main-window {
  position: relative;
  flex: 2 1 420px;
  min-width: 0;
  border: 4px double red;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 0 12px yellow;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.forum-titlebar {
  padding: 10px 12px;
  border-bottom: 2px solid red;
  background: rgba(40, 0, 0, 0.6);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: #ffde59;
  text-align: center;
}

.forum-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 2px solid rgba(255, 0, 0, 0.45);
  font-family: "Silkscreen", Verdana, Tahoma, sans-serif;
  font-size: 11px;
}

.forum-toolbar .forum-back-btn {
  padding: 6px 10px;
  border: 2px solid #fff;
  border-radius: 6px;
  background: #1a1a4a;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  cursor: pointer;
}

.forum-toolbar .forum-back-btn:hover {
  background: #2a2a6a;
}

.forum-user-badge {
  color: #ffde59;
  flex: 1;
  min-width: 120px;
}

.forum-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 12px;
  min-height: 0;
  font-family: "Silkscreen", Verdana, Tahoma, sans-serif;
  font-size: 11px;
  line-height: 1.55;
  color: #f3f3f3;
}

/* Tarjetas y textos del foro: misma tipografía que el listado de temas */
.forum-category-intro,
.forum-thread-item,
.forum-thread-op,
.forum-reply {
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 2px solid red;
  border-radius: 8px;
  box-shadow: 0 0 5px yellow;
  background: rgba(15, 15, 15, 0.92);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.forum-category-intro {
  margin-bottom: 12px;
}

.forum-thread-op {
  margin-bottom: 14px;
}

.forum-reply {
  margin-bottom: 10px;
}

.forum-category-intro-title,
.forum-thread-item-title {
  margin: 0 0 6px;
  color: #ffde59;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.4;
}

.forum-category-intro-text,
.forum-post-body {
  margin: 0;
  color: #f3f3f3;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.forum-thread-item-meta,
.forum-post-head {
  margin: 0 0 6px;
  color: #ccc;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.5;
}

.forum-post-head {
  margin: 0 0 8px;
}

.forum-post-head strong {
  color: #ccc;
  font-weight: bold;
}

.forum-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.forum-thread-item {
  cursor: pointer;
}

.forum-thread-item:hover {
  box-shadow: 0 0 12px rgba(255, 222, 89, 0.5);
}

.forum-thread-item-title {
  color: #ffde59;
}

.forum-thread-item-meta {
  margin: 0;
}

.forum-reply-children {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px dashed rgba(255, 222, 89, 0.35);
}

.forum-reply--depth-2 {
  border-color: rgba(255, 100, 100, 0.85);
}

.forum-reply--depth-3,
.forum-reply--depth-4,
.forum-reply--depth-5 {
  border-color: rgba(255, 150, 80, 0.75);
}

.forum-reply-to {
  margin: 0 0 6px;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.5;
  color: #ccc;
}

.forum-reply-to strong {
  color: #ccc;
  font-weight: bold;
}

.forum-reply-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.forum-reply-btn {
  padding: 4px 8px;
  border: 1px solid #ffde59;
  border-radius: 4px;
  background: #2a2200;
  color: #ffde59;
  font-family: "Press Start 2P", monospace;
  font-size: 7px;
  cursor: pointer;
}

.forum-reply-btn:hover {
  background: #4a3a00;
  color: #fff;
}

.forum-compose-replying {
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px dashed #ffde59;
  border-radius: 6px;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.5;
  color: #ccc;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.forum-compose-cancel-reply {
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #222;
  color: #ccc;
  font-family: "Press Start 2P", monospace;
  font-size: 6px;
  cursor: pointer;
}

.forum-delete-btn {
  padding: 4px 8px;
  border: 1px solid #f88;
  border-radius: 4px;
  background: #3a1010;
  color: #fcc;
  font-family: "Press Start 2P", monospace;
  font-size: 7px;
  cursor: pointer;
}

.forum-empty {
  text-align: center;
  color: #aaa;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.55;
  padding: 24px 8px;
}

.forum-compose {
  padding: 10px 12px;
  border-top: 2px solid red;
  background: rgba(0, 0, 0, 0.5);
}

.forum-compose label {
  display: block;
  margin: 8px 0 4px;
  font-size: 10px;
  color: #ffde59;
  font-family: "Silkscreen", Verdana, Tahoma, sans-serif;
}

.forum-compose input,
.forum-compose select,
.forum-compose textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 2px solid red;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-family: "Silkscreen", Verdana, Tahoma, sans-serif;
  font-size: 11px;
}

.forum-compose textarea {
  min-height: 88px;
  resize: vertical;
}

.forum-compose-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.forum-compose-row .chat-auth-submit {
  flex: 1;
}

.forum-guest-note {
  margin: 0 0 10px;
  padding: 10px;
  border: 2px dashed #ffde59;
  border-radius: 8px;
  color: #fff3c4;
  font-size: 11px;
  line-height: 1.45;
}

html.forum-embed .forum-host-embed-chrome {
  display: none;
}

/* iframe Neocities (?embed=1): mismo reparto que el chat */
html.forum-embed body.chat-host-body {
  padding: 0;
  min-height: 0;
  overflow-x: hidden;
  background: #000;
}

html.forum-embed .chat-host-inner {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

html.forum-embed .forum-wrapper {
  flex-direction: row-reverse !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  margin: 8px 0 0;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}

/* Sin sesión: solo menú/login, sin panel negro vacío al lado */
html.forum-embed .forum-wrapper.forum-layout-guest .forum-main-window {
  display: none !important;
}

html.forum-embed .forum-wrapper.forum-layout-guest .forum-menu,
html.forum-embed .forum-wrapper.forum-layout-guest .chat-menu.forum-menu {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: none !important;
}

html.forum-embed .forum-menu,
html.forum-embed .chat-menu.forum-menu {
  flex: 0 1 34% !important;
  width: auto !important;
  max-width: 360px !important;
  min-width: 220px !important;
}

html.forum-embed .forum-main-window {
  flex: 1 1 62% !important;
  min-width: 0 !important;
  width: auto !important;
}

html.forum-embed .forum-layout-member .forum-content {
  min-height: 200px;
}

@media (max-width: 768px) {
  html.forum-embed .forum-wrapper {
    flex-direction: row-reverse !important;
    flex-wrap: nowrap !important;
  }

  html.forum-embed .forum-menu,
  html.forum-embed .chat-menu.forum-menu {
    flex: 0 1 36% !important;
    min-width: 200px !important;
    max-width: none !important;
  }

  html.forum-embed .forum-main-window {
    flex: 1 1 60% !important;
  }
}

@media (max-width: 600px) {
  html.forum-embed .forum-wrapper {
    flex-direction: column-reverse !important;
    gap: 12px !important;
    padding: 8px !important;
    margin: 6px 0 0 !important;
  }

  html.forum-embed .forum-menu,
  html.forum-embed .chat-menu.forum-menu {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html.forum-embed .forum-main-window {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (min-width: 769px) {
  html.forum-embed .forum-wrapper {
    flex-direction: row-reverse !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  html.forum-embed .forum-menu,
  html.forum-embed .chat-menu.forum-menu {
    flex: 0 0 300px !important;
    width: 300px !important;
    min-width: 280px !important;
    max-width: 340px !important;
  }

  html.forum-embed .forum-layout-member .forum-main-window {
    flex: 1 1 0 !important;
    min-width: 420px !important;
    width: auto !important;
    min-height: 0;
    display: flex !important;
  }

  html.forum-embed .forum-layout-member .forum-content {
    min-height: 240px;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .forum-wrapper:not(html.forum-embed .forum-wrapper) {
    flex-direction: column;
  }

  .forum-menu {
    max-width: 100%;
    width: 100%;
  }

  .forum-main-window {
    min-height: 0;
  }
}
