/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.main-container {
  display: grid;
  grid-template-columns: auto 600px minmax(290px, 350px);
  gap: 32px;
  max-width: 1250px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  align-items: flex-start;
}

.main-container--no-right {
  grid-template-columns: auto 1fr;
}

.left-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
}

.feed-column {
  width: 600px;
  min-height: 100vh;
  border-left: 1px solid oklch(96.7% 0.003 264.542);
  border-right: 1px solid oklch(96.7% 0.003 264.542);
  background-color: #ffffff;
}

.right-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
}

.calendar-widget {
  border: 1px solid #f3f4f6;
  width: 100%;
}

.calendar-nav-button {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.calendar-nav-button:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-grid--labels {
  margin-bottom: 8px;
}

.calendar-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
}

.calendar-cell {
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
  background-color: #fff;
  padding: 6px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  position: relative;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.calendar-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.calendar-cell--interactive {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.calendar-cell--interactive:focus-visible {
  outline: 2px solid #fb7185;
  outline-offset: 2px;
}

.calendar-cell--muted {
  color: #cbd5f5;
  background-color: #f8fafc;
  opacity: 0.7;
}

.calendar-cell--has-posts {
  background-color: oklch(94.1% 0.03 12.58);
  border-color: oklch(94.1% 0.03 12.58);
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.calendar-cell--selected {
  background-color: #fb7185 !important;
  border-color: #fb7185 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(251, 113, 133, 0.4);
}

.calendar-cell--selected .calendar-cell__dot {
  background-color: #fff;
}

.calendar-cell__number {
  font-size: 0.85rem;
  font-weight: 600;
}

.calendar-cell__dot {
  position: absolute;
  bottom: 6px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #fb7185;
}

.calendar-helper-text {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 12px;
  line-height: 1.4;
}

.monthly-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.monthly-gallery--full {
  grid-template-columns: repeat(4, 1fr);
}

.monthly-gallery__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.monthly-gallery__image {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  aspect-ratio: 1 / 1;
  position: relative;
  background: linear-gradient(135deg, #fff1f2, #fdf2f8);
}

.monthly-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.monthly-gallery__link:hover .monthly-gallery__image img {
  transform: scale(1.05);
}

.monthly-gallery__meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 6px;
  text-align: center;
}

.monthly-gallery__item {
  position: relative;
}

/* Post Stack - 호버 시 펼쳐지는 카드 */
.post-stack {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) rotate(3deg);
  transform-origin: bottom center;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 50;
  pointer-events: none;
}

.monthly-gallery__item:hover .post-stack {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.post-stack__card {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid oklch(71.4% 0.203 305.504);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  opacity: 0;
  animation: stackCardAppear 0.25s ease forwards;
  animation-delay: calc(var(--card-index) * 0.05s);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-stack__card:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 20;
}

.post-stack__card img,
.post-stack__card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes stackCardAppear {
  to {
    opacity: 1;
  }
}

.selected-post-placeholder {
  border: 1px dashed #e2e8f0;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: #94a3b8;
  background-color: #f8fafc;
}

@media (max-width: 1100px) {
  .main-container {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .feed-column {
    width: 100%;
    border-left: none;
    border-right: none;
  }

  .feed-column > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .right-sidebar {
    display: none;
  }

  .left-sidebar {
    display: none;
  }
}

/* Landing Page Animations */
@keyframes float1 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, -30px);
  }
}

@keyframes float2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-20px, 20px);
  }
}

@keyframes float3 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, -10px);
  }
}
