/* ==========================================================================
   P4 — Single Resource + Sidebar
   ========================================================================== */

/* Sidebar download card */
.tttech-resource-sidebar { position: sticky; top: 100px; }

.tttech-dl-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,51,102,0.06);
}

.tttech-dl-cover {
    height: 180px;
    background: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eef2f7;
    overflow: hidden;
}
.tttech-dl-img { width: 100%; height: 100%; object-fit: cover; }
.tttech-dl-cover-placeholder i { font-size: 4em; color: var(--color-primary); opacity: 0.25; }

.tttech-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 16px 16px;
    width: calc(100% - 32px);
    transition: transform 0.3s ease;
}
/* Tăng specificity bằng parent chain — win Flatsome mà không cần !important */
.tttech-resource-sidebar .tttech-dl-card .tttech-dl-btn {
    margin: 24px 16px 16px;
}
/* Có cover ảnh — giảm margin-top vì cover đã có border-bottom tạo khoảng cách rồi */
.tttech-resource-sidebar .tttech-dl-card:has(.tttech-dl-cover) .tttech-dl-btn {
    margin-top: 16px;
}
.tttech-dl-btn:hover {
    transform: translateY(-2px);
}
.tttech-dl-btn i { font-size: 1.1em; }

/* Meta list */
.tttech-dl-meta {
    list-style: none;
    margin: 0 0 0;
    padding: 0 16px 12px;
    border-top: 1px solid var(--color-border-light);
}
.tttech-dl-meta li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-bg-light);
    font-size: 13px;
    gap: 8px;
}
.tttech-dl-meta li:last-child { border-bottom: none; }
.tttech-dl-meta-label {
    color: var(--color-text-muted);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.tttech-dl-meta a { color: var(--color-primary); text-decoration: none; }
.tttech-dl-meta a:hover { color: var(--color-accent); }

.tttech-dl-cats {
    padding: 12px 16px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.tttech-dl-cats .tttech-dl-meta-label {
    width: 100%;
    margin-bottom: 4px;
}

/* Back link */
.tttech-back-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 8px;
}
.tttech-back-link:hover { color: var(--color-primary); }

/* Single content */
.tttech-resource-single { padding: 0; }
.tttech-resource-video {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}
.tttech-resource-video iframe { width: 100% !important; border-radius: 8px; }
.tttech-resource-description {
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.tttech-section-title-sm {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tttech-section-title-sm i { color: var(--color-primary); }

/* Admin columns */
.column-tttech_source_type .dashicons { font-size: 16px; vertical-align: middle; }
