/* Legacy styles from old project (z/styles)
   TODO: Gradually migrate these to component-scoped styles
   Kept here temporarily for quick integration */

/* ==================== Page Structure ==================== */

.page {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-content: center;
}

/* ==================== Decorative Blocks ==================== */

.block-fluid {
  width: var(--fluid-width);
  margin-inline: auto;
}

.block-decorated {
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  background-color: var(--block-background-color);
}

/* ==================== Text Utilities ==================== */

.text-mark {
  font-variation-settings:
    "wght" 505.81,
    "slnt" -1.98;
  text-shadow: 2px 2px 0 yellow;
}

/* ==================== Button Base ==================== */

.button {
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid black;
  overflow: hidden;
  color: currentColor;
  font-family: var(--font-accent);
  font-size: 14px;
  background: var(--block-background-color);
  cursor: pointer;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: white;
  transform: translateX(-100%);
  pointer-events: none;
  mix-blend-mode: difference;
}

.button:hover::before {
  transform: translateX(0%);
}

.button:hover {
  color: black;
  background: white;
}

.button:focus {
  outline: none;
}

.button:focus-visible {
  filter: drop-shadow(2px 2px currentColor);
}

/* ==================== Header ==================== */

.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
  margin: 100px auto;
  padding: var(--fluid-padding);
  font-family: var(--font-accent);
  line-height: 1;
  text-transform: uppercase;
  aspect-ratio: var(--header-aspect-ratio);
}

.header__title {
  font-size: var(--title-font-size);
}

.header__subtitle {
  font-size: var(--subtitle-font-size);
}

/* ==================== Card List ==================== */

.card-list {
  display: grid;
  gap: 50px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ==================== Card ==================== */

.card__title {
  padding: 5px 10px;
  font-variation-settings: "wght" var(--heading-weight);
}

/* ==================== Image Container ==================== */

.image-container {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
}

.image-responsive {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.image-overlay-text {
  position: absolute;
  top: 25px;
  right: 25px;
  display: inline-block;
  opacity: 50%;
  font-family: var(--font-accent);
  font-size: 14px;
  mix-blend-mode: hard-light;
}

.image-overlay-text-stroke {
  text-shadow:
    -1px 0 #fff,
    0 1px #fff,
    1px 0 #fff,
    0 -1px #fff;
}

@supports ((text-stroke: 1px #fff) or (-webkit-text-stroke: 1px #fff)) {
  .image-overlay-text-stroke {
    text-shadow: none;
    -webkit-text-stroke: 1px #fff;
  }
}

.card__text {
  display: grid;
  justify-content: center;
  align-content: center;
  gap: 10px;
  margin: 25px;
}

@media (max-width: 375px) {
  .image-overlay-text {
    right: 13px;
  }
}

/* ==================== Like Button Area ==================== */

.card__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0 25px 25px 0;
}

.card__icon-button {
  width: 38px;
  height: 38px;
  border: transparent solid 2px;
  padding: 0;
  background: none;
  cursor: pointer;
}

.card__icon-button:focus-visible {
  border: black solid 2px;
}

.card__icon-button:focus {
  outline: none;
}

.like-icon {
  width: 39px;
  height: 36px;
  cursor: pointer;
}

.card__like-button {
  width: 130px;
  height: 38px;
}

/* ==================== Save Button (legacy, may not be used in new design) ==================== */

.save {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 0 100px;
}

.save-button {
  display: flex;
  gap: 8px;
  width: 335px;
  height: 55px;
}

.save-icon {
  inline-size: 21px;
  block-size: 21px;
}

@media (max-width: 375px) {
  .save-button {
    flex-direction: column;
    width: 306px;
    height: 80px;
  }
  .save-icon {
    inline-size: 28px;
    block-size: 28px;
  }
}

/* ==================== Dialog (legacy) ==================== */

.save-dialog {
  box-sizing: border-box;
  width: 353px;
  border: none;
  padding: 30px 30px 25px;
  font-family: var(--font-accent);
  text-transform: uppercase;
  aspect-ratio: 353 / 193;
}

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

.save-dialog__container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  margin-inline: auto;
}

.save-dialog__content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.save-dialog-icon {
  flex-shrink: 0;
  inline-size: 39px;
  block-size: 39px;
}

.save-dialog__text {
  line-height: 1.5;
  text-align: left;
  max-inline-size: 234px;
  font-size: 14px;
  text-transform: uppercase;
}

.save-dialog__ok {
  width: 293px;
  height: 38px;
  margin-inline: auto;
  text-align: center;
}

body:has(dialog[open]) {
  padding-right: 15px;
  overflow: hidden;
}

@media (max-width: 375px) {
  .save-dialog {
    width: 341px;
    aspect-ratio: 1.785;
  }

  .save-dialog__ok {
    width: 100%;
    max-width: 293px;
  }
}

