/**
 * Content Cross-Promotion Styles
 * Zones: tool banner (top), enriched sidebar, post-content "next steps" grid
 */

/* =====================================================
   ZONE 4: Tool Banner (Top of content)
   ===================================================== */
.ccr-tool-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    font-size: 0.92rem;
    animation: ccrFadeIn 0.4s ease;
}

.ccr-tool-banner-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.ccr-tool-banner-text {
    flex: 1;
    color: #0c4a6e;
    line-height: 1.4;
}

.ccr-tool-banner-text strong {
    color: #075985;
}

.ccr-tool-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #0ea5e9;
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.ccr-tool-banner-btn:hover {
    background: #0284c7;
    color: #fff;
    text-decoration: none;
}

.ccr-tool-banner-dismiss {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 1.1rem;
    line-height: 1;
}

.ccr-tool-banner-dismiss:hover {
    color: #64748b;
}

/* =====================================================
   SIDEBAR: Enriched sections
   ===================================================== */
.ccr-sidebar-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.ccr-sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ccr-sidebar-section-title-icon {
    font-size: 1rem;
}

/* --- Sidebar Tool Cards --- */
.ccr-tool-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.ccr-tool-card:last-child {
    margin-bottom: 0;
}

.ccr-tool-card:hover {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
    text-decoration: none;
    color: inherit;
}

.ccr-tool-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.ccr-tool-card-icon img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.ccr-tool-card-info {
    flex: 1;
    min-width: 0;
}

.ccr-tool-card-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ccr-tool-card-context {
    font-size: 0.76rem;
    color: #64748b;
    margin: 2px 0 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ccr-tool-card-badge {
    font-size: 0.7rem;
    color: #0ea5e9;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Sidebar Cross-Content Cards --- */
.ccr-cross-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.ccr-cross-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ccr-cross-item:hover {
    opacity: 0.85;
    text-decoration: none;
    color: inherit;
}

.ccr-cross-thumb {
    width: 56px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccr-cross-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ccr-cross-thumb-placeholder {
    font-size: 1.2rem;
}

.ccr-cross-info {
    flex: 1;
    min-width: 0;
}

.ccr-cross-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ccr-cross-type-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ccr-cross-type-badge.type-video { background: #fef2f2; color: #dc2626; }
.ccr-cross-type-badge.type-artigo { background: #f5f3ff; color: #7c3aed; }
.ccr-cross-type-badge.type-pdf { background: #f0fdf4; color: #16a34a; }
.ccr-cross-type-badge.type-livro { background: #fffbeb; color: #d97706; }

/* --- Sidebar Community Card --- */
.ccr-community-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.ccr-community-card:last-child {
    margin-bottom: 0;
}

.ccr-community-card:hover {
    border-color: #a855f7;
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.ccr-community-card-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.ccr-community-card-info {
    flex: 1;
}

.ccr-community-card-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #581c87;
    margin: 0;
}

.ccr-community-card-members {
    font-size: 0.74rem;
    color: #9333ea;
}

/* --- Sidebar Diary Teaser --- */
.ccr-diary-teaser {
    padding: 14px;
    background: linear-gradient(135deg, #312e81, #4338ca);
    border-radius: 10px;
    color: #fff;
    margin-bottom: 20px;
}

.ccr-diary-teaser-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ccr-diary-teaser-stat {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 4px 0;
}

.ccr-diary-teaser-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.ccr-diary-teaser-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
    text-decoration: none;
}

/* --- Social Proof Badge --- */
.ccr-stats-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
}

.ccr-stats-badge-icon {
    font-size: 1.2rem;
}

.ccr-stats-badge-text {
    font-size: 0.8rem;
    color: #065f46;
    font-weight: 600;
}

.ccr-stats-badge-number {
    color: #059669;
    font-weight: 700;
}

/* =====================================================
   ZONE 3: Post-Content "Next Steps" Grid
   ===================================================== */
.ccr-next-steps {
    margin: 32px 0;
    padding: 28px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.ccr-next-steps-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px;
    text-align: center;
}

.ccr-next-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.ccr-next-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 14px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: all 0.2s;
    min-height: 130px;
}

.ccr-next-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.ccr-next-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0ea5e9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ccr-next-card-label.label-tool { color: #0ea5e9; }
.ccr-next-card-label.label-video { color: #dc2626; }
.ccr-next-card-label.label-artigo { color: #7c3aed; }
.ccr-next-card-label.label-pdf { color: #16a34a; }
.ccr-next-card-label.label-livro { color: #d97706; }
.ccr-next-card-label.label-community { color: #9333ea; }
.ccr-next-card-label.label-diary { color: #4338ca; }
.ccr-next-card-label.label-product { color: #ea580c; }

.ccr-next-card-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ccr-next-card-meta {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: auto;
}

.ccr-next-card-cta {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0ea5e9;
    margin-top: auto;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .ccr-tool-banner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px;
    }

    .ccr-tool-banner-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 14px;
    }

    .ccr-next-steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ccr-next-card {
        padding: 14px 10px;
        min-height: 110px;
    }

    .ccr-sidebar-section {
        margin-bottom: 16px;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .ccr-next-steps-grid {
        grid-template-columns: 1fr;
    }

    .ccr-next-steps {
        padding: 20px 16px;
        margin: 24px 0;
    }
}

/* =====================================================
   ANIMATION
   ===================================================== */
@keyframes ccrFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ccr-sidebar-section {
    animation: ccrFadeIn 0.3s ease;
}

.ccr-next-steps {
    animation: ccrFadeIn 0.5s ease;
}
