/* Здесь вы напишете основную часть стилей страницы.

Будьте внимательны! Для корректной работы скриптов на этом сайте нужно, чтобы в HTML некоторые классы были названы особым образом:
✦ theme-dark — класс тёмной темы
✦ theme-light — класс светлой темы
✦ like-icon — для svg-иконки анимированного сердца
✦ card__like-button — для кнопки Like рядом с иконкой
✦ card__icon-button — для кнопки, оборачивающей иконку
✦ is-liked — для обозначения состояния лайкнутой иконки в виде сердца
✦ button__text — для обозначения текстового элемента внутри кнопки

Кроме этого, не меняйте HTML переключателя тем. Его разметка также гарантирует работу своего скрипта.

*/

.page {
  min-inline-size: 320px;
  min-block-size: 100dvb;
  font-family: var(--main-font), sans-serif;
  font-variation-settings: 'wght' var(--main-font-weight, 400);
  background-color: var(--bg-color, #fff);
  background-image: var(--bg-image);
  background-size: cover;
  background-attachment: fixed;
}

@supports (font-variation-settings: normal) {
  .page {
    font-family: var(--main-variable-font), sans-serif;
  }
}

.header {
  max-inline-size: 700px;
  min-block-size: 364px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 102px auto;
  background-color: var(--bg-color, #fff);
  border: 2px solid var(--accent-color, #000);
}

.header__logo {
  margin-block-start: 136px;
  font-family: var(--accent-font), fantasy;
  font-size: clamp(3.0625rem, 2.7104rem + 1.5023vw, 4.0625rem);
  color: var(--accent-color, #000);
}

.header__title {
  font-family: var(--accent-font), fantasy;
  font-size: clamp(0.875rem, 0.6769rem + 0.8451vw, 1.4375rem);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--accent-color, #000);
}

.theme-menu__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-left: 20px;
  color: var(--accent-color, #000);
}

.theme-menu__button {
  position: relative;
  background-color: transparent;
  border: none;
  font-family: var(--accent-font), fantasy;
  font-size: 14px;
  text-transform: uppercase;
}

.theme-menu__button:hover {
  opacity: 0.6;
  transition: opacity 0.3s;
}

.theme-menu__button:focus {
  outline: none;
  opacity: 0.6;
}

.theme-menu__button:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.article {
  max-inline-size: 700px;
  display: flex;
  flex-direction: column;
  margin: 0 auto 52px;
  background-color: var(--bg-color, #fff);
  border: 2px solid var(--accent-color, #000);
}

.article__title {
  min-block-size: 31px;
  margin-inline-start: 10px;
  margin-block-start: 3px;
  font-size: 18px;
  font-variation-settings: 'wght' var(--title-font-weight, 700);
  color: var(--accent-color, #000);
}

.article__container_img {
  position: relative;
  border-top: 2px solid var(--accent-color, #000);
  border-bottom: 2px solid var(--accent-color, #000);
  line-height: 0;
}

.article__img {
  max-inline-size: 696px;
  inline-size: 100%;
  max-block-size: 696px;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
}

.img-nature {
  filter: invert(0.7);
}

.img-leaf {
  filter: grayscale(1) invert(1);
}

.img-thinking {
  filter: brightness(40%);
}

.img-bike {
  filter: saturate(200%);
}

.img-dog {
  filter: hue-rotate(30deg);
}

.img-camera {
  filter: contrast(120%);
}

.img-abuss {
  filter: grayscale(1);
}

.img-car {
  filter: hue-rotate(180deg) saturate(110%);
}

.article__label {
  position: absolute;
  z-index: 1;
  top: 27px;
  right: 25px;
  color: var(--accent-color, #000);
  font-family: var(--accent-font), fantasy;
  font-size: 14px;
  opacity: 0.5;
  text-shadow: -1px 0 var(--bg-color, #fff), 1px 0 var(--bg-color, #fff), 0 -1px var(--bg-color, #fff);
  mix-blend-mode: hard-light;
}

@supports ((text-stroke: 1px var(--bg-color)) or (-webkit-text-stroke: 1px var(--bg-color))) {
  .article__label {
    -webkit-text-stroke: 1px var(--bg-color, #fff);
    text-stroke: 1px var(--bg-color, #fff);
    text-shadow: none;
  }
}

.article__text {
  max-inline-size: 646px;
  margin: 20px 25px 8px;
  font-size: 18px;
  color: var(--accent-color, #000);
}

.article__container_buttons {
  display: flex;
  align-self: flex-end;
  gap: 2px;
  margin-inline-end: 25px;
  margin-block: 20px 25px;
}

.button {
  position: relative;
  background-color: var(--bg-color, #fff);
  border: 2px solid var(--accent-color, #000);
}

.button:focus {
  outline: none;
}

.card__icon-button {
  background-color: transparent;
  border: 2px solid transparent;
  height: 38px;
}

.button__scale-hover {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__like-button {
  min-inline-size: 130px;
  min-block-size: 38px;
}

.button__text {
  position: relative;
  font-family: var(--accent-font), fantasy;
  font-size: 14px;
  color: var(--button-text-color, #fff);
  mix-blend-mode: difference;
}

.floppy {
  position: relative;
  inline-size: 21px;
  block-size: 21px;
  margin-inline-end: 8px;
  color: var(--button-text-color, #fff);
  mix-blend-mode: difference;
}

.footer__button-save {
  min-inline-size: 335px;
  min-block-size: 51px;
  margin: 0 auto;
  margin-block-end: 105px;
}

.dialog {
  max-inline-size: 357px;
  inline-size: 100%;
  border: 2px solid var(--accent-color, #000);
  background-color: var(--bg-color, #fff);
}

.dialog:not([open]) {
  pointer-events: none;
  opacity: 0;
} 

.dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.75)
}

.dialog__container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-block: 30px;
}

.dialog__text {
  max-inline-size: 234px;
  font-family: var(--accent-font), fantasy;
  font-size: 14px;
  text-transform: uppercase;
  line-height: 21px;
  color: var(--accent-color, #000);
}

.dialog__button {
  min-inline-size: 293px;
  min-block-size: 38px;
  margin: 0 auto;
  text-transform: uppercase;
}

@media (max-width: 375px) {
  .header {
    inline-size: 100vw;
    min-block-size: 323px;
  }
  .header__logo {
    margin-block-start: 120px;
  }
  .article {
    inline-size: 100vw;
  }
  .article__title {
    max-inline-size: 351px;
    padding-block-end: 5px;
  }
  .article__img {
    max-inline-size: 371px;
    max-block-size: 371px;
  }
  .article__label {
    top: 30px;
    right: 12px;
  }
  .article__text {
    max-inline-size: 317px;
    margin-block: 25px 3px;
  }
  .footer__button-save {
    min-inline-size: 306px;
    min-block-size: 84px;
    flex-direction: column;
    gap: 8px;
  }
  .floppy {
    inline-size: 28px;
    block-size: 28px;
  }
  .dialog {
    max-inline-size: 341px;
  }
}