/**
 * Tool Sidebar — Cross-promotion contextual (desktop only)
 * Sidebar left com ferramentas, produtos, comunidades e diary teaser.
 *
 * Classes: .ferramenta-main-flex, .tool-sidebar, .tsl-*
 * Breakpoint: hidden abaixo de 1024px
 */

/* === Layout flex wrapper === */
.ferramenta-main-flex {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.with-sidebar .ferramenta-interface {
    flex: 1;
    min-width: 0;
}

/* === Sidebar === */
.tool-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 4px;
}

.tool-sidebar::-webkit-scrollbar {
    width: 4px;
}
.tool-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}

/* === Social Proof (topo) === */
.tsl-social-proof {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tsl-social-proof strong {
    font-weight: 700;
    color: #1e293b;
}

/* === Section === */
.tsl-section {
    margin-bottom: 18px;
}

.tsl-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

/* === Tool Links === */
.tsl-tool-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.15s, transform 0.1s;
    margin-bottom: 6px;
}
.tsl-tool-link:hover {
    background: #f1f5f9;
    transform: translateX(2px);
}

.tsl-tool-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}
.tsl-tool-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: #f1f5f9;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    flex-shrink: 0;
}

.tsl-tool-info {
    flex: 1;
    min-width: 0;
}
.tsl-tool-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    line-height: 1.3;
}
.tsl-tool-context {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    margin: 0;
}

/* === Product Cards === */
.tsl-product-card {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.15s;
    margin-bottom: 6px;
    border: 1px solid #f1f5f9;
}
.tsl-product-card:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.tsl-product-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

.tsl-product-info {
    flex: 1;
    min-width: 0;
}
.tsl-product-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 3px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tsl-product-price {
    font-size: 0.78rem;
    color: #16a34a;
    font-weight: 600;
    margin: 0;
}

/* === Community Items === */
.tsl-community-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.15s;
    margin-bottom: 4px;
}
.tsl-community-item:hover {
    background: #f1f5f9;
}

.tsl-community-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}
.tsl-community-info {
    flex: 1;
    min-width: 0;
}
.tsl-community-name {
    font-size: 0.83rem;
    font-weight: 600;
    margin: 0;
}
.tsl-community-members {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
}

/* === Diary Teaser === */
.tsl-diary-widget {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 10px;
    padding: 14px;
}
.tsl-diary-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b21a8;
    margin: 0 0 8px 0;
}
.tsl-diary-stat {
    font-size: 0.78rem;
    color: #7c3aed;
    margin: 0 0 4px 0;
}
.tsl-diary-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: #7c3aed;
    color: #fff;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.tsl-diary-cta:hover {
    background: #6d28d9;
    color: #fff;
}

/* === Onboarding Banner === */
.tsl-onboarding {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 16px;
    position: relative;
    animation: tslFadeIn 0.3s ease;
}
.tsl-onboarding-text {
    font-size: 0.82rem;
    color: #92400e;
    margin: 0 0 8px 0;
    padding-right: 20px;
}
.tsl-onboarding-cta {
    display: inline-block;
    padding: 5px 12px;
    background: #f59e0b;
    color: #fff;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.tsl-onboarding-cta:hover {
    background: #d97706;
    color: #fff;
}
.tsl-onboarding-dismiss {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #b45309;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@keyframes tslFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Responsive — hide below 1024px === */
@media (max-width: 1024px) {
    .tool-sidebar {
        display: none;
    }
    .ferramenta-main-flex {
        display: block;
    }
}
