.pv_wrapper {
  background: #222222;
  border-radius: 3px;
  min-height: 400px;
  max-height: 95vh;
  overflow: hidden;
  position: relative;
  display: flex;
  margin: 0;
  padding: 0;
  box-shadow: none;
  width: 100%;
}
.pv_wrapper::after {
  content: "";
  display: table;
  clear: both;
}
.pv_left {
  width: calc(100% - 310px);
  max-height: 900px;
  float: left;
}
.pv_photo {
  min-height: 400px;
  height: calc(100% - 48px);
  position: relative;
  text-align: center;
}
.pv_photo img {
  display: block;
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.pv_photo img[src$="loading_mini.gif"],
.photo_viewer_wrapper img[src$="loading_mini.gif"] {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}
.pv_bottom_info {
  padding: 17px 23px 14px;
  min-height: 18px;
}
.pv_bottom_info::after {
  content: "";
  display: table;
  clear: both;
}
.pv_bottom_info_left {
  float: left;
  margin-right: 10px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.pv_left .pv_bottom_actions {
  opacity: 1;
  transition: opacity 200ms linear;
  float: right;
}
.pv_left .pv_bottom_actions > a,
.pv_left .pv_bottom_actions > button,
.pv_left .pv_bottom_actions > span,
.pv_left .pv_bottom_actions > .pv_actions_more,
.pv_left a.pe_delete_selected_btn {
  color: #cccccc;
  opacity: 0.6;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}
.pv_left .pv_bottom_actions > a:hover,
.pv_left .pv_bottom_actions > span:hover,
.pv_left .pv_bottom_actions > .pv_actions_more:hover,
.pv_left .pv_bottom_actions span.shown,
.pv_left a.pe_delete_selected_btn {
  opacity: 1;
  text-decoration: none;
}

.pv_album_name {
  color: #cccccc;
  margin-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
  display: inline-block;
}
.pv_album_name:empty {
  display: none;
}
.pv_counter {
  color: #cccccc;
  opacity: 0.6;
  display: inline-block;
}
.pv_left .pv_bottom_actions .pv_actions_more::after {
  content: " ";
  display: inline-block;
  background-image: url(../icons/white_arrow.png);
  width: 8px;
  height: 6px;
  margin-left: 5px;
  opacity: 0.7;
}
#pv_actions_more_menu,
#pv_actions_more_menu_mobile {
  min-width: 230px;
}
#pv_actions_more_menu .pv_more_act_item,
#pv_actions_more_menu_mobile .pv_more_act_item {
  line-height: 16px;
  padding: 8px 25px 8px 10px;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
}
#pv_actions_more_menu .pv_more_act_item::before,
#pv_actions_more_menu_mobile .pv_more_act_item::before {
  content: " ";
  width: 18px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  background-image: url(../icons/pv_actions.png?3);
  background-repeat: no-repeat;
  background-position: 0 -157px;
}
@media (-webkit-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 192dpi) {
  #pv_actions_more_menu .pv_more_act_item::before,
  #pv_actions_more_menu_mobile .pv_more_act_item::before {
    background-image: url(../icons/pv_actions_2x.png?3), url(../icons/pv_actions.png?3);
    background-size: 18px 220px;
  }
}
#pv_actions_more_menu #pv_more_act_download::before,
#pv_actions_more_menu_mobile #pv_more_act_download::before {
  background-position: 0 0;
}
#pv_actions_more_menu #pv_more_act_place::before,
#pv_actions_more_menu_mobile #pv_more_act_place::before {
  background-position: 0 -20px;
}
#pv_actions_more_menu #pv_more_act_to_profile::before,
#pv_actions_more_menu_mobile #pv_more_act_to_profile::before {
  background-position: 0 -41px;
}
#pv_actions_more_menu #pv_more_act_to_dialog::before,
#pv_actions_more_menu #pv_more_act_as_title::before,
#pv_actions_more_menu_mobile #pv_more_act_to_dialog::before,
#pv_actions_more_menu_mobile #pv_more_act_as_title::before {
  background-position: 0 -60px;
}
#pv_actions_more_menu #pv_more_act_move_to::before,
#pv_actions_more_menu_mobile #pv_more_act_move_to::before {
  background-position: 0 -79px;
}
#pv_actions_more_menu #pv_more_act_pe::before,
#pv_actions_more_menu_mobile #pv_more_act_pe::before {
  background-position: 0 -98px;
}
#pv_actions_more_menu #pv_more_act_rotate_cw::before,
#pv_actions_more_menu_mobile #pv_more_act_rotate_cw::before {
  background-position: 0 -118px;
}
#pv_actions_more_menu #pv_more_act_rotate_ccw::before,
#pv_actions_more_menu_mobile #pv_more_act_rotate_ccw::before {
  background-position: 0 -137px;
}
#pv_actions_more_menu #pv_more_act_spam::before,
#pv_actions_more_menu_mobile #pv_more_act_spam::before {
  background-position: 0 -157px;
}
#pv_actions_more_menu #pv_more_act_spe::before,
#pv_actions_more_menu_mobile #pv_more_act_spe::before {
  background-position: 0 -197px;
}
#pv_actions_more_menu #pv_more_act_edit::before,
#pv_actions_more_menu_mobile #pv_more_act_edit::before {
  background-image: url(../icons/photo_edit_actions.png);
  background-position: 1px -65px;
}
@media (-webkit-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 192dpi) {
  #pv_actions_more_menu #pv_more_act_edit::before,
  #pv_actions_more_menu_mobile #pv_more_act_edit::before {
    background-image: url(../icons/photo_edit_actions_2x.png), url(../icons/photo_edit_actions.png);
    background-size: 16px 148px;
  }
}
.pv_right {
  width: 310px;
  max-height: 900px;
  background-color: var(--page-background-color);
  position: relative;
  float: right;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
}
.pv_right_scroll {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.pv_right_scroll > * {
  flex-shrink: 0;
}
.pv_right_scroll > .pv_desc {
  flex-shrink: 0;
  min-height: 0;
}
.pv_right .scroll_container {
  overflow-y: auto;
  height: 100%;
}
.ovk-photo-view .ovk-photo-details {
  margin: 0;
}
.pv_author_block {
  border-radius: 0 3px 0 0;
  padding: 13px 20px 10px 15px;
  background-color: var(--page-header-background-color);
  white-space: nowrap;
}
.pv_author_img img {
  border-radius: 50%;
  height: 40px;
  width: 40px;
  object-fit: cover;
}
.pv_author_info {
  padding: 3px 0 0 10px;
  overflow: hidden;
}
.pv_author_info a {
  font-weight: 500;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}
.pv_author_date {
  margin-top: 4px;
  color: var(--text-color--secondary);
}
.pv_right .post_full_like_wrap {
  margin: 0;
  padding: 10px 20px;
}
.pv_desc {
  position: relative;
  margin: 5px 15px 15px;
  line-height: 1.37em;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: none;
}
.pv_desc::-webkit-scrollbar {
  display: none;
}
.pv_can_edit {
  display: block;
  box-sizing: border-box;
  border-radius: 2px;
  padding: 5px 10px;
  margin: 0 -10px;
  color: var(--text-color);
  cursor: pointer;
}
.pv_desc .pv_can_edit,
.pv_desc .pv_cant_edit {
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv_desc .pv_desc_cont {
  min-height: 20px;
  overflow-wrap: break-word;
}
.pv_no_description {
  color: var(--text-color--secondary);
}
.pv_desc .pv_can_edit:hover,
.pv_desc .pv_can_edit:focus-visible {
  background: var(--page-background-color--secondary);
  text-decoration: none;
  outline: none;
}
.pv_desc .vkify_inline_edit_wrap {
  margin: 0;
}
.vkify_inline_edit_wrap {
  width: 100%;
}
.vkify_inline_edit_field {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-color--tertiary);
  border-radius: var(--button-border-radius);
  background: var(--page-background-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: inherit;
  line-height: 1.37em;
  padding: 5px 8px;
  margin: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  display: block;
}
textarea.vkify_inline_edit_field {
  min-height: 36px;
}
input.vkify_inline_edit_field {
  height: 28px;
}
.pv_comments {
  border-top: 1px solid var(--border-color);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pv_comments .page_block.comments {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.pv_comments .page_block.comments::-webkit-scrollbar {
  display: none;
}
.pv_comments .scroll_container {
  height: auto;
  overflow-y: visible;
}
.pv_comments .content_page_error {
  padding-block: 0;
}
.pv_comments .reply {
  padding: 0 10px;
}

.pv_photo :is(.pv_nav_left, .pv_nav_right) {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s linear;
  z-index: 2;
  width: 50%;
}
.pv_photo .pv_nav_right {
  right: 0;
  left: inherit;
}
.pv_photo :is(.pv_nav_left, .pv_nav_right) .pv_nav_btn {
  position: absolute;
  top: 0;
  height: 100%;
  width: 150px;
}
.pv_photo .pv_nav_left .pv_nav_btn {
  left: 0;
}
.pv_photo .pv_nav_right .pv_nav_btn {
  right: 0;
}
.pv_photo :is(.pv_nav_left, .pv_nav_right) .pv_nav_arrow {
  --nav-button-icon-height: 32px;
  --nav-button-icon-margin: calc(var(--nav-button-icon-height) * -1/2);
  height: var(--nav-button-icon-height);
  width: 20px;
  background-image: url(../icons/pv_layer_controls.png);
  background-position: 0-25px;
  position: absolute;
  top: 50%;
  margin-top: var(--nav-button-icon-margin);
}
.pv_photo .pv_nav_left .pv_nav_arrow {
  left: 30px;
}
.pv_photo .pv_nav_right .pv_nav_arrow {
  right: 30px;
  background-position: 0 -63px;
}
.pv_photo :is(.pv_nav_left, .pv_nav_right):hover {
  opacity: 0.5;
}

.pv_photo :is(.pv_nav_left, .pv_nav_right):has(.pv_nav_btn:hover) {
  opacity: 1;
}

.pv_right:empty {
  width: 0;
  border-left: none;
  transition: 0.2s;
}
.pv_left:has(+ .pv_right:empty) {
  width: 100%;
  transition: 0.2s;
}

.pv_right .wl_post_reply_form_forbidden {
  text-align: center;
  background: none;
}

.pv_right .page_block.comments:not(:has(> .scroll_container)) > .wl_post_reply_form_forbidden {
  border-top: 0;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* telegram photo viewer */
.ovk-photo-view-dimmer.with-roll {
  padding: 0; /* evidently not implemented properly yet */
}
.ovk-photo-view-dimmer.mode-tg .ovk-photo-view-window {
  min-width: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  top: 0;
  transform: none;
}
.ovk-photo-view-dimmer.mode-tg .photo_top_button {
  padding: 20px;
}
.ovk-photo-view-dimmer.mode-tg .pv_wrapper:not(.mobile-photo-modal) {
  min-width: 0;
  min-height: 0;
  max-height: none;
  height: 100%;
  padding: 0;
  background: transparent;
  border-radius: 0;
  flex-direction: row;
}
.ovk-photo-view-dimmer.mode-tg .pv_wrapper:not(.mobile-photo-modal) .pv_left {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  float: none;
}
.ovk-photo-view-dimmer.mode-tg .pv_wrapper:not(.mobile-photo-modal) .pv_photo {
  flex: 1;
  min-height: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ovk-photo-view-dimmer.mode-tg .pv_wrapper:not(.mobile-photo-modal) .pv_photo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}
.ovk-photo-view-dimmer.mode-tg .pv_wrapper .pv_right {
  display: none;
}
.ovk-photo-view-dimmer.mode-tg #photo_top_controls {
  right: 0;
  z-index: 1000;
}
.ovk-photo-view-dimmer.mode-tg .pv_album_name,
.ovk-photo-view-dimmer.mode-tg .pv_counter {
  color: #cccccc;
}
.private .pv_bottom_info {
  min-height: 0;
  padding: 0;
  transition: 0.2s;
}
.private .pv_photo {
  height: 100%;
  transition: 0.2s;
}

.pv_right .pr { 
  margin: auto;
}
.pv_right #standaloneCommentBox {
  border-bottom-left-radius: 0;
}
.pv_right .composer.model_content_textarea textarea,
.pv_right .composer.model_content_textarea .content-editable {
  margin-left: 40px;
  padding: 16px 15px 16px 12px;
}
.pv_right .post_field_user_link {
  left: 15px;
}
.pv_right .composer.model_content_textarea:not(.shown) #wallAttachmentMenu {
  padding: 15px 11px;
  position: static;
}
.pv_right .composer.model_content_textarea.shown .post-bottom-acts {
  padding: 15px;
}
.pv_wrapper #wallAttachmentMenu > a {
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  white-space: nowrap;
}

@keyframes slideRight {
  from {
    margin-right: 0;
    opacity: 1;
  }
  to {
    margin-right: -310px;
    opacity: 0;
  }
}
@keyframes fullWidth {
  from {
    width: calc(100% - 310px);
  }
  to {
    width: 100%;
  }
}
@keyframes fullHeight {
  from {
    min-height: 400px;
  }
  to {
    min-height: 800px;
  }
}
.private .pv_right {
  animation: slideRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}
.private .pv_left {
  animation: fullWidth 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}
.private .pv_wrapper {
  animation: fullHeight 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}
.private .pv_photo {
  display: flex;
  height: 100%;
}
.private .pv_bottom_info {
  display: none;
}

.viewer-deleted #_photoDelete {
  display: none;
}

.tippy-box[data-theme="dark vk"] {
  background: #333333;
  border: 0;
  color: #fff;
}
