/* ============================================================
   Custom Links Tables – Frontend Styles
   ============================================================ */
.clt-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1f36;
    max-width: 100%;
}

/* ── Filter Bar ──────────────────────────────────────────────── */
.clt-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 0 10px;
    border-bottom: 1px solid #edf0f7;
    margin-bottom: 6px;
}

.clt-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.clt-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: #fff;
    border: 1.5px solid #dde2f0;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
    font-family: inherit;
}

.clt-filter-pill:hover {
    border-color: #7c8cf8;
    color: #5c6bc0;
    background: #f5f6ff;
}

.clt-filter-pill.active {
    background: #5c6bc0;
    border-color: #5c6bc0;
    color: #fff;
}

.clt-filter-arrow {
    font-size: 10px;
    opacity: .7;
}

.clt-filter-select {
    padding: 7px 14px;
    border: 1.5px solid #dde2f0;
    border-radius: 100px;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    background: #fff;
    cursor: pointer;
    appearance: auto;
    transition: border-color .18s;
}

.clt-filter-select:focus {
    outline: none;
    border-color: #7c8cf8;
}

.clt-reset-btn {
    margin-left: auto;
    padding: 6px 14px;
    background: transparent;
    border: 1.5px solid #e5e7eb;
    border-radius: 100px;
    font-size: 12px;
    font-family: inherit;
    color: #9ca3af;
    cursor: pointer;
    transition: all .18s;
}

.clt-reset-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ── Slider Panels ───────────────────────────────────────────── */
.clt-slider-panel {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 4px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    max-width: 280px;
    position: relative;
    z-index: 10;
}

.clt-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.clt-slider-header span {
    font-weight: 600;
    font-size: 12.5px;
    color: #1a1f36;
}

.clt-close-panel {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 13px;
    padding: 0;
    line-height: 1;
}

.clt-close-panel:hover {
    color: #ef4444;
}

.clt-range-values {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.clt-range-values input {
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 12px;
    font-family: inherit;
    width: 100%;
    min-width: 0;
    color: #1a1f36;
    transition: border-color .2s;
}

.clt-range-values input:focus {
    outline: none;
    border-color: #7c8cf8;
}

.clt-range-sep {
    color: #9ca3af;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 12px;
}

.clt-slider {
    margin: 0 2px 10px;
}

/* noUiSlider custom styles */
.noUi-target {
    background: #edf0f7;
    border: none;
    box-shadow: none;
    height: 6px;
}

.noUi-connect {
    background: #5c6bc0;
}

.noUi-handle {
    border-radius: 50%;
    width: 18px !important;
    height: 18px !important;
    right: -9px !important;
    top: -7px !important;
    border: 2px solid #5c6bc0;
    box-shadow: 0 1px 4px rgba(92, 107, 192, .35);
}

.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

.clt-slider-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.clt-apply-range {
    background: #5c6bc0 !important;
    border-color: #5c6bc0 !important;
    color: #fff !important;
    border-radius: 5px !important;
    font-size: 11px !important;
    padding: 4px 12px !important;
    font-family: inherit !important;
    cursor: pointer;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.clt-clear-range {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 6px;
}

.clt-clear-range:hover {
    color: #ef4444;
}

/* ── Active Filter Badges ────────────────────────────────────── */
.clt-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 4px;
    padding: 6px 0 0;
}

.clt-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eef0ff;
    color: #5c6bc0;
    border-radius: 100px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

.clt-badge-remove {
    cursor: pointer;
    font-size: 13px;
    color: #7c8cf8;
    line-height: 1;
}

.clt-badge-remove:hover {
    color: #ef4444;
}

/* ── Results info row (below table) ── */
.clt-results-row {
    display: flex;
    align-items: center;
    padding: 12px 2px 0;
}

.clt-results-center {
    justify-content: center;
}

.clt-results-info {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

/* ── Search & Per Page Row ── */
.clt-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.clt-search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid #dde2f0;
    border-radius: 100px;
    padding: 6px 14px;
    flex: 1;
    /* Expand to fill remaining width */
    min-width: 0;
    transition: border-color .2s;
}

.clt-search-wrap:focus-within {
    border-color: #7c8cf8;
    box-shadow: 0 0 0 3px rgba(124, 140, 248, .15);
}

.clt-search-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.clt-search-input {
    border: none;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    width: 100%;
    min-width: 0;
    background: transparent;
}

.clt-per-page-wrap select {
    padding: 7px 12px;
    border: 1.5px solid #dde2f0;
    border-radius: 100px;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .2s;
}

.clt-per-page-wrap select:focus {
    outline: none;
    border-color: #7c8cf8;
}

/* ── Main Table ──────────────────────────────────────────────── */
.clt-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
}

.clt-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13.5px;
}

.clt-table thead tr {
    background: #f8f9fd;
    border-bottom: 2px solid #e8eaf0;
}

.clt-table thead th {
    padding: 13px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    white-space: nowrap;
    user-select: none;
}

.clt-table thead th.clt-sortable {
    cursor: pointer;
}

.clt-table thead th.clt-sortable:hover {
    color: #5c6bc0;
}

.clt-table thead th.sort-asc::after {
    content: " ↑";
    opacity: .7;
}

.clt-table thead th.sort-desc::after {
    content: " ↓";
    opacity: .7;
}

.clt-table tbody tr {
    border-bottom: 1px solid #f0f2f7;
    transition: background .15s;
}

.clt-table tbody tr:last-child {
    border-bottom: none;
}

.clt-table tbody tr:hover {
    background: #f8f9fd;
}

.clt-table tbody td {
    padding: 13px 14px;
    color: #374151;
    vertical-align: middle;
}

/* Site link cell */
.clt-site-link {
    color: #1a56db;
    text-decoration: none;
    font-weight: 500;
}

.clt-site-link:hover {
    text-decoration: underline;
    color: #1e40af;
}

/* Metric badges */
.clt-metric {
    display: inline-block;
    font-weight: 600;
    font-size: 13px;
    color: #1a1f36;
}

/* Contact button */
.clt-contact-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff !important;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .3px;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 2px 6px rgba(247, 147, 30, .35);
}

.clt-contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 147, 30, .45);
    color: #fff !important;
}

.clt-contact-none {
    display: inline-block;
    background: #e5e7eb;
    color: #9ca3af !important;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: default;
    letter-spacing: .3px;
}

/* Loading / empty states */
.clt-loading,
.clt-empty {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ── Pagination ──────────────────────────────────────────────── */
.clt-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 4px;
    flex-wrap: wrap;
    gap: 10px;
}

.clt-pagination-info {
    font-size: 13px;
    color: #6b7280;
}

.clt-pagination {
    display: flex;
    gap: 4px;
}

.clt-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    cursor: pointer;
    transition: all .15s;
    font-weight: 500;
}

.clt-page-btn:hover {
    border-color: #7c8cf8;
    color: #5c6bc0;
}

.clt-page-btn.active {
    background: #5c6bc0;
    border-color: #5c6bc0;
    color: #fff;
}

.clt-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .clt-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .clt-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .clt-search-wrap {
        width: 100% !important;
    }

    .clt-reset-btn {
        margin-left: 0;
    }

    .clt-pagination-wrap {
        justify-content: center;
    }
}

/* ============================================================
   THEME: Marketplace
   Activate via: Settings → Appearance → Marketplace
   All selectors scoped to .clt-theme-marketplace
   ============================================================ */

/* ── Base ────────────────────────────────────────────────────────── */
.clt-theme-marketplace {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mp-accent: #f97316;
    /* orange */
    --mp-accent2: #ea580c;
    --mp-text: #111827;
    --mp-muted: #6b7280;
    --mp-border: #e5e7eb;
}

/* ── Filter Bar ──────────────────────────────────────────────────── */
.clt-theme-marketplace .clt-filter-bar {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.clt-theme-marketplace .clt-filter-pill {
    border-radius: 6px;
    font-weight: 600;
    border-color: #d1d5db;
    background: #fff;
    color: var(--mp-text);
}

.clt-theme-marketplace .clt-filter-pill:hover {
    border-color: var(--mp-accent);
    color: var(--mp-accent);
    background: #fff8f3;
}

.clt-theme-marketplace .clt-filter-pill.active {
    background: var(--mp-accent);
    border-color: var(--mp-accent);
    color: #fff;
}

.clt-theme-marketplace .clt-filter-select {
    border-radius: 6px;
    border-color: #d1d5db;
}

.clt-theme-marketplace .clt-filter-select:focus {
    border-color: var(--mp-accent);
}

.clt-theme-marketplace .clt-reset-btn {
    border-radius: 6px;
    color: var(--mp-accent);
    border-color: var(--mp-accent);
    font-weight: 600;
}

.clt-theme-marketplace .clt-reset-btn:hover {
    background: var(--mp-accent);
    color: #fff;
    border-color: var(--mp-accent);
}

/* ── Search Row ──────────────────────────────────────────────────── */
.clt-theme-marketplace .clt-search-row {
    background: #f8fafc;
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.clt-theme-marketplace .clt-search-wrap {
    border-radius: 6px;
    border-color: #d1d5db;
    background: #fff;
}

.clt-theme-marketplace .clt-search-wrap:focus-within {
    border-color: var(--mp-accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}

.clt-theme-marketplace .clt-per-page-wrap select {
    border-radius: 6px;
    border-color: #d1d5db;
}

.clt-theme-marketplace .clt-per-page-wrap select:focus {
    border-color: var(--mp-accent);
}

/* ── Slider panel ────────────────────────────────────────────────── */
.clt-theme-marketplace .noUi-connect {
    background: var(--mp-accent);
}

.clt-theme-marketplace .noUi-handle {
    border-color: var(--mp-accent);
    box-shadow: 0 2px 6px rgba(249, 115, 22, .35);
}

.clt-theme-marketplace .clt-apply-range {
    background: var(--mp-accent) !important;
    border-color: var(--mp-accent) !important;
}

/* ── Active filter badges ────────────────────────────────────────── */
.clt-theme-marketplace .clt-badge {
    background: #fff8f3;
    color: var(--mp-accent);
}

.clt-theme-marketplace .clt-badge-remove {
    color: var(--mp-accent);
}

/* ── Results info ────────────────────────────────────────────────── */
.clt-theme-marketplace .clt-results-info {
    font-weight: 700;
    color: var(--mp-text);
    font-size: 14px;
}

/* ── Table wrapper ───────────────────────────────────────────────── */
.clt-theme-marketplace .clt-table-wrap {
    border-radius: 6px;
    box-shadow: none;
    border: 1px solid var(--mp-border);
}

/* ── Table header ────────────────────────────────────────────────── */
.clt-theme-marketplace .clt-table thead tr {
    background: #fff;
    border-bottom: 2.5px solid var(--mp-text);
}

.clt-theme-marketplace .clt-table thead th {
    font-size: 11px;
    font-weight: 800;
    color: var(--mp-text);
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 13px 14px;
}

.clt-theme-marketplace .clt-table thead th.clt-sortable:hover {
    color: var(--mp-accent);
}

.clt-theme-marketplace .clt-table thead th.sort-asc::after,
.clt-theme-marketplace .clt-table thead th.sort-desc::after {
    opacity: 1;
    color: var(--mp-accent);
}

/* ── Table body ──────────────────────────────────────────────────── */
.clt-theme-marketplace .clt-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

.clt-theme-marketplace .clt-table tbody tr:hover {
    background: #fff8f3;
}

.clt-theme-marketplace .clt-table tbody td {
    color: var(--mp-text);
    font-weight: 500;
    font-size: 14px;
    padding: 14px 14px;
}

/* Site link: blue & bold like marketplace */
.clt-theme-marketplace .clt-site-link {
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
}

.clt-theme-marketplace .clt-site-link:hover {
    color: #1d4ed8;
}

/* ── Contact / Buy button ────────────────────────────────────────── */
.clt-theme-marketplace .clt-contact-btn {
    background: var(--mp-accent);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    padding: 8px 14px;
    box-shadow: none;
}

.clt-theme-marketplace .clt-contact-btn::before {
    content: '🛒 ';
    font-size: 13px;
}

.clt-theme-marketplace .clt-contact-btn:hover {
    background: var(--mp-accent2);
    transform: none;
    box-shadow: 0 3px 8px rgba(249, 115, 22, .4);
}

/* ── Pagination ──────────────────────────────────────────────────── */
.clt-theme-marketplace .clt-page-btn {
    border-radius: 5px;
}

.clt-theme-marketplace .clt-page-btn:hover {
    border-color: var(--mp-accent);
    color: var(--mp-accent);
}

.clt-theme-marketplace .clt-page-btn.active {
    background: var(--mp-accent);
    border-color: var(--mp-accent);
}