/* ==== SWIPER STORIES (PostPlunk) ==== */

/* Frame uses IG-style 9:16, scales with container */
.swiper {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 78vh;                 /* prevents full-screen takeover */
  background: #000;
  border: 2px solid var(--pp-black);
  border-radius: 8px;
  overflow: hidden;
}

/* Slides fill the frame */
.swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* Media: prefer cover for story feel; fall back to contain if you need padding */
.swiper-slide img,
.swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;                 /* or: contain */
  background: #000;
}

/* Progress bar */
.story-progress {
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: 4px;
  background: rgba(255,255,255,0.28);
  z-index: 3;
}
.story-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
}

/* Story header (avatar + handle) */
.story-header {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
}
.story-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #ccc;
  overflow: hidden;
}
.story-handle {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* ==== CALENDAR POST TYPE ICONS ==== */

/* Story: circular gradient dot */
.story-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff7a00, #ff0069, #d300c5);
}

/* Feed: blue square */
.feed-square {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #4a90e2;
}

/* Icon row within a calendar cell */
.calendar-icons {
  display: flex;
  gap: 3px;
  margin-top: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive tweaks */
@media (max-width: 720px) {
  .swiper { max-height: 70vh; border-radius: 6px; }
  .story-header { top: 8px; left: 8px; }
  .story-avatar { width: 24px; height: 24px; }
  .story-handle { font-size: 13px; }
}

/* ==== CALENDAR PICKER MODAL (old version) ==== */
#calendarPickerModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#calendarPickerContent {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
}

.calendar-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.calendar-picker-item {
  cursor: pointer;
  flex: 1 1 45%;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  transition: border-color .2s ease;
}
.calendar-picker-item:hover {
  border-color: #3897f0;
}

.calendar-picker-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==== TYPE PICKER (PostPlunk Bauhaus) ==== */
/* Backdrop reuse; only tweak z if needed */
.modal-content.typepicker { max-width: 520px; width: min(520px, 92vw); }

#typePickerModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 2000;
  align-items: center;
  justify-content: center;
    opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#typePickerModal.show { display: flex; }

/* When active */
#typePickerModal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Panel */
#typePickerModal .modal-content {
  width: min(520px, 92vw);
  background: var(--pp-white);
  border: 2px solid var(--pp-black);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--pp-black);
  padding: 20px;
}

/* Title */
#typePickerModal .type-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 1.25rem;
  margin-bottom: 14px;
  color: var(--pp-black);
}

/* Options */
#typePickerModal .type-options {
  display: grid;
  gap: 12px;
}

/* Base button */
#typePickerModal .type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid var(--pp-black);
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .1s ease, background .15s ease, color .15s ease;
}

/* Icon chip */
#typePickerModal .type-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid var(--pp-black);
  border-radius: 6px;
  background: var(--pp-white);
  font-size: 16px;
  line-height: 1;
}

/* Feed = blue, Story = yellow */
#typePickerModal .type-btn.feed {
  background: var(--pp-blue);
  color: var(--pp-white);
}
#typePickerModal .type-btn.story {
  background: var(--pp-yellow);
  color: var(--pp-black);
}

/* Hover/focus */
#typePickerModal .type-btn:hover,
#typePickerModal .type-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px var(--pp-black) inset;
}
#typePickerModal .type-btn.feed:hover { background: var(--pp-red); color: var(--pp-white); }
#typePickerModal .type-btn.story:hover { background: var(--pp-red); color: var(--pp-white); }

/* Cancel */
/* Softer “Cancel” for the type picker */
#typePickerModal .type-cancel {
  background: transparent;
  border: 0;
  color: var(--pp-muted);
  padding: 0.25rem 0;        /* minimal click target */
  font-weight: 500;
  text-transform: none;
  cursor: pointer;
}

#typePickerModal .type-cancel:hover {
  color: var(--pp-black);
  text-decoration: underline; /* subtle affordance */
}

#typePickerModal .type-cancel:focus-visible {
  outline: 2px solid var(--pp-blue);
  outline-offset: 2px;
}

#typePickerModal .type-actions {
  text-align: right;         /* keep it tucked to the right if desired */
}

/* Small screens */
@media (max-width: 480px) {
  #typePickerModal .modal-content { padding: 16px; }
  #typePickerModal .type-btn { padding: 12px; }
}

/* approved */
/* anchor for absolute children */
.post-card,
.calendar-day,
.swiper-slide,
.profile-grid-item {
  position: relative;
}
.post-card .approved-checkmark,
.calendar-day .approved-checkmark,
.swiper-slide .approved-checkmark,
.profile-grid-item .approved-checkmark {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 18px;
  border-radius: 50%;
  padding: 4px;
  z-index: 10;
  pointer-events: none;
}

.swiper-slide { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.story-header,
.story-progress,
.swiper-slide img,
.swiper-slide video { pointer-events: none; }
