/* ===== TCF Frontend Styles ===== */
.tcf-widget { font-family: inherit; }

/* Filters bar */
.tcf-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}
.tcf-search-wrap {
    position: relative;
    flex: 0 0 220px;
}
.tcf-search {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.tcf-search:focus { border-color: #999; }
.tcf-clear-search {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #aaa;
    line-height: 1;
}
.tcf-clear-search:hover { color: #333; }

/* Alphabet */
.tcf-alpha-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.tcf-alpha-btn {
    padding: 4px 7px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    color: #555;
    transition: all .15s;
    line-height: 1.4;
}
.tcf-alpha-btn:hover { background: #f0f0f0; color: #111; }
.tcf-alpha-btn.active { background: #111; color: #fff; border-color: #111; }

/* Body layout */
.tcf-body { display: flex; gap: 24px; align-items: flex-start; }
.tcf-sidebar-right { flex-direction: row-reverse; }
.tcf-sidebar {
    flex: 0 0 180px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px;
}
.tcf-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #999;
    margin-bottom: 10px;
}
.tcf-term-list { list-style: none; margin: 0; padding: 0; }
.tcf-term-list-item {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 5px;
    cursor: pointer;
    color: #555;
    transition: all .12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tcf-term-list-item:hover { background: #f5f5f5; color: #111; }
.tcf-term-list-item.active { background: #f0f0f0; color: #111; font-weight: 600; }

/* Main */
.tcf-main { flex: 1; min-width: 0; }
.tcf-results-info {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
    min-height: 18px;
}

/* Cards grid */
.tcf-cards-grid { display: grid; gap: 16px; }
.tcf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tcf-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tcf-cols-4 { grid-template-columns: repeat(4, 1fr); }
.tcf-cols-5 { grid-template-columns: repeat(5, 1fr); }
.tcf-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Card */
.tcf-card {
    display: block;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .15s;
}
.tcf-card:hover { border-color: #bbb; transform: translateY(-2px); }

.tcf-card-img {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
}
.tcf-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcf-fallback { font-size: 40px; line-height: 1; }

.tcf-badge {
    position: absolute;
    top: 8px; right: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.tcf-card-body { padding: 10px 12px 12px; }
.tcf-card-name { font-size: 14px; font-weight: 600; color: #111; line-height: 1.3; }
.tcf-card-subtitle { font-size: 12px; color: #777; margin-top: 3px; }
.tcf-card-count { font-size: 11px; color: #aaa; margin-top: 4px; }

/* No results */
.tcf-no-results { text-align: center; padding: 40px 20px; color: #aaa; font-size: 14px; }

/* Responsive */
@media (max-width: 768px) {
    .tcf-body { flex-direction: column; }
    .tcf-sidebar { flex: none; width: 100%; }
    .tcf-cards-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .tcf-filters-bar { flex-direction: column; align-items: stretch; }
    .tcf-search-wrap { flex: none; }
}
@media (max-width: 480px) {
    .tcf-cards-grid { grid-template-columns: 1fr !important; }
}

/* ===== JetEngine Connection Styles ===== */
.tcf-card-active {
    outline: 3px solid #4A90E2 !important;
    outline-offset: -3px;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74,144,226,0.25) !important;
    transition: all 0.2s ease;
}
.tcf-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tcf-card:hover {
    transform: translateY(-2px);
}

/* JetEngine Listing loading state */
.tcf-jet-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}
.tcf-jet-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' fill='none' stroke='%234A90E2' stroke-width='4' stroke-dasharray='50 30'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center center no-repeat;
    border-radius: inherit;
    z-index: 10;
}
