/* static/css/postcard.css
   Post-card component styles and Reaction UI.
   Refactored for full-width content below avatar + mobile/desktop scaling.
*/

/* Post card baseline */
.post-card {
  border-bottom: 1px solid #eee;
  padding: 16px;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(2,6,23,0.06); }

.post-card .post-meta { font-size: 12px; color: #666; margin-bottom: 8px; }
.post-card .post-body { margin-bottom: 12px; }
.post-card .post-action-area { display:flex; gap:8px; align-items:center; position:relative; flex-wrap: wrap; }
.post-card .post-reaction-counts { margin-top: 6px; display:flex; gap:4px; flex-wrap: wrap; }

/* Reaction button */
.post-react-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  transition: transform .12s ease, background-color .12s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-react-btn:hover { transform: translateY(-2px); }
.post-react-btn.reacted { color: var(--brand-indigo); font-weight: 600; }

/* Reaction picker */
.reaction-picker {
  position: absolute;
  top: -64px;
  left: 0;
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.98);
  border-radius: 30px;
  box-shadow: 0 8px 28px rgba(10,10,10,0.12);
  transform-origin: bottom left;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: transform .18s cubic-bezier(.2,.9,.3,1), opacity .14s;
  z-index: 50;
}
.reaction-picker.visible { opacity: 1; transform: translateY(0) scale(1); }

.reaction-picker-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s, box-shadow .12s;
  font-size: 20px;
}
.reaction-picker-btn:hover { transform: translateY(-6px) scale(1.08); box-shadow: 0 6px 18px rgba(10,10,10,0.12); }
.reaction-picker-btn.selected { transform: scale(1.16); }

/* counts pill */
.reaction-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.04);
  padding: 6px 10px;
  border-radius: 999px;
  margin-right: 8px;
  font-size: 13px;
  transition: transform .12s ease, opacity .12s ease;
}

.emoji-sm { font-size: 16px; }
.count-number { display:inline-block; transition: transform .12s, opacity .12s; }
.reaction-count-pill .count-number.increment {
  transform: translateY(-4px) scale(1.03);
  opacity: 0.95;
}

/* Accessibility helpers */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* Media layout */
.post-card .mt-3.grid {
  display:grid;
  gap:8px;
}
@media (min-width: 640px) {
  .post-card .mt-3.grid.sm\:grid-cols-2 { grid-template-columns: repeat(2,1fr); }
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .post-card {
    margin: 0 4px;
    width: calc(100% - 8px);
    border-radius: 0.75rem;
    font-size: 1rem;
  }
  .post-card .p-4 {
    padding: 14px 12px;
  }
  .post-card .post-body {
    font-size: 1.05rem;
    line-height: 1.6;
  }
  .post-card .mt-3.grid {
    grid-template-columns: 1fr !important;
  }
  .post-card .mt-3.grid img {
    width: 100%;
    height: auto;
    max-height: 320px;
  }
  .post-card .post-action-area { font-size: 0.95rem; }
  .post-card .reaction-count-pill {
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}

/* Desktop scaling */
@media (min-width: 1024px) {
  .post-card {
    font-size: 1.05rem;
  }
  .post-card .post-body {
    font-size: 1.15rem;
    line-height: 1.65;
  }
  .post-card .mt-3.grid img {
    max-height: 420px;
  }
}

/* View count */
.post-views-number {
  font-weight: 500;
  font-size: 0.95rem;
  color: #475569;
}


/* Reaction toggle container */
.reaction-toggle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
    justify-items: center;
    align-items: center;
    padding: 10px;
}

/* Each reaction item */
.reaction-toggle .reaction {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.reaction-toggle .reaction:hover {
    transform: scale(1.2);
}

/* Mobile: force exactly 4 per row */
@media (max-width: 768px) {
    .reaction-toggle {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* Reaction picker responsive grid */
@media (max-width: 640px) {
  .reaction-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    justify-items: center;
  }
  .reaction-picker-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}


/* static/shares/css/share.css
   Refactored Soultrob share modal with modern animations & dark mode.
   Includes styles for the “share as image” option.
*/

.soul-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 12, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  padding: 1rem;
  backdrop-filter: blur(5px);
  opacity: 0;
  animation: fadeIn 0.15s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.soul-share-modal {
  width: min(480px, 96%);
  background: var(--card-bg, #ffffff);
  color: var(--text, #0b0b0b);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(2, 6, 23, 0.4);
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  transform: translateY(15px);
  opacity: 0;
  animation: popUp 0.25s ease forwards;
}

@keyframes popUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.soul-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--header-bg, #fafafa);
}

.soul-share-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.soul-share-close {
  background: transparent;
  border: none;
  font-size: 1.45rem;
  cursor: pointer;
  color: var(--text, #000);
  transition: opacity 0.2s;
}
.soul-share-close:hover { opacity: 0.65; }

.soul-share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 1rem;
}

.soul-share-option {
  background: rgba(0, 0, 0, 0.04);
  border: none;
  padding: 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, background 0.2s;
}
.soul-share-option:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.08);
}
.soul-share-option:focus {
  outline: 3px solid rgba(21, 156, 228, 0.2);
  outline-offset: 2px;
}

/* Special color for Share as Image */
.soul-share-option[data-platform="image"] {
  background: linear-gradient(145deg, #5b19b7, #2e0b61);
  color: #fff;
  font-weight: 700;
}
.soul-share-option[data-platform="image"]:hover {
  background: linear-gradient(145deg, #6622cc, #381477);
}

.soul-share-footer {
  padding: 0.6rem 1rem 1rem 1rem;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
}


/* bookmark css */

.bookmark-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  color: var(--text-secondary);
}

.bookmark-btn:hover {
  transform: scale(1.05);
  color: var(--accent-pink);
}

.bookmark-icon {
  font-size: 1.2em;
  transition: color 0.2s ease;
}
