/*
Theme Name: Twitch News
Theme URI: https://example.com/twitch-news
Author: Your Name
Author URI: https://example.com
Description: Dark, modern media/news WordPress theme inspired by Kotaku with Twitch-style purple accent. Built with Tailwind CSS.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twitch-news
*/

/*
This file intentionally keeps only the required theme header.
Compiled Tailwind CSS is enqueued from dist/main.css via functions.php.
Additional handcrafted styles below are loaded alongside dist assets.
*/

.mobile-action-bar {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0));
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.24s ease-out, opacity 0.24s ease-out, bottom 0.24s ease-out, border-radius 0.24s ease-out;
  pointer-events: auto;
}
.mobile-action-bar--hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.mobile-action-bar--at-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}
.mobile-action-bar__group--rating {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border-radius: 9999px;
  padding: 4px 8px;
  flex: 0 0 auto;
  min-width: fit-content;
  max-width: 120px;
}
.mobile-action-bar__vote {
  border: none;
  background: transparent;
  color: rgba(229, 231, 235, 0.85);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  padding: 0;
}
.mobile-action-bar__vote:hover {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(229, 231, 235, 1);
}
.mobile-action-bar__vote--active {
  background: rgba(145, 70, 255, 0.15);
  color: #e5deff;
}
.mobile-action-bar__rating-value {
  min-width: 20px;
  text-align: center;
  font-weight: 500;
  font-size: 13px;
  color: rgba(248, 250, 252, 0.9);
  padding: 0 4px;
}
.mobile-action-bar__rating-value:empty,
.mobile-action-bar__rating-value[data-score="0"] {
  color: rgba(148, 163, 184, 0.8);
}
.mobile-action-bar__button {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(243, 244, 246, 0.85);
  border-radius: 9999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 36px;
  position: relative;
}
.mobile-action-bar__button:hover {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(243, 244, 246, 1);
}
.mobile-action-bar__button:active,
.mobile-action-bar__vote:active {
  transform: scale(0.96);
}
.mobile-action-bar__icon {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-action-bar__label {
  font-size: 12px;
  line-height: 1.2;
}
.mobile-action-bar__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.mobile-action-bar__comments-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.mobile-action-bar__count {
  font-size: 12px;
  margin-left: 4px;
}
.mobile-action-bar__toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 24px);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 70;
}
.mobile-action-bar__toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.post-comments {
  margin-top: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.25);
  padding: 1.5rem;
}
.post-comments__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-comments__heading {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.post-comments__title {
  font-size: 1.2rem;
  font-weight: 600;
}
.post-comments__count {
  font-size: 0.9rem;
  color: rgba(248, 250, 252, 0.7);
}
.post-comments__toggle {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #f8fafc;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.post-comments__toggle:hover,
.post-comments__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}
.post-comments__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.post-comments--expanded .post-comments__body {
  max-height: 6000px;
  overflow: visible;
}

.post-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.2;
}
.post-rating-chip--positive {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.post-rating-chip--negative {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}
.post-rating-chip__icon {
  font-size: 0.85rem;
  line-height: 1;
}

#share-block.share-block--highlight {
  outline: 2px solid var(--tn-accent, #8b5cf6);
  outline-offset: 6px;
  border-radius: 18px;
  box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.12);
  transition: outline-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 768px) {
  .mobile-action-bar {
    display: flex;
  }
  .single .article-shell {
    padding-bottom: 0;
  }
  /* Отступ для подвала, чтобы его не закрывало мобильное меню */
  footer,
  .site-footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
  }
}

@media (min-width: 769px) {
  .mobile-action-bar {
    display: flex !important;
    position: sticky;
    bottom: 0;
    width: 100%;
    max-width: none;
    margin: 20px 0 0 0;
    padding: 8px 12px;
    background: rgba(38, 43, 48, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(10, 10, 10, 0.2);
    justify-content: flex-start;
    gap: 16px;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .mobile-action-bar__group--rating {
    background: rgba(255, 255, 255, 0.08);
  }
  .mobile-action-bar__button {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
  }
  .mobile-action-bar__button:active,
  .mobile-action-bar__vote:active {
    background: rgba(255, 255, 255, 0.15);
  }
}

.mobile-action-bar__button--comments {
  position: relative;
}

.mobile-action-bar__comments-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #10b981;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 999px;
  line-height: 1;
  min-width: 16px;
  text-align: center;
}

.mobile-action-bar__count {
  margin-left: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8fafc;
}
