/* ==========================================================================
   Post Detail Page Styles
   Uses Bootstrap classes for layout; this file handles:
   - Rich content rendering (.post-full-content)
   - Locked content preview gradient
   - Action button interactive states
   - Back link hover
   ========================================================================== */

/* ---------- Back link hover ---------- */
.post-back-link {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.post-back-link:hover {
    color: var(--color-primary-600, #4f46e5) !important;
    background: var(--color-primary-50, rgba(99, 102, 241, 0.06));
}

/* ---------- Rich content (.post-full-content) ---------- */
.post-full-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text-primary, #1f2937);
    word-break: break-word;
    overflow-wrap: break-word;
}

.post-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin: 1rem 0;
    display: block;
}

.post-full-content iframe,
.post-full-content video,
.post-full-content embed,
.post-full-content object {
    max-width: 100%;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.post-full-content iframe {
    width: 100%;
    min-height: 400px;
    border: none;
}

.post-full-content h1,
.post-full-content h2,
.post-full-content h3,
.post-full-content h4 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary, #1f2937);
}

.post-full-content p {
    margin-bottom: 0.75rem;
}

.post-full-content ul,
.post-full-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-full-content blockquote {
    border-left: 3px solid var(--color-primary-400, #818cf8);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--color-text-secondary, #6b7280);
    font-style: italic;
}

.post-full-content pre {
    background: var(--color-gray-50, #f9fafb);
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.post-full-content code {
    background: var(--color-gray-100, #f3f4f6);
    padding: 2px 6px;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.post-full-content pre code {
    background: none;
    padding: 0;
}

.post-full-content a {
    color: var(--color-primary-600, #4f46e5);
    text-decoration: underline;
}

.post-full-content a:hover {
    color: var(--color-primary-700, #4338ca);
}

/* ---------- Locked content preview gradient ---------- */
.post-locked-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--color-surface, #fff));
    pointer-events: none;
}

/* ---------- Action buttons ---------- */
.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-tertiary, #9ca3af);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    border-radius: 0.375rem;
    line-height: 1;
}

.post-action-btn:hover {
    color: var(--color-primary-600, #4f46e5);
    background: var(--color-primary-50, rgba(99, 102, 241, 0.06));
}

.post-action-btn.active,
.post-action-btn.liked {
    color: var(--color-primary-600, #4f46e5);
}

.post-action-btn i {
    font-size: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .post-detail-wrapper {
        padding: 1rem 0.75rem;
    }

    .post-detail-wrapper .card {
        padding: 1.25rem 1rem !important;
    }

    .post-full-content {
        font-size: 0.875rem;
        line-height: 1.7;
    }

    .post-full-content iframe {
        min-height: 220px;
    }

    .post-action-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .post-actions-bar .d-flex.gap-3 {
        gap: 0.75rem !important;
    }
}

/* ---------- Poll inside detail ---------- */
.post-detail-wrapper .poll-container {
    margin-top: 1.25rem;
}
