/*==========================================
🟩 [타입 D] 녹색 콜아웃 + 불렛 / 체크박스 트리거
PC & 모바일 가로 스와이프 레이아웃
==========================================*/

/* [기본 콜아웃 리셋] */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) {
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0px !important;
}

.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-callout__content {
  margin-inline-start: 0px !important;
  padding-left: 0px !important;
  margin-left: 0px !important;
}

/* [0] 불렛 및 체크박스 트리거 숨김 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-bulleted_list-block,
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) [class*="bullet"],
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-to-do {
  display: none !important;
}

/* [1] PC 버전: 가로 스와이프(Horizontal Scroll) 레이아웃 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-gallery {
  display: grid !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  grid-auto-flow: column !important;
  grid-auto-columns: calc((100% - 20px) / 3.2) !important; /* PC 화면에서 카드가 가로로 나열되도록 설정 */
  gap: 10px !important;
  background: transparent !important;
  overflow-x: auto !important;
  scrollbar-width: none !important; /* Firefox 스크롤바 숨김 */
  scroll-snap-type: x mandatory !important;
  padding-top: 0px !important;
  margin-top: 0px !important;
}

/* 갤러리 뷰 상단 헤더 숨김 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection__header-wrapper {
  display: none !important;
}

/* 크롬, 사파리, 앱 내 브라우저 스크롤바 숨김 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-gallery::-webkit-scrollbar {
  display: none !important;
}

.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-card {
  width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  position: relative !important;
  scroll-snap-align: start !important;
}

.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-card__content {
  background: transparent !important;
  padding: 5px 0px 10px 0px !important; /* 상단 패딩 조절 */
  display: flex !important;
  flex-direction: column !important;
  min-height: 80px !important;
}

/* 📌 [속성 간격 제어 핵심 구문] */

/* 1) 제목 속성(첫 번째 요소) 상단 5px, 하단 3px 강제 적용 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .notion-collection-card__content > .notion-collection-card__property:first-child {
  margin-top: 5px !important;
  margin-bottom: 3px !important;
}

/* 2) 제목 직후에 나오는 두 번째 속성(속성 1)의 상단 여백 초기화 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .notion-collection-card__content > .notion-collection-card__property:first-child + .notion-collection-card__property {
  margin-top: 0px !important;
}

/* 3) 일반 속성들의 기본 마진 간격 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .notion-collection-card__property:not(:first-child) {
  margin-bottom: 2px !important;
}

/* [2] 썸네일 6:4 고정 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-card__cover,
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-card__cover img {
  aspect-ratio: 6 / 4 !important;
  border-radius: 0px !important;
  object-fit: cover !important;
}


/*==========================================
🟩 모바일 영역 (스와이프 레이아웃 + 메이슨리 동일 속성 제어)
==========================================*/
@media (max-width: 768px) {
  /* 모바일 전용 카드 너비 비율 적용 */
  .notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-gallery {
    grid-auto-columns: calc((100% - 10px) / 1.1) !important; 
  }
  
  .notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    flex: none !important;
    scroll-snap-align: start !important;
  }

  /* 🟩 메이슨리 모바일 속성 스타일 통일 */

  /* [이름] 속성 스타일 */
  .notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .property-55686768 {
    margin-bottom: -7px !important;
  }

  /* [연도] 속성 스타일 */
  .notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .property-4f7b606b {
    margin-bottom: 6px !important;
  }

  /* [전시중] 속성 스타일 */
  .notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .property-6b7b6e74 * {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #37352F !important;
    -webkit-text-fill-color: #37352F !important;
  }

  /* [전시안함] 속성 스타일 */
  .notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .property-5d70643d {
    margin-bottom: -6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: #37352F !important;
    -webkit-text-fill-color: #37352F !important;
  }

  .notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)) .property-5d70643d * {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #37352F !important;
    -webkit-text-fill-color: #37352F !important;
  }

  /* 갤러리 위치 */
  .property-63795250 {
    margin-top: 0 !important;
  }
}

/* 마지막 카드(View all artworks) 제목 굵기 및 크기 변경 */
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-gallery > :last-child:has(.notion-property__title:contains("View all artworks")) .notion-collection-card__content > .notion-collection-card__property:first-child,
.notion-callout[class*="green"]:is(:has(.notion-bulleted_list-block), :has([class*="bullet"]), :has(.notion-to-do)):has(.notion-collection-gallery) .notion-collection-gallery > :last-child:has(.notion-property__title:contains("View all artworks")) .notion-collection-card__content > .notion-collection-card__property:first-child * {
  font-weight: 400 !important;
  font-size: 16px !important;
}

/* 마지막 카드(View all artworks) 제목: 체크박스 트리거 스와이프 갤러리(작품)만 */
.notion-callout[class*="green"]:has(.notion-to-do):has(.notion-collection-gallery) .notion-collection-gallery > :last-child .notion-collection-card__content > .notion-collection-card__property:first-child,
.notion-callout[class*="green"]:has(.notion-to-do):has(.notion-collection-gallery) .notion-collection-gallery > :last-child .notion-collection-card__content > .notion-collection-card__property:first-child * {
  font-weight: 400 !important;
  font-size: 16px !important;
}

/* 모바일: 14px 고정 */
@media (max-width: 768px) {
  .notion-callout[class*="green"]:has(.notion-to-do):has(.notion-collection-gallery) .notion-collection-gallery > :last-child .notion-collection-card__content > .notion-collection-card__property:first-child,
  .notion-callout[class*="green"]:has(.notion-to-do):has(.notion-collection-gallery) .notion-collection-gallery > :last-child .notion-collection-card__content > .notion-collection-card__property:first-child * {
    font-weight: 400 !important;
    font-size: 14px !important;
  }
}
