/* ==========================================================================
   Galleries CSS - Customer Gallery Styles
   Design tokens imported from css/base/_variables.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   Gallery-specific CSS Variables (with fallbacks for backwards compatibility)
   -------------------------------------------------------------------------- */
:root {
  --gallery-bg: var(--color-background, #faf9f7);
  --gallery-card-bg: var(--color-surface, #ffffff);
  --gallery-text: var(--color-text-primary, #1a1a1a);
  --gallery-text-muted: var(--color-text-secondary, #6b7280);
  --gallery-accent: var(--color-accent-primary, #083b10);
  --gallery-border: var(--color-border, #e5e5e5);
  --gallery-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --gallery-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --gallery-radius: 0;
  --gallery-radius-lg: 2px;
}

/* --------------------------------------------------------------------------
   Gallery Page Base
   -------------------------------------------------------------------------- */
.gallery-page {
  min-height: 100vh;
  background-color: var(--gallery-bg);
  padding: 2rem 0 6rem;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .gallery-container {
    padding: 0 3rem;
  }
}

/* --------------------------------------------------------------------------
   Login Page
   -------------------------------------------------------------------------- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 7rem);
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--gallery-card-bg);
  border: 1px solid var(--gallery-border);
  padding: 3rem 2.5rem;
}

.login-card__title {
  font-family: 'Bodoni Moda', serif;
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--gallery-text);
  letter-spacing: 0.02em;
}

.login-card__messages {
  margin-bottom: 1.5rem;
}

.login-card__error {
  color: #dc2626;
  text-align: center;
  font-size: 0.875rem;
  padding: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-form__label {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gallery-text-muted);
}

.login-form__input-wrapper {
  position: relative;
}

.login-form__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--gallery-text-muted);
  opacity: 0.4;
  stroke-width: 1.5;
}

.login-form__input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 1rem;
  border: 1px solid var(--gallery-border);
  background: var(--gallery-card-bg);
  color: var(--gallery-text);
  transition: border-color 0.2s ease;
  letter-spacing: 0.02em;
}

.login-form__input:focus {
  outline: none;
  border-color: var(--gallery-accent);
}

.login-form__input::placeholder {
  color: var(--gallery-text-muted);
  opacity: 0.6;
}

/* Smaller password dots */
.login-form__input[type="password"] {
  font-size: 0.5rem;
  letter-spacing: 0.15em;
}

.login-form__input[type="password"]::placeholder {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* Login form CTA positioning */
.login-form__cta {
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Gallery Header
   -------------------------------------------------------------------------- */
.gallery-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-header--portfolio {
  margin-top: 4rem;
}

.gallery-header__title {
  font-family: 'Bodoni Moda', serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--gallery-text);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .gallery-header__title {
    font-size: 3rem;
  }
}

.gallery-header__subtitle {
  font-family: 'Work Sans', sans-serif;
  font-size: 1rem;
  color: var(--gallery-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.gallery-header__intro {
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: 2rem;
  color: var(--gallery-text-muted);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-header__full-story {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--gallery-text-muted);
}

/* --------------------------------------------------------------------------
   Admin Actions
   -------------------------------------------------------------------------- */
.gallery-admin-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.gallery-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--gallery-border);
  background: var(--gallery-card-bg);
  color: var(--gallery-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-btn:hover {
  border-color: var(--gallery-accent);
  color: var(--gallery-accent);
}

.gallery-btn--primary {
  background: var(--gallery-accent);
  border-color: var(--gallery-accent);
  color: #fff;
}

.gallery-btn--primary:hover {
  background: var(--color-accent-secondary);
  border-color: var(--color-accent-secondary);
  color: #fff;
}

.gallery-btn--danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.gallery-btn--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.gallery-btn__icon {
  width: 1rem;
  height: 1rem;
}

/* --------------------------------------------------------------------------
   Gallery Grid
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Gallery Card
   -------------------------------------------------------------------------- */
.gallery-card {
  position: relative;
  background: var(--gallery-card-bg);
  border: 1px solid var(--gallery-border);
  overflow: hidden;
  transition: all 0.3s ease;
}

.gallery-card:hover {
  background-color: var(--color-background);
}

.gallery-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-card__image-wrapper {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f3f4f6;
}

.gallery-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-card__image {
  transform: scale(1.03);
}

.gallery-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f3f4f6;
  color: var(--gallery-text-muted);
}

.gallery-card__placeholder-icon {
  width: 3rem;
  height: 3rem;
  opacity: 0.4;
}

.gallery-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.gallery-card__title {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
}

.gallery-card__content {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-card__date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gallery-text-muted);
}

.gallery-card__date-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.gallery-card__count {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  background: var(--gallery-bg);
  color: var(--gallery-text-muted);
  border: 1px solid var(--gallery-border);
}

.gallery-card__delete {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem;
  background: #dc2626;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.gallery-card:hover .gallery-card__delete {
  opacity: 1;
}

.gallery-card__delete:hover {
  background: #b91c1c;
}

.gallery-card__delete-icon {
  width: 1rem;
  height: 1rem;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Gallery Empty State
   -------------------------------------------------------------------------- */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}

.gallery-empty__text {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.5rem;
  color: var(--gallery-text-muted);
}

.gallery-empty__icon {
  margin-top: 1rem;
  width: 3rem;
  height: 3rem;
  color: var(--gallery-text-muted);
  opacity: 0.4;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-modal__content {
  width: 100%;
  max-width: 420px;
  background: var(--gallery-card-bg);
  border: 1px solid var(--gallery-border);
  padding: 2rem;
}

.gallery-modal__title {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--gallery-text);
}

.gallery-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gallery-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.5rem;
}

.gallery-modal__cancel {
  padding: 0.75rem 1.25rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.875rem;
  background: transparent;
  border: none;
  color: var(--gallery-text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.gallery-modal__cancel:hover {
  color: var(--gallery-text);
}

/* --------------------------------------------------------------------------
   Admin Info Box
   -------------------------------------------------------------------------- */
.gallery-admin-box {
  background: var(--gallery-bg);
  border: 1px solid var(--gallery-border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.gallery-admin-box__title {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gallery-accent);
  margin-bottom: 1rem;
}

.gallery-admin-box__row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.gallery-admin-box__label {
  font-weight: 500;
  color: var(--gallery-text);
}

.gallery-admin-box__value {
  color: var(--gallery-text-muted);
  font-family: 'SF Mono', Monaco, monospace;
}

.gallery-admin-box__note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--gallery-text-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Gallery Detail - Actions Bar
   -------------------------------------------------------------------------- */
.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--gallery-border);
  border-bottom: 1px solid var(--gallery-border);
  margin: 2rem 0;
}

.gallery-actions__count {
  font-size: 0.9375rem;
  color: var(--gallery-text-muted);
}

.gallery-actions__count strong {
  color: var(--gallery-text);
}

.gallery-actions__buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Image Grid (Masonry-style)
   -------------------------------------------------------------------------- */
.image-grid {
  column-count: 1;
  column-gap: 1rem;
}

@media (min-width: 640px) {
  .image-grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .image-grid {
    column-count: 3;
  }
}

.image-grid__item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 1rem;
  border: 1px solid var(--gallery-border);
  overflow: hidden;
  background: #f3f4f6;
}

.image-grid__img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.image-grid__item:hover .image-grid__img {
  transform: scale(1.02);
}

.image-grid__actions {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-grid__item:hover .image-grid__actions {
  opacity: 1;
}

.image-grid__checkbox {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

/* --------------------------------------------------------------------------
   Progress Overlay
   -------------------------------------------------------------------------- */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.progress-overlay.is-hidden {
  display: none;
}

.progress-overlay__content {
  background: var(--gallery-card-bg);
  padding: 2.5rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-image);
}

.progress-overlay__section {
  margin-bottom: 2rem;
}

.progress-overlay__section:last-child {
  margin-bottom: 0;
}

.progress-overlay__bar-wrapper {
  height: 6px;
  background: var(--gallery-border);
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 3px;
}

.progress-overlay__bar {
  height: 100%;
  background: var(--gallery-accent);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-overlay__bar.processing {
  background: #b8a48f; /* Different color for processing */
}

.progress-overlay__status {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gallery-text);
}

/* --------------------------------------------------------------------------
   Download Dropdown
   -------------------------------------------------------------------------- */
.download-dropdown {
  position: relative;
  display: inline-block;
}

.download-dropdown__menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  min-width: 200px;
  background: var(--gallery-card-bg);
  border: 1px solid var(--gallery-border);
  z-index: 50;
  display: none;
}

.download-dropdown__menu.is-active {
  display: block;
}

.download-dropdown__item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.875rem;
  text-align: left;
  color: var(--gallery-text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.download-dropdown__item:hover {
  background: var(--gallery-bg);
}

/* --------------------------------------------------------------------------
   Gallery Detail Layout
   -------------------------------------------------------------------------- */
.gallery-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

@media (min-width: 768px) {
  .gallery-detail {
    padding: 3rem 3rem 8rem;
  }
}

.gallery-detail__header {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-detail__title {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--gallery-text);
  margin-bottom: 0.5rem;
}

.gallery-detail__count {
  font-size: 0.9rem;
  color: var(--gallery-text-muted);
}

/* --------------------------------------------------------------------------
   Admin Panel
   -------------------------------------------------------------------------- */
.gallery-admin-panel {
  background: var(--gallery-bg);
  border: 1px solid var(--gallery-border);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.gallery-admin-panel__section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gallery-border);
}

.gallery-admin-panel__section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gallery-admin-panel__section:first-child {
  padding-top: 0;
}

.gallery-admin-panel__uploads {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .gallery-admin-panel__uploads {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.gallery-media-upload {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--gallery-card-bg);
  border: 1px solid var(--gallery-border);
}

.gallery-media-upload__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gallery-text);
}

.gallery-media-upload__status {
  font-size: 0.9rem;
  width: 1.25rem;
  text-align: center;
  color: var(--gallery-accent);
}

.gallery-btn--small {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
}

.gallery-admin-panel__title {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gallery-text-muted);
  margin-bottom: 1rem;
}

.gallery-admin-panel__settings {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--gallery-text);
  cursor: pointer;
}

.gallery-checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--gallery-accent);
}

.gallery-admin-panel__row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Upload Form
   -------------------------------------------------------------------------- */
.gallery-upload-form__row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.gallery-upload-form__select {
  padding: 0.625rem 1rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.875rem;
  border: 1px solid var(--gallery-border);
  background: var(--gallery-card-bg);
  color: var(--gallery-text);
  min-width: 150px;
}

.gallery-upload-form__file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--gallery-accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gallery-upload-form__file-btn:hover {
  background: var(--color-accent-secondary);
}

/* --------------------------------------------------------------------------
   Video Upload Status
   -------------------------------------------------------------------------- */
.gallery-video-upload {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
}

.gallery-video-upload label {
  color: var(--gallery-text);
  font-weight: 500;
}

.gallery-video-upload__status {
  color: var(--gallery-text-muted);
}

/* --------------------------------------------------------------------------
   Main Videos Section
   -------------------------------------------------------------------------- */
.gallery-videos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  margin-bottom: 5rem;
  width: 100%;
}

.gallery-video {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.gallery-video__title {
  padding: 0 0 2rem 0;
  font-family: var(--font-header, 'Bodoni Moda', serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--textPrimary, #1a1a1a);
  background: transparent;
  text-align: center;
}

.gallery-video__container {
  position: relative;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: #000;
}

.gallery-video__player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-video__play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 10;
  pointer-events: none;
}

@media (min-width: 768px) {
  .gallery-video__play-button {
    width: 50px;
    height: 50px;
  }
}

.gallery-video:hover .gallery-video__play-button {
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%) scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.gallery-video.is-playing .gallery-video__play-button {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.8);
}

.gallery-video__play-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (min-width: 768px) {
  .gallery-video__play-button svg {
    width: 32px;
    height: 32px;
  }
}

/* --------------------------------------------------------------------------
   Gallery Content (Masonry by Category)
   -------------------------------------------------------------------------- */
.gallery-content {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.gallery-category__title {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--gallery-text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gallery-border);
}

/* --------------------------------------------------------------------------
   Masonry Grid
   -------------------------------------------------------------------------- */
.gallery-masonry {
  width: 100%;
  display: block;
}

.gallery-masonry__item {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
  overflow: hidden;
}

@media (min-width: 640px) {
  .gallery-masonry__item {
    width: calc(50% - 0.5rem);
  }
}

@media (min-width: 1024px) {
  .gallery-masonry__item {
    width: calc(33.333% - 0.67rem);
  }
}

.gallery-masonry__media {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-masonry__item:hover .gallery-masonry__media {
  transform: scale(1.02);
}

.gallery-masonry__delete {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem;
  background: #dc2626;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
  color: #fff;
}

.gallery-masonry__item:hover .gallery-masonry__delete {
  opacity: 1;
}

.gallery-masonry__delete:hover {
  background: #b91c1c;
}

.gallery-masonry__star {
  position: absolute;
  top: 0.5rem;
  left: 2.75rem; /* Shifted from delete button */
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  color: #1a1a1a;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-masonry__star.is-active {
  opacity: 1;
  background: var(--gallery-accent);
  color: #fff;
}

.gallery-masonry__item:hover .gallery-masonry__star {
  opacity: 1;
}

.gallery-masonry__star:hover {
  transform: scale(1.1);
  background: #fff;
  color: var(--gallery-accent);
}

.gallery-masonry__star.is-active:hover {
  background: var(--color-accent-secondary);
  color: #fff;
}

.gallery-masonry__checkbox {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
}

.gallery-masonry__checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

/* Utility */
.is-hidden {
  display: none !important;
}

