/* 
   Modern.css - Additions for Kinogo_Lalka 
   Includes CSS Variables, CSS Grid/Flexbox layouts, and removed inline styles.
*/

:root {
  --bg-color: #141414;
  --text-color: #a8a8a8;
  --link-color: #fff;
  --header-bg: #000;
  --panel-bg: #3f3f3f;
  --dropdown-top-bg: #585858;
}

body.lt-is-active {
  --bg-color: #fff;
  --text-color: #333;
  --link-color: #000;
  --header-bg: #f8f8f8;
  --panel-bg: #eaeaea;
  --dropdown-top-bg: #dcdcdc;
}

body {
  background: var(--bg-color) !important;
  color: var(--text-color);
}

.blk-header__bg {
  height: 33px;
  background-color: var(--header-bg);
  width: 100%;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 999999 !important;
  top: 0px;
}

/* Только основная обёртка страницы — не трогать .wrapper внутри DLEPush (уведомления) */
body > .wrapper {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh;
}

/* Flexbox Layout overriding floats */
@media (min-width: 769px) {
  .contener {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  body > .wrapper {
      display: flex;
      flex-direction: column;
  }
  .header { position: relative; order: 1; height: auto; margin: 0 0 20px 0; z-index: 1; }
  .contener { order: 2; width: 100%; }
  .footer { order: 3; }
  .leftblok_contener2.open { line-height: 160%; }
}

/* Mobile Dropdown Extracted Styles */
.dropdownn { display: block; width: 100%; max-width: 500px; margin: auto; }
.hidden { display: none; }
.dropdown__top {
    justify-content: space-between; display: flex; align-items: center; color: #fff; box-sizing: border-box;
    background-color: var(--dropdown-top-bg); cursor: pointer; transition: background .3s; will-change: background;
    font-weight: 700; text-shadow: 0 1px 0 #000; line-height: 45px; font-style: normal;
    padding-right: 31px; padding-left: 20px; border-bottom: 1px dashed #404040!important;
}
.dropdown__top:after {
    content: ""; font-size: 20px; transition: transform .5s; will-change: transform;
    width: 17px; height: 17px; background: url(../images/nom.webp) center center no-repeat;
}
.dropdown__btm {
    background: var(--panel-bg); color: #555; font-size: 15px; line-height: 1.4; box-sizing: border-box;
    padding: 15px; display: none;
}
.ww1 { justify-content: space-between; align-items: center; display: flex; margin-bottom: 5px; font-size: 13px; }

/* Не скрывать .search_login на мобилке: в шапке остаётся иконка open-search → desk_search-mobile (как в kinogo_new). */

/* Мобилка: тот же контекст позиционирования, что до объединения #story — форма под строкой «Вход», а не в flex шапки */
@media (max-width: 1000px) {
  .kinogo-toolbar-mobile {
    position: relative;
  }
  #kinogo-mobile-search-host:empty {
    display: none;
  }
  #kinogo-mobile-search-host:not(:empty) {
    width: 100%;
    box-sizing: border-box;
  }
  /*
   * Панель была привязана к узкому flex-блоку «Вход / лупа» — left/right давали 100% только его ширины.
   * fixed + 100vw: строка поиска на всю ширину экрана под шапкой.
   */
  .kinogo-toolbar-mobile #desk_search-mobile {
    position: fixed;
    inset-inline: 0;
    width: auto !important;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 4px 0;
    top: 48px;
    z-index: 10000001;
    box-sizing: border-box;
    float: none;
    background: #000;
  }
  /* Как раньше: поле и «ok» в одну линию (без колонки инпут/кнопка) */
  .kinogo-toolbar-mobile #desk_search-mobile form.lightsearch {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 10px;
    padding-right: 10px;
  }
  .kinogo-toolbar-mobile #desk_search-mobile .lightsearch-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: none;
    margin: 0 !important;
    vertical-align: middle;
  }
  .kinogo-toolbar-mobile #desk_search-mobile .lightsearch-btn {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 52px;
    margin: 0 !important;
    box-sizing: border-box;
  }
  .kinogo-toolbar-mobile #desk_search-mobile .lightsearch-reset[hidden] {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
  }
  .blk_header .search_login.kinogo-search-login--vacant {
    display: none !important;
  }
}

/* Fix mobile nav list */
ul.nav-list {
    position: relative;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--panel-bg);
    box-shadow: 3px 4px 5px rgb(0 0 0/75%);
    overflow-y: scroll;
    margin-top: 40px;
}
.nav-list > li {
    border-top: 1px solid #000;
}
.nav-list > li > a {
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 1px 1px #000;
    padding: 10px;
    text-align: center;
    display: block;
    text-decoration: none;
}

/* Styling content items */
textarea#comments {
    max-width: 99%;
    width: 99%;
}

/* Mobile login styles */
.mob_login > noindex {
    display: flex;
    line-height: 2;
    border-bottom: none;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
}
.mob_login > noindex, .mob_login > noindex a {
    font-size: 13px;
    text-transform: none;
    font-weight: 400;
}
.mob_login > noindex a {
    border: 0;
    color: #e0dfdc !important;
    text-decoration: underline;
    padding: 10px;
}
div#test { padding: 10px; }
.ligin_lab, .reg_lab {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    justify-content: space-between;
}
.ligin_lab label, .reg_lab label { font-size: 14px; }
#test .fbutton2 {
    color: silver;
    height: 37px;
    padding: 0 7px;
    border: 1px solid #404040;
    cursor: pointer;
    width: 100%;
}

/* Shortstory / Fullstory — kinogomy.net layout fix */
.shortstory,
.fullstory {
  width: 100%;
  box-sizing: border-box;
}

.content .icons {
  width: 100%;
  clear: both;
  overflow: hidden;
  border-left: 1px solid #404040;
}

.content .icons .kinogo-watch-link {
  float: left;
  padding: 4px 0 4px 20px;
  line-height: 0;
  text-decoration: none;
}

.content .icons .kinogo-watch-btn {
  display: inline-block;
  box-sizing: border-box;
  padding: 4px 7px 3px;
  background: #242424;
  border: 1px solid #404040;
  outline: 1px solid #111;
  line-height: 0;
  vertical-align: top;
}

.content .icons .kinogo-watch-btn img {
  display: block;
  width: 102px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.content .icons .kinogo-watch-link:hover .kinogo-watch-btn {
  background: #2f2f2f;
  border-color: #555;
}

.content .icons .kinogo-watch-date {
  float: right;
  padding: 7px 20px 19px 20px;
  line-height: 16px;
}

/* Fullstory Styles */
.full-poster {
    float: left;
    box-sizing: unset !important;
    margin-right: 15px;
    margin-bottom: 10px;
}
#contentss > a {
    float: right;
    margin-top: 5px;
    margin-right: 15px;
}

/* Icons & Badges */
.fav-icon {
    vertical-align: middle;
    border: none;
    cursor: pointer;
}

/* Закладки: лента как kinogo_new; позиция — из styles.min3 (.izbrannoe), класс обязателен на обёртке */
.kinogo-fav {
  width: 23px;
  height: 37px;
  flex: 0 0 23px;
}
.kinogo-fav a,
.kinogo-fav > span.kinogo-fav__guest {
  display: block;
  width: 23px;
  height: 37px;
  margin: 0;
  padding: 0;
  border: 0;
  text-decoration: none;
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  cursor: pointer;
  background: url(../dleimages/plus_fav.webp) no-repeat 50% 50%;
  background-size: 23px 37px;
  transition: opacity 0.2s ease;
  box-sizing: border-box;
}
.kinogo-fav > a:has(.fav-added) {
  background-image: url(../dleimages/minus_fav.webp);
}
.kinogo-fav a:hover,
.kinogo-fav > span.kinogo-fav__guest:hover {
  opacity: 0.85;
}
.kinogo-fav__ribbon-inner {
  display: block;
  width: 0;
  height: 0;
  overflow: hidden;
}
.kinogo-fav__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.kinogo-fav > a {
  position: relative;
}
.season-badge {
    position: absolute;
    bottom: 3px;
    right: 0;
    z-index: 2;
    display: flex;
}
.season-badge-arrow {
    border: 10px solid #8a212e;
    border-left-color: transparent;
    height: 0;
    width: 0;
}
.season-badge-text {
    background: #8a212e;
    color: #fff;
    height: 19px;
    padding: 1px 7px 0 0;
}

.openbox-link {
    text-decoration: underline;
    cursor: pointer;
    color: #fff;
}

.search-msg {
    padding: 0 10px;
}

/* Сброс конфликта: в тосте DLE класс .wrapper, а в styles.min3/modern для .wrapper — padding и min-height страницы */
#DLEPush {
  display: block !important;
  width: auto !important;
  max-width: 420px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: none !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  /* Выше фиксированной шапки (.blk-header__bg z-index: 999999) */
  z-index: 10000000 !important;
  top: 52px !important;
  right: 16px !important;
}
#DLEPush .DLEPush-notification.wrapper,
#DLEPush .DLEPush-notification.wrapper.push-success,
#DLEPush .DLEPush-notification.wrapper.push-warning,
#DLEPush .DLEPush-notification.wrapper.push-error {
  min-height: 0 !important;
  max-height: none !important;
  width: 400px !important;
  max-width: calc(100vw - 40px) !important;
  padding: 15px 30px 15px 60px !important;
  padding-top: 15px !important;
  display: grid !important;
  flex-direction: unset !important;
  flex: none !important;
  box-sizing: border-box !important;
}
#DLEPush .DLEPush-notification:empty {
  display: none !important;
}
@media screen and (max-width: 768px) {
  #DLEPush {
    max-width: none !important;
    left: 8px !important;
    right: 8px !important;
    top: max(52px, env(safe-area-inset-top, 0px)) !important;
  }
  #DLEPush .DLEPush-notification.wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Страница поиска (как kinogo_new2) */
.kinogo-search-page.service-page,
.service-page {
  float: left;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--panel-bg, #3f3f3f);
  color: var(--text-color, #a8a8a8);
  border: 1px solid #404040;
  border-radius: 0 0 4px 4px;
  margin-bottom: 12px;
}
.service-page__head {
  padding: 12px 16px;
  border-bottom: 1px solid #404040;
  background: #323232;
}
.service-page__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.service-page__body {
  padding: 16px 18px 22px;
}
#searchsuggestions a.kinogo-fsearch__row {
  display: block;
  text-decoration: none;
  padding: 12px 14px;
  border-bottom: 1px solid #444;
  color: inherit;
}
#searchsuggestions a.kinogo-fsearch__row:hover {
  background: #343434;
}
#searchsuggestions .kinogo-fsearch__excerpt {
  display: block;
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
  line-height: 1.35;
}

/* ========== Страница поиска (kinogo_lalka) ========== */

.kinogo-search-page__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kinogo-search-page__title-icon {
  flex-shrink: 0;
  opacity: 0.9;
  font-size: 1em;
  line-height: 1;
}

.kinogo-search-page__title-text {
  min-width: 0;
}

/*
 Блок «По вашему запросу…»: в engine.css у .message-info::before стоит position:absolute; left:-44px.
  Иконка оказывается слева от padding и при overflow у .content обрезается у границы с сайдбаром — визуально «уезжает в сторону».
  Для страницы поиска уводим иконку в обычный поток (flex).
*/
.kinogo-search-page__result-msg.message-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  overflow: visible;
  border-left-width: 4px;
  border-left-style: solid;
}

.kinogo-search-page__result-msg.message-info::before {
  position: static;
  left: auto;
  top: auto;
  margin: 0;
  width: auto;
  min-width: 1.15em;
  flex-shrink: 0;
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", sans-serif;
  font-weight: 900;
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--accent-2, #ffca64);
  -webkit-font-smoothing: antialiased;
  text-align: center;
}

.kinogo-search-page__result-msg {
  margin-top: 14px;
}

.search-compact {
  margin: 0 0 12px 0;
}

.search-compact__row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.search-compact__label {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  cursor: text;
}

.search-compact__label-text {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.search-compact #searchinput {
  width: 100% !important;
  display: block;
  box-sizing: border-box !important;
  background: var(--bg-color, #141414);
  border: 1px solid #404040;
  color: var(--link-color, #fff);
  border-radius: 6px;
  padding: 12px 14px;
  height: auto;
  line-height: 1.25;
  font-size: 15px;
}

.search-compact #searchinput:focus {
  outline: none;
  border-color: #6a6a6a;
  box-shadow: 0 0 0 1px rgba(255, 210, 125, 0.25);
}

.search-compact__btn {
  flex: 0 0 auto;
  height: auto;
  padding: 12px 22px;
  border-radius: 6px;
  border: 1px solid #404040;
  background: #242424;
  color: silver;
  cursor: pointer;
  font-weight: 700;
  box-sizing: border-box !important;
}

.search-compact__btn:hover {
  background-color: #383838;
}

.search-full-wrap .kinogo-search-page__hidden-table table,
.search-full-wrap .kinogo-search-page__hidden-table fieldset,
.search-full-wrap .kinogo-search-page__hidden-table br,
.search-full-wrap .kinogo-search-page__hidden-table #dosearch,
.search-full-wrap .kinogo-search-page__hidden-table #doclear,
.search-full-wrap .kinogo-search-page__hidden-table #dofullsearch {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .search-compact__row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-compact__btn {
    width: 100%;
  }
}

body.lt-is-active .search-compact #searchinput {
  background: #fff;
  color: #222;
  border-color: #ccc;
}

body.lt-is-active .search-compact__label-text {
  color: rgba(0, 0, 0, 0.55);
}

