/* the PLANNERS.inc — custom styles beyond Tailwind CDN utilities */

html {
  scroll-behavior: smooth;
}

/* ============================================================
   DESIGN_RENEWAL_2026: 공개 사이트 전용 컬러 토큰.
   (대표님 지시서 기준 — 밝은 화이트/라이트그레이 + 청록 포인트)
   관리자 화면(AdminLayout)은 이 토큰을 사용하지 않으며 기존 톤 유지.
   ============================================================ */
:root {
  --tp-bg: #f4f4f2;
  --tp-title: #3f4650;
  --tp-body: #4a4f57;
  --tp-secondary: #8a9199;
  --tp-accent: #7fb6be;
  --tp-divider: #d9ddd8;
  --tp-footer-bg: #5a5a5a;
  --tp-footer-text: #f0f0f0;
}

/* ---- Public site: descriptive categories and interactive year filters ---- */
.project-category {
  padding: 4px 2px;
  margin-right: 1.25rem;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--tp-secondary);
}

.filter-year-btn {
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid transparent !important;
  border-radius: 0 !important;
  padding: 4px 2px !important;
  margin-right: 1.25rem;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  color: var(--tp-secondary) !important;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.filter-year-btn:hover {
  color: var(--tp-title) !important;
}
.filter-year-btn.active {
  color: var(--tp-title) !important;
  border-bottom-color: var(--tp-accent) !important;
}

/* Tailwind CDN (JIT via CDN script) does not ship the official line-clamp
   plugin, so provide a manual fallback for the classes we use. */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Mobile nav ---- */
#mobile-nav.flex {
  display: flex;
}

/* ---- Admin sidebar (mobile) ---- */
#admin-sidebar.flex {
  display: flex;
}

/* ---- Homepage: selected exhibitions, followed by the complete archive ---- */
#home-highlights { padding-top: 32px; }
.highlights-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 16px; font-size: 12px; color: var(--tp-secondary);
}
.highlights-heading > p { text-transform: uppercase; letter-spacing: .13em; }
.highlights-heading a { color: var(--tp-body); }
.highlights-heading a span { margin-left: 8px; }
.highlight-slides { display: grid; touch-action: pan-y; }
.highlight-slide {
  grid-area: 1 / 1; min-width: 0; opacity: 0; pointer-events: none;
  transition: opacity .8s ease;
}
.highlight-slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
.highlight-project { display: block; }
.highlight-image { position: relative; aspect-ratio: 2.15; overflow: hidden; background: #e9ebe8; }
.highlight-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.highlight-open {
  position: absolute; bottom: 18px; right: 20px; color: #fff; font-size: 26px;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: #26303680; border: 1px solid #ffffff70;
}
.highlight-caption { padding: 20px 0 0; }
.highlight-meta { font-size: 11px; color: var(--tp-secondary); letter-spacing: .05em; }
.highlight-meta span { margin: 0 6px; }
.highlight-caption h2 { margin-top: 6px; font-size: clamp(19px, 2vw, 26px); font-weight: 500; line-height: 1.5; color: var(--tp-title); word-break: keep-all; }
.highlight-location { margin-top: 7px; font-size: 12px; color: var(--tp-secondary); }
.highlight-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 15px; }
.highlight-position, .highlight-actions, .highlight-dots { display: flex; align-items: center; }
.highlight-position { gap: 20px; }
.highlight-counter { white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--tp-title); }
.highlight-total { color: var(--tp-secondary); }
.highlight-dot { width: 32px; min-height: 44px; display: grid; place-items: center; cursor: pointer; }
.highlight-dot span { display: block; width: 22px; height: 2px; background: var(--tp-divider); transition: background .25s; }
.highlight-dot.is-active span { background: var(--tp-accent); }
.highlight-actions button { min-width: 44px; min-height: 44px; color: var(--tp-title); cursor: pointer; }
#highlight-prev, #highlight-next { font-size: 21px; }
#highlight-play { min-width: 65px; font-size: 11px; color: var(--tp-secondary); }
.highlight-actions button:hover, .highlights-heading a:hover, .home-archive-heading a:hover { color: #508b94; }
#home-highlights :focus-visible, .home-archive-heading a:focus-visible { outline: 2px solid #508b94; outline-offset: 4px; }
#home-portfolio-section { padding-top: 68px; scroll-margin-top: 78px; }
.home-archive-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 24px; margin-bottom: 28px; border-top: 1px solid var(--tp-divider); }
.home-archive-heading p { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--tp-secondary); }
.home-archive-heading h2 { margin-top: 6px; font-size: 23px; font-weight: 500; color: var(--tp-title); }
.home-archive-heading a { font-size: 12px; white-space: nowrap; }
.home-archive-heading a span { margin-left: 8px; }
.archive-poster-image {
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.archive-poster-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}
.home-project-card:hover h3 { color: #508b94 !important; }
.project-online-exhibition { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 36px; }
.online-exhibition-link { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 44px; padding: 10px 18px; border: 1px solid #7ba3a8; color: #3e737b; font-size: 14px; line-height: 1.5; transition: background-color .2s, border-color .2s; }
.online-exhibition-link:hover { background-color: #e8efed; border-color: #3e737b; }
.online-exhibition-link:focus-visible { outline: 2px solid #3e737b; outline-offset: 4px; }
.online-exhibition-note { color: #687078; font-size: 12px; line-height: 1.6; }
@media (max-width: 639px) {
  #home-highlights { padding-top: 24px; }
  .highlights-heading { font-size: 10px; margin-bottom: 12px; }
  .highlight-image { aspect-ratio: 4 / 3; }
  .highlight-open { right: 12px; bottom: 12px; width: 34px; height: 34px; font-size: 21px; }
  .highlight-caption { padding-top: 16px; }
  .highlight-caption h2 { font-size: 19px; }
  .highlight-location { font-size: 11px; }
  .highlight-position { gap: 8px; }
  .highlight-dot { width: 21px; }
  .highlight-dot span { width: 15px; }
  .highlight-actions button { min-width: 36px; }
  #highlight-play { min-width: 58px; }
  #home-portfolio-section { padding-top: 42px; }
  .home-archive-heading h2 { font-size: 20px; }
  .home-archive-heading a { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .highlight-slide { transition: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 359px) {
  .highlight-controls { gap: 8px; }
  .highlight-dot { width: 16px; }
  .highlight-dot span { width: 10px; }
  .highlight-actions button { min-width: 32px; }
  #highlight-play { min-width: 50px; }
}

/* ============================================================
   Admin console only (below this line). None of these rules apply
   to the public site — they only affect elements rendered inside
   AdminLayout (dropzones, drag handles, sortable lists, previews).
   ============================================================ */

.upload-dropzone.dragover,
.upload-dropzone-multi.dragover {
  border-color: #dc2626 !important;
  background-color: #fef2f2 !important;
}

.drag-handle {
  touch-action: none;
}

.sortable-ghost {
  opacity: 0.4;
}

.sortable-chosen {
  background-color: #fef2f2 !important;
}

.gallery-item {
  transition: box-shadow 0.15s ease;
}

.upload-progress-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #737373;
}

.upload-progress-item .bar-track {
  flex: 1;
  height: 6px;
  background: #e5e5e5;
}

.upload-progress-item .bar-fill {
  height: 6px;
  background: #dc2626;
  width: 0%;
  transition: width 0.1s ease;
}

#preview-frame-wrap.preview-mobile {
  width: 390px !important;
  height: 700px !important;
}

#preview-frame-wrap.preview-pc {
  width: 100% !important;
  height: 600px !important;
}

.preview-toggle-btn.active-mode {
  background-color: #171717 !important;
  color: #fff !important;
}
.contact-map-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:18px 20px; border:1px solid var(--tp-divider); border-bottom:0; }
.contact-map-heading h2 { font-size:16px; font-weight:500; color:var(--tp-title); }
.contact-map-heading h2 span { margin-left:8px; font-size:10px; letter-spacing:.1em; color:var(--tp-secondary); }
.contact-map-heading p { margin-top:5px; font-size:12px; color:var(--tp-secondary); }
.contact-map-heading a { font-size:12px; color:#508b94; white-space:nowrap; }
.contact-map-heading a:focus-visible { outline:2px solid #508b94; outline-offset:4px; }

.contact-email-link:hover { text-decoration:underline; text-underline-offset:4px; }
.contact-email-link:focus-visible { outline:2px solid currentColor; outline-offset:4px; }
.contact-inquiry h3 { margin:0 0 12px; font-size:24px; font-weight:500; color:var(--tp-title); }
.contact-inquiry p { font-size:14px; line-height:1.8; color:var(--tp-body); }
.contact-inquiry-address { display:inline-block; margin:20px 0 24px; font-size:clamp(18px,4.5vw,26px); line-height:1.4; color:var(--tp-title); overflow-wrap:anywhere; }
.contact-inquiry-address:hover { text-decoration:underline; text-underline-offset:5px; }
.contact-inquiry-button { display:inline-flex; align-items:center; justify-content:center; gap:28px; min-height:48px; padding:12px 24px; background:#426f77; color:#fff; font-size:14px; transition:background .2s; }
.contact-inquiry-button:hover { background:#355b62; }
.contact-inquiry-address:focus-visible,.contact-inquiry-button:focus-visible { outline:2px solid #426f77; outline-offset:4px; }
.contact-inquiry .contact-inquiry-note { margin-top:16px; font-size:12px; color:var(--tp-secondary); }
