.thai-forum-message>label{display:block;margin-bottom:8px}
.thai-forum-form .wp-editor-wrap{max-width:100%;background:#fff;color:#333}
.thai-forum-form .wp-editor-container{border:1px solid #c3c4c7}
.thai-forum-form .wp-editor-area{min-height:240px;padding:12px;font:16px/1.5 Arial,sans-serif}
.thai-forum-form .wp-editor-tools button{border-radius:3px 3px 0 0;box-shadow:none}
.thai-forum-form .quicktags-toolbar input{width:auto}
.thai-forum-form .mce-toolbar .mce-btn button{box-shadow:none;border-radius:0;min-width:30px}
.thai-forum-form .mce-container,.thai-forum-form .mce-toolbar-grp{max-width:100%}
.thai-forum-form .mce-toolbar .mce-container-body{white-space:normal}
.thai-forum-form .mce-toolbar .mce-btn-group{display:inline-block;float:none}
.thai-forum-smiles{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin:12px 0}
.thai-forum-smiles button{min-width:36px;min-height:36px;padding:4px;font-size:22px;line-height:1.1;background:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:none}
.thai-forum-smiles button:hover,.thai-forum-smiles button:focus-visible{background:#fff0df;border-color:#e76a00}
.thai-forum-smiles button img{width:20px;height:20px;object-fit:contain;vertical-align:middle}
.thai-forum-upload label,.thai-forum-upload small{display:block;margin:8px 0}
.thai-forum-form input[type=file]{padding:10px;background:#fff;border:1px solid #ccc;white-space:normal}
.thai-forum-image-previews{display:flex;flex-wrap:wrap;gap:12px}
.thai-forum-image-preview{display:flex;flex-direction:column;gap:6px;width:130px;padding:8px;border:1px solid #ddd;background:#fff;box-sizing:border-box}
.thai-forum-image-preview img{width:100%;height:90px;object-fit:contain}
.thai-forum-image-preview span{font-size:12px;overflow-wrap:anywhere}
.thai-forum-image-preview button{padding:5px;box-shadow:none}
#thai-forum-editor-error{color:#9c1c0c;background:#fff2ee;border:1px solid #d88579;padding:10px}
#thai-forum-editor-error[hidden]{display:none}
@media(max-width:600px){.thai-forum-form .mce-toolbar .mce-btn-group{margin:0}.thai-forum-form .wp-editor-tools button{font-size:14px}.thai-forum-form{width:100%}.thai-forum-image-preview{width:calc(50% - 6px)}}

.thai-forum .thai-forum-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0}
.thai-forum .thai-forum-actions .thai-forum-action,.thai-forum-form .thai-forum-bb-tools button,.thai-forum-form .thai-forum-source-actions button,.thai-forum-form [data-bb-switch]{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:32px;margin:0;padding:4px 9px;border:1px solid #b4cbd8;border-radius:4px;background:#fff;color:#145778;font:inherit;font-size:14px;line-height:1.25;text-decoration:none;box-shadow:none;cursor:pointer}
.thai-forum .thai-forum-actions a:hover,.thai-forum-form .thai-forum-bb-tools button:hover,.thai-forum-form .thai-forum-source-actions button:hover{border-color:#126995;background:#edf7fc}
.thai-forum .thai-forum-action:focus-visible,.thai-forum-form button:focus-visible{outline:2px solid #006b9e;outline-offset:2px}
.thai-forum-form [hidden]{display:none!important}
.thai-forum-source{margin:8px 0 12px}
.thai-forum-source label{display:block;margin:6px 0;font-weight:600}
.thai-forum-bb-tools,.thai-forum-source-actions{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:8px 0}
.thai-forum-form #thai-forum-bbcode{width:100%;min-height:200px;padding:10px;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;resize:vertical;direction:ltr;font:15px/1.5 Consolas,monospace;color:#252525;background:#fff}
.thai-forum-form .thai-forum-bb-preview{margin:12px 0;padding:12px;border:1px solid #b4cbd8;background:#fff;overflow-wrap:anywhere}
.thai-forum .ucoz-forum-post img,.thai-forum .thai-forum-bb-preview img{max-width:100%;height:auto}
.thai-forum .ucoz-forum-post pre{white-space:pre-wrap;overflow-wrap:anywhere}
.thai-forum .ucoz-forum-post blockquote{margin:8px 0;padding:6px 12px;border-inline-start:3px solid #b4cbd8}
.thai-forum .ucoz-forum-post blockquote cite{display:block;font-weight:600}
.thai-forum-profile .userAvatar{max-width:96px;height:auto}
.thai-forum-form [data-bb-alert]{display:block;color:#9c1c0c}
@media(max-width:640px){.thai-forum .thai-forum-actions .thai-forum-action,.thai-forum-form .thai-forum-bb-tools button,.thai-forum-form .thai-forum-source-actions button{min-height:40px}}

.thai-forum .threadpage-posts-table .postTable td.thai-forum-controls{display:table-cell!important}

/* The same card surrounds imported messages, WordPress replies and topic openings. */
.thai-forum .threadpage-posts-table tr.thai-forum-post {
  display: block;
  margin-top: 20px;
  padding: 20px;
  background-color: #fafafa;
  box-shadow: 1px 1px 4px -1px #000;
}
.thai-forum .thai-forum-post-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}
.thai-forum .thai-forum-post-footer > .thai-forum-actions {
  display: contents;
}
.thai-forum .thai-forum-post-footer .goOnTop {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin-inline-start: auto;
}
.thai-forum .thai-forum-post-footer .thai-forum-action {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
}
.thai-forum img.thai-forum-button-image {
  display: inline-block;
  width: 100px;
  height: 26px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: middle;
  object-fit: contain;
}
.thai-forum .thai-forum-action:hover img { filter: brightness(1.12); }
.thai-forum .thai-forum-action[data-forum-action="copy"] span {
  padding: 3px 9px;
  border: 1px solid #32638a;
  border-radius: 3px;
  background: linear-gradient(#267eae, #073456 58%, #06223e);
  color: #fff;
  font: bold 12px/1.4 Arial, sans-serif;
  text-shadow: 0 1px 1px #102632;
}
.thai-forum .ucoz-forum-post { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .thai-forum .threadpage-posts-table tr.thai-forum-post { margin-inline: 4px; }
  .thai-forum .thai-forum-post-footer .thai-forum-action { min-height: 44px; }
}
.thai-forum-video-dialog {
  box-sizing: border-box;
  width: min(900px, 94vw, calc((100vh - 80px) * 16 / 9));
  width: min(900px, 94vw, calc((100dvh - 80px) * 16 / 9));
  max-width: 94vw;
  max-height: 96vh;
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 6px;
  background: #111;
  color: #fff;
}
.thai-forum-video-dialog::backdrop { background: rgb(0 0 0 / 78%); }
.thai-forum-video-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px 0 14px; }
.thai-forum-video-dialog .thai-forum-video-bar a { color: #fff; }
.thai-forum-video-bar form { margin: 0; }
.thai-forum-video-bar button {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #fff;
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}
.thai-forum-video-bar button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.thai-forum-video-dialog iframe { display: block; width: 100%; height: auto; aspect-ratio: 16/9; border: 0; }

.thai-forum .thai-forum-topic-description {
  margin-top: 4px;
  font-weight: normal;
  text-transform: none;
  overflow-wrap: anywhere;
}
.thai-forum .thai-forum-author-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
