/* Social post detail — /social-posts/{shortcode} */

.social-post-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 20px 56px;
}

.social-post-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Back link */
.social-post-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #6b7280);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    transition: color 0.15s ease;
}

.social-post-back:hover {
    color: var(--nk-accent, #128A6B);
}

/* Hero card */
.social-post-hero-card {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.social-post-profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.social-post-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    padding: 2px;
    text-decoration: none;
    display: block;
}

.social-post-avatar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-card, #fff);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #111827);
    letter-spacing: -0.02em;
}

.social-post-profile-meta {
    min-width: 0;
    flex: 1;
}

.social-post-profile-names {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin-bottom: 6px;
}

.social-post-profile-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #111827);
    text-decoration: none;
}

a.social-post-profile-name:hover {
    color: var(--nk-accent, #128A6B);
}

.social-post-profile-handle {
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.social-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.social-post-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.1) 0%, rgba(253, 29, 29, 0.08) 50%, rgba(252, 176, 69, 0.1) 100%);
    color: #c13584;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.social-post-badge-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

.social-post-date {
    font-size: 13px;
    color: var(--text-tertiary, #9ca3af);
    font-weight: 500;
}

.social-post-title {
    font-size: clamp(1.35rem, 2.8vw, 1.9rem);
    line-height: 1.28;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary, #111827);
    margin: 0;
}

/* Two-column layout */
.social-post-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .social-post-layout {
        grid-template-columns: 1fr;
    }

    .social-post-aside {
        order: -1;
    }
}

/* Embed card */
.social-post-aside {
    position: sticky;
    top: 84px;
}

.social-post-embed-card {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.social-post-embed-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.015);
}

.social-post-embed-card-header h2 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary, #9ca3af);
    margin: 0;
    font-weight: 700;
}

.social-post-embed-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nk-accent, #128A6B);
    text-decoration: none;
    white-space: nowrap;
}

.social-post-embed-link:hover {
    text-decoration: underline;
}

.social-post-embed-body {
    position: relative;
    padding: 16px;
    min-height: 120px;
}

.social-post-embed-preview {
    position: absolute;
    inset: 16px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 0;
    opacity: 0.35;
    filter: blur(1px);
    pointer-events: none;
}

.social-post-embed-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-post-widget--instagram {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.social-post-widget--instagram .instagram-media {
    min-width: 0 !important;
}

/* Content panels */
.social-post-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-post-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.social-post-panel-icon {
    font-size: 18px;
    line-height: 1;
}

.social-post-panel-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin: 0;
    letter-spacing: -0.01em;
}

.social-post-panel-body,
.social-post-transcript-body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-primary, #1f2937);
}

.social-post-caption-body {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 20px 22px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary, #374151);
    white-space: pre-wrap;
    word-break: break-word;
}

.social-post-transcript-body p,
.social-post-caption-body p {
    margin: 0 0 14px;
}

.social-post-transcript-body p:last-child,
.social-post-caption-body p:last-child {
    margin-bottom: 0;
}

/* Pending transcript */
.social-post-pending-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    background: rgba(74, 144, 217, 0.04);
}

.social-post-pending-spinner {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(74, 144, 217, 0.2);
    border-top-color: var(--nk-accent, #128A6B);
    border-radius: 50%;
    animation: social-post-spin 0.8s linear infinite;
}

@keyframes social-post-spin {
    to { transform: rotate(360deg); }
}

.social-post-transcript-pending {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

/* Empty state */
.social-post-page--empty {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .social-post-page {
        padding: 16px 16px 48px;
    }

    .social-post-hero-card {
        padding: 18px 20px;
        border-radius: 16px;
    }

    .social-post-embed-card {
        border-radius: 16px;
    }

    .social-post-embed-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
