/* Moderator Forum — dark forum theme. Author: m1shanyk */

.modf-forum-container {
  --modf-bg: #2e3142;
  --modf-bg-alt: #383c52;
  --modf-post-odd: #363a4e;
  --modf-post-even: #3c4159;
  --modf-border: #454a63;
  --modf-text: #d9dbe6;
  --modf-text-bright: #e7e9f2;
  --modf-muted: #8b90a8;
  --modf-muted2: #c3c7da;
  --modf-accent: #5b8def;
  --modf-accent-hover: #4a7bd9;
  --modf-error: #e0524a;
  --modf-success: #3f9d6e;
  --modf-avatar: #5b6080;
  --modf-stars: #f2c14e;

  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--modf-text);
  background: var(--modf-bg);
  max-width: 860px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--modf-border);
  line-height: 1.55;
  font-size: 15px;
  box-sizing: border-box;
}

/* attaches under an existing static fk-thread block — like the reference */
.modf-forum-container--attached {
  border-radius: 0 0 10px 10px;
  border-top: none;
}

.modf-forum-container *,
.modf-forum-container *::before,
.modf-forum-container *::after {
  box-sizing: border-box;
}

/* ---------- thread / posts ---------- */

.modf-thread {
  display: block;
}

.modf-post {
  display: flex;
  border-bottom: 1px solid var(--modf-border);
}

.modf-post--odd {
  background: var(--modf-post-odd);
}

.modf-post--even {
  background: var(--modf-post-even);
}

/* side column */
.modf-side {
  width: 160px;
  min-width: 160px;
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--modf-border);
}

.modf-av {
  background: var(--modf-avatar);
  width: 64px;
  height: 64px;
  border-radius: 6px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.modf-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--modf-text-bright);
  word-break: break-word;
}

.modf-rank {
  font-size: 11px;
  color: var(--modf-muted);
  margin: 5px 0;
}

.modf-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  color: #fff;
  background: var(--modf-avatar);
}

.modf-stats {
  margin-top: 10px;
  font-size: 11px;
  color: var(--modf-muted);
  text-align: left;
  line-height: 1.7;
  border-top: 1px solid var(--modf-border);
  padding-top: 8px;
}

.modf-stats b {
  color: #bfc3d6;
  float: right;
  font-weight: 600;
}

/* body column */
.modf-body {
  flex: 1;
  padding: 14px 18px;
  min-width: 0;
}

.modf-pinfo {
  font-size: 11.5px;
  color: var(--modf-muted);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--modf-border);
  padding-bottom: 7px;
}

.modf-num {
  color: var(--modf-muted);
  white-space: nowrap;
}

.modf-text .modf-para {
  margin: 0 0 10px;
  color: var(--modf-text);
  overflow-wrap: anywhere;
}

.modf-text .modf-para:last-child {
  margin-bottom: 0;
}

.modf-social-link {
  display: inline-block;
  color: var(--modf-accent);
  text-decoration: none;
  margin-top: 10px;
  font-size: 13px;
}

.modf-social-link:hover {
  text-decoration: underline;
  color: var(--modf-accent);
}

.modf-react {
  margin-top: 12px;
  font-size: 12px;
  color: var(--modf-muted);
  border-top: 1px solid var(--modf-border);
  padding-top: 8px;
}

/* ---------- form ---------- */

.modf-form-wrap {
  background: var(--modf-bg-alt);
  padding: 18px 20px;
  border-top: 1px solid var(--modf-border);
}

.modf-form-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.modf-form-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--modf-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex: 0 0 32px;
}

.modf-form-title {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.modf-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.modf-input {
  background: var(--modf-bg);
  border: 1px solid var(--modf-border);
  border-radius: 6px;
  color: var(--modf-text-bright);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.modf-input::placeholder {
  color: var(--modf-muted);
}

.modf-input:focus {
  border-color: var(--modf-accent);
}

.modf-input--error {
  border-color: var(--modf-error) !important;
}

.modf-input--name {
  flex: 1;
  min-width: 180px;
}

.modf-select-wrap {
  position: relative;
  width: 160px;
  flex: 0 0 160px;
}

.modf-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding-right: 34px;
  background-image: none;
  cursor: pointer;
}

.modf-select-arrow {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  pointer-events: none;
  width: 18px;
  height: 18px;
  color: var(--modf-muted2);
}

.modf-textarea {
  display: block;
  width: 100%;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.5;
  min-height: 100px;
}

.modf-input--social {
  display: block;
  width: 100%;
  margin-top: 12px;
}

/* captcha */
.modf-cap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.modf-cap-label {
  font-size: 13px;
  color: var(--modf-muted2);
}

.modf-cap-label b {
  color: var(--modf-text-bright);
}

.modf-cap-input {
  width: 70px;
  padding: 8px 10px;
  text-align: center;
}

.modf-cap-refresh {
  padding: 7px 10px;
  font-size: 13px;
  color: var(--modf-muted);
}

.modf-cap-msg {
  font-size: 11.5px;
  color: var(--modf-error);
}

/* footer row */
.modf-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.modf-counter {
  font-size: 11.5px;
  color: var(--modf-muted);
}

.modf-btns {
  display: flex;
  gap: 8px;
}

.modf-btn {
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.modf-btn--ghost {
  background: transparent;
  border: 1px solid var(--modf-border);
  color: var(--modf-muted2);
  font-weight: 600;
  padding: 9px 16px;
}

.modf-btn--ghost:hover {
  border-color: var(--modf-accent);
  color: var(--modf-text-bright);
  background: transparent;
}

.modf-btn--primary {
  background: var(--modf-accent);
  border: 1px solid var(--modf-accent);
  color: #fff;
  font-weight: 700;
  padding: 9px 20px;
}

.modf-btn--primary:hover {
  background: var(--modf-accent-hover);
  border-color: var(--modf-accent-hover);
}

.modf-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* messages */
.modf-message {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 6px;
  font-size: 13.5px;
}

.modf-message--success {
  background: rgba(63, 157, 110, 0.15);
  border: 1px solid var(--modf-success);
  color: #9fd8bc;
}

.modf-message--error {
  background: rgba(224, 82, 74, 0.12);
  border: 1px solid var(--modf-error);
  color: #f0a6a1;
}

/* loading */
.modf-loading {
  text-align: center;
  padding: 24px;
  color: var(--modf-muted);
}

/* ---------- carousel ---------- */

.modf-carousel {
  position: relative;
  padding: 20px 46px 44px;
}

.modf-carousel-viewport {
  overflow: hidden;
}

.modf-carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}

.modf-carousel-slide {
  padding: 0 8px;
  min-width: 0;
}

.modf-carousel-slide .modf-post {
  border: 1px solid var(--modf-border);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
}

.modf-post--compact .modf-side {
  width: 120px;
  min-width: 120px;
  padding: 12px 8px;
}

.modf-post--compact .modf-av {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.modf-post--compact .modf-body {
  padding: 12px 14px;
}

.modf-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--modf-bg-alt);
  border: 1px solid var(--modf-border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--modf-muted2);
  padding: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.modf-carousel-btn svg {
  width: 18px;
  height: 18px;
}

.modf-carousel-btn:hover {
  border-color: var(--modf-accent);
  color: var(--modf-text-bright);
  background: var(--modf-bg-alt);
}

.modf-carousel-btn--left {
  left: 8px;
}

.modf-carousel-btn--right {
  right: 8px;
}

.modf-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.modf-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--modf-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.modf-dot--active {
  background: var(--modf-accent);
}

/* ---------- responsive ---------- */
/* Как в эталоне: посты сохраняют двухколоночную вёрстку на любой ширине,
   у формы на мобильном уменьшается только padding. */

@media (max-width: 600px) {
  .modf-form-wrap {
    padding: 14px;
  }
}

@media (max-width: 768px) {
  .modf-carousel {
    padding: 16px 40px 44px;
  }
}

@media (max-width: 480px) {
  .modf-carousel {
    padding: 12px 34px 44px;
  }

  .modf-carousel-btn {
    width: 30px;
    height: 30px;
  }
}
