/* Likes and private account collections. */
.photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
}

.photo-open img,
.photo-open video {
  display: block;
  width: 100%;
}

.photo-open:focus-visible,
.reaction-btn:focus-visible,
#favorites-btn:focus-visible {
  outline: 2px solid var(--iris-deep);
  outline-offset: 3px;
}

.photo-actions,
.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.reaction-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-mist);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.reaction-btn::before {
  display: inline-block;
  margin-right: 5px;
  font-size: 1.05em;
  line-height: 0;
}

.reaction-btn[data-reaction="like"]::before {
  content: "♡";
}

.reaction-btn[data-reaction="like"][aria-pressed="true"]::before {
  content: "♥";
}

.reaction-btn[data-reaction="favorite"]::before {
  content: "☆";
}

.reaction-btn[data-reaction="favorite"][aria-pressed="true"]::before {
  content: "★";
}

.reaction-btn:hover,
.reaction-btn[aria-pressed="true"] {
  border-color: var(--iris);
  background: rgba(123, 107, 138, 0.13);
  color: var(--iris-deep);
}

.reaction-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.lightbox-actions .btn {
  width: auto;
}

.lightbox-actions .reaction-btn {
  border-color: rgba(244, 246, 242, 0.7);
  background: rgba(244, 246, 242, 0.92);
  color: var(--ink-forest);
}

.lightbox-actions .reaction-btn:hover,
.lightbox-actions .reaction-btn[aria-pressed="true"] {
  border-color: var(--lamp-soft);
  background: var(--lamp-soft);
  color: var(--ink-forest);
}

#favorites-btn {
  white-space: nowrap;
}

@media (max-width: 860px) {
  body.mode-home .site-header {
    display: flex;
    justify-content: space-between;
  }

  .header-auth {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .site-header {
    gap: 8px;
    padding-inline: 12px;
  }

  .header-auth {
    gap: 4px;
  }

  .header-auth .btn {
    width: auto;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  #auth-btn {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lightbox-actions .btn {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reaction-btn {
    transition: none;
  }
}
