/*
 * Сезонные события на сайте (docs/events.md): только свои классы hw-*, общие блоки страниц не трогаем
 * (правило владельца для сайта, 22.10.2026). Хэллоуин — оранжевые тыквы и фиолетовый акцент.
 */

/* Тыква у логотипа: ведёт на /halloween.php. */
.ch_gamebar .hw-logo-pumpkin {
  float: left;
  margin: -2px 14px 0 -12px;
  line-height: 0;
}
.ch_gamebar .hw-logo-pumpkin img {
  transition: transform .2s ease;
}
.ch_gamebar .hw-logo-pumpkin:hover img {
  transform: rotate(-12deg) scale(1.1);
}
@media (max-width: 767px) {
  .ch_gamebar .hw-logo-pumpkin {
    margin: 0 8px 0 -6px;
  }
  .ch_gamebar .hw-logo-pumpkin img {
    width: 26px;
    height: 26px;
  }
}

/* Плашка праздника: над картой, над полем охоты, итог «забрать тыкву», «сладость или гадость». */
.hw-note {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff3e6;
  border: 1px solid #f0a25a;
  border-radius: 4px;
  margin: 10px 0;
  padding: 10px 14px;
}
.hw-note[hidden] {
  display: none;
}
.hw-note p {
  margin: 0;
  font-size: 14px;
  line-height: 19px;
  color: #292929;
}
.hw-note p + p {
  margin-top: 4px;
}
.hw-note .hw-note-title {
  font-weight: bold;
  color: #b4530a;
}
.hw-note-icon {
  flex: none;
}
.hw-note-error {
  background: #f7f1fb;
  border-color: #b49ac8;
}
.hw-note-pat {
  text-align: left;
  margin: 16px 0;
}

.hw-muted {
  color: #777;
  font-size: 13px;
}

/* Главная: блок праздника над профилем. */
.hw-home {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #3b2357;
  border-radius: 4px;
  color: #fff;
  margin: 20px 0;
  padding: 12px 18px;
}
.hw-home h2 {
  color: #ffb066;
  font-size: 18px;
  font-weight: bold;
  line-height: 22px;
  margin: 0 0 4px 0;
}
.hw-home p {
  color: #fff;
  font-size: 14px;
  line-height: 19px;
  margin: 0;
}
.hw-home-body {
  flex: 1;
}
.hw-home-icon {
  flex: none;
}
.hw-home-button {
  flex: none;
}
@media (max-width: 767px) {
  .hw-home {
    flex-wrap: wrap;
  }
  .hw-home-body {
    flex-basis: calc(100% - 62px);
  }
  .hw-home-button {
    margin-left: 62px;
  }
}

/* Карта: районы с тыквой и блок в колонке района. */
#map ul li.hw-pumpkin {
  position: relative;
}
#map ul li.hw-pumpkin::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  background: url("/img/events/map-pumpkin.png") center / contain no-repeat;
  pointer-events: none;
}
.hw-region {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff3e6;
  border: 1px solid #f0a25a;
  border-radius: 4px;
  margin: 8px 0 12px 20px;
  padding: 10px 12px;
}
.hw-region p {
  margin: 0 0 6px 0;
  font-size: 13px;
  line-height: 18px;
}
.hw-region form {
  margin: 0;
}
.hw-map-hint {
  margin: 10px 0 10px 20px;
}

/* Профиль и главная: рамка «Хэллоуин» вокруг аватара (Event\Adornments::framedAvatar). Аватар — кругом в середине
   кольца, кольцо — картинкой поверх. */
.hw-framed {
  display: block;
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 0 20px 0;
}
.hw-framed::after {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  bottom: -12px;
  left: -12px;
  background: center / contain no-repeat;
  pointer-events: none;
}
.hw-framed-halloween::after {
  background-image: url("/img/events/frame-halloween.png");
}
div.profile div.avatar .hw-framed img.avatar {
  width: 66%;
  height: 66%;
  margin: 17%;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  object-fit: cover;
  background: #fff;
}
@media (max-width: 767px) {
  div.profile div.avatar .hw-framed {
    width: 60%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 12px auto 17px;
  }
  div.profile div.avatar .hw-framed img.avatar {
    width: 66%;
    height: 66%;
    max-width: none;
    margin: 17%;
  }
}

/* Значки за события рядом с именем кота. */
.hw-badges {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}
.hw-badge {
  vertical-align: middle;
  margin-right: 2px;
}

/* /halloween.php */
.hw-page .hw-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #3b2357;
  border-radius: 4px;
  color: #fff;
  margin: 10px 0 20px;
  padding: 14px 20px;
}
.hw-page .hw-hero p {
  margin: 0;
  color: #fff;
}
.hw-page .hw-balance {
  font-size: 22px;
  line-height: 28px;
}
.hw-page .hw-balance b {
  color: #ffb066;
}
.hw-page .hw-timer {
  font-size: 14px;
  opacity: .9;
}
.hw-block {
  margin: 0 0 24px 0;
}
.hw-block h2 {
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 10px 0;
}
.hw-where {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hw-where li {
  border-bottom: 1px solid #eee;
  padding: 8px 0;
  font-size: 14px;
  line-height: 19px;
}
.hw-table {
  width: 100%;
  border-collapse: collapse;
}
.hw-table th {
  text-align: left;
  font-size: 12px;
  color: #777;
  font-weight: normal;
  border-bottom: 1px solid #ddd;
  padding: 4px 6px;
}
.hw-table td {
  border-bottom: 1px solid #eee;
  padding: 8px 6px;
  vertical-align: middle;
}
.hw-table .hw-num {
  text-align: right;
  white-space: nowrap;
}
.hw-table .hw-action {
  text-align: right;
  white-space: nowrap;
}
.hw-offer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hw-offer img {
  flex: none;
  object-fit: contain;
}
.hw-offer small {
  color: #777;
}
.hw-price-icon {
  vertical-align: -3px;
}
.hw-form {
  display: inline;
  margin: 0;
}
.hw-count input {
  width: 56px;
  margin: 0 6px 0 4px;
}
.hw-quests,
.hw-rating {
  margin: 0;
  padding: 0;
}
.hw-quests {
  list-style: none;
}
.hw-quests li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}
.hw-quest-title {
  flex: 1 1 100%;
  font-size: 14px;
}
.hw-reward {
  color: #b4530a;
  font-weight: bold;
}
.hw-rating {
  list-style: decimal inside;
}
.hw-rating li {
  padding: 4px 0;
}
.hw-rating li.hw-self {
  font-weight: bold;
}
.hw-columns {
  display: flex;
  gap: 30px;
}
.hw-main {
  flex: 2 1 0;
  min-width: 0;
}
.hw-side {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 767px) {
  .hw-page {
    padding: 0 12px;
  }
  .hw-columns {
    flex-direction: column;
    gap: 0;
  }
  .hw-table thead {
    display: none;
  }
  .hw-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 6px 0;
  }
  .hw-table td {
    border-bottom: 0;
    padding: 4px 0;
  }
  .hw-table .hw-action {
    grid-column: 1 / -1;
    text-align: left;
    white-space: normal;
  }
  .hw-count {
    display: inline-block;
    margin-right: 6px;
  }
}
