/* ================================================================
   LandOfCrypto – FaucetPay List Plugin  |  faucet-list.css
   ================================================================ */

/* ── Reset & base ─────────────────────────────────────────────── */
.loc-fp-wrap *,
.loc-fp-wrap *::before,
.loc-fp-wrap *::after {
    box-sizing: border-box;
}

.loc-fp-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a2e;
    max-width: 100%;
}

/* ── Stats row ────────────────────────────────────────────────── */
.loc-fp-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .loc-fp-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.loc-fp-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.loc-fp-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 6px;
}

.loc-fp-stat-val {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.loc-fp-stat-val small {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
}

.loc-fp-stat-small {
    font-size: 15px !important;
}

.loc-fp-green {
    color: #16a34a !important;
}

/* ── Coin tabs ────────────────────────────────────────────────── */
.loc-fp-coin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.loc-fp-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #64748b;
    background: #fff;
    transition: all 0.15s ease;
}

.loc-fp-tab:hover {
    border-color: var(--tab-color, #16a34a);
    color: var(--tab-color, #16a34a);
    text-decoration: none;
}

.loc-fp-tab--active {
    border-color: var(--tab-color, #16a34a);
    color: var(--tab-color, #16a34a);
    background: rgba(22, 163, 74, 0.06);
}

.loc-fp-tab-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Controls bar ─────────────────────────────────────────────── */
.loc-fp-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.loc-fp-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.loc-fp-search-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

.loc-fp-search {
    width: 100%;
    padding: 8px 10px 8px 34px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #1a1a2e;
    outline: none;
    transition: border-color 0.15s;
}

.loc-fp-search:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.loc-fp-sort {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    outline: none;
}

.loc-fp-sort:focus {
    border-color: #16a34a;
}

.loc-fp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
    white-space: nowrap;
}

.loc-fp-toggle input[type="checkbox"] {
    accent-color: #16a34a;
    width: 15px;
    height: 15px;
}

.loc-fp-count-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Table ────────────────────────────────────────────────────── */
.loc-fp-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
}

.loc-fp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 620px;
}

.loc-fp-table thead {
    background: #f8fafc;
}

.loc-fp-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.loc-fp-table th:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.loc-fp-table th.loc-fp-th--sorted {
    color: #16a34a;
}

.loc-fp-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    vertical-align: middle;
}

.loc-fp-table tr:last-child td {
    border-bottom: none;
}

.loc-fp-row:hover td {
    background: #f8fafc;
}

.loc-fp-row--disabled td {
    opacity: 0.55;
}

/* ─ Name cell ─ */
.loc-fp-td-name {
    min-width: 200px;
}

.loc-fp-row-num {
    display: inline-block;
    width: 24px;
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
}

.loc-fp-faucet-link {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loc-fp-faucet-link:hover {
    color: #16a34a;
    text-decoration: underline;
}

.loc-fp-ext {
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.15s;
}

.loc-fp-row:hover .loc-fp-ext {
    opacity: 1;
}

.loc-fp-url {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 1px;
}

/* ─ Timer ─ */
.loc-fp-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* ─ Reward ─ */
.loc-fp-reward {
    font-family: "SF Mono", "Fira Code", Consolas, monospace;
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #374151;
}

/* ─ Health bar ─ */
.loc-fp-health {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.loc-fp-health-bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.loc-fp-health-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.loc-fp-health-fill--high { background: #16a34a; }
.loc-fp-health-fill--mid  { background: #ca8a04; }
.loc-fp-health-fill--low  { background: #dc2626; }

.loc-fp-health-num {
    font-size: 12px;
    font-weight: 700;
    min-width: 26px;
    text-align: right;
}

.loc-fp-health-num--high { color: #16a34a; }
.loc-fp-health-num--mid  { color: #ca8a04; }
.loc-fp-health-num--low  { color: #dc2626; }

/* ─ Empty state ─ */
.loc-fp-empty {
    text-align: center;
    padding: 40px 20px !important;
    color: #9ca3af;
    font-size: 15px;
}

/* ── Paginacija ───────────────────────────────────────────────── */
.loc-fp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.loc-fp-page-btns {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.loc-fp-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loc-fp-page-btn:hover:not(:disabled) {
    border-color: #16a34a;
    color: #16a34a;
    background: #f0fdf4;
}

/* Active page — strong overrides to survive theme resets */
.loc-fp-pagination .loc-fp-page-btn--active,
.loc-fp-page-btns .loc-fp-page-btn--active {
    border-color: #16a34a !important;
    background: #16a34a !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4) !important;
    transform: scale(1.12);
    pointer-events: none;
    min-width: 40px !important;
    height: 40px !important;
    cursor: default !important;
    outline: 3px solid rgba(22,163,74,0.25) !important;
    outline-offset: 1px !important;
}

.loc-fp-page-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.loc-fp-page-ellipsis {
    padding: 0 4px;
    color: #9ca3af;
    font-size: 16px;
    line-height: 36px;
}

/* "Page X of Y · N faucets" info line */
.loc-fp-page-info {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Current page pill next to page info */
.loc-fp-page-current {
    display: inline-flex;
    align-items: center;
    background: #16a34a;
    color: #fff;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* ── Hub – coin grid ──────────────────────────────────────────── */
.loc-fp-coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.loc-fp-coin-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.18s ease;
    text-align: center;
}

.loc-fp-coin-card:hover {
    border-color: #16a34a;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: #0f172a;
}

.loc-fp-coin-icon {
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    flex-shrink: 0;
    position: relative;
}

/* Coin image — transparent PNG, no clipping */
.loc-fp-coin-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    display: block;
}

/*
 * Fallback letter shown when coin image fails to load.
 * Default: hidden via CSS (display:none). JS onerror adds class .is-visible.
 * We do NOT rely on inline style="display:none" — some security plugins strip inline styles.
 */
.loc-fp-coin-fallback {
    display: none;           /* hidden by default in CSS, not inline style */
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--fallback-color, #888);
}
.loc-fp-coin-fallback.is-visible {
    display: flex;           /* shown when JS adds this class via onerror */
}

/* Coin icon in tab bar — smaller */
.loc-fp-tab-icon {
    width: 16px;
    height: 16px;
    background: transparent;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.loc-fp-tab-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    background: transparent;
    display: block;
}
.loc-fp-tab-icon .loc-fp-coin-fallback {
    font-size: 9px;
}

.loc-fp-coin-sym {
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
}

.loc-fp-coin-name {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.loc-fp-coin-count {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

.loc-fp-coin-count strong {
    color: #16a34a;
}

/* ── Live dot & footer ────────────────────────────────────────── */
.loc-fp-footer-note {
    margin-top: 14px;
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.loc-fp-footer-note a {
    color: #64748b;
}

.loc-fp-live-dot {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    flex-shrink: 0;
    animation: loc-fp-pulse 2s ease-in-out infinite;
}

@keyframes loc-fp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ── Affiliate badge (green circle with "A") ──────────────────── */
.loc-fp-ref-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #16a34a;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    margin-left: 5px;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
    cursor: default;
}

/* ── Sort header arrows ───────────────────────────────────────── */
.loc-fp-table th[data-sort] {
    position: relative;
    padding-right: 22px !important;
}
.loc-fp-table th[data-sort]::after {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.3;
    transition: opacity 0.15s;
}
.loc-fp-table th[data-sort]:hover::after          { opacity: 0.6; }
.loc-fp-table th.loc-fp-th--sorted-desc::after    { content: '↓'; opacity: 1; color: #16a34a; }
.loc-fp-table th.loc-fp-th--sorted-asc::after     { content: '↑'; opacity: 1; color: #16a34a; }
.loc-fp-table th.loc-fp-th--sorted-desc,
.loc-fp-table th.loc-fp-th--sorted-asc            { color: #16a34a; }

/* ── Loading state ────────────────────────────────────────────── */
.loc-fp-loading {
    text-align: center;
    padding: 30px;
    color: #64748b;
}

.loc-fp-loading::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: loc-fp-spin 0.7s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes loc-fp-spin {
    to { transform: rotate(360deg); }
}

/* ── Dark mode ────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .loc-fp-wrap { color: #e2e8f0; }
    .loc-fp-stat { background: #1e293b; border-color: #334155; }
    .loc-fp-stat-val { color: #f1f5f9; }
    .loc-fp-tab { background: #1e293b; border-color: #334155; color: #94a3b8; }
    .loc-fp-search, .loc-fp-sort { background: #1e293b; border-color: #334155; color: #e2e8f0; }
    .loc-fp-table thead { background: #1e293b; }
    .loc-fp-table th { color: #94a3b8; }
    .loc-fp-table td { color: #cbd5e1; border-color: #1e293b; }
    .loc-fp-row:hover td { background: #1e293b; }
    .loc-fp-table-wrap { border-color: #334155; }
    .loc-fp-reward { background: #334155; color: #e2e8f0; }
    .loc-fp-faucet-link { color: #f1f5f9; }
    .loc-fp-health-bar { background: #334155; }
    .loc-fp-page-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
    .loc-fp-page-btn--active { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; box-shadow: 0 2px 8px rgba(22,163,74,0.4) !important; }
    .loc-fp-coin-card { background: #1e293b; border-color: #334155; color: #e2e8f0; }
    .loc-fp-coin-card:hover { border-color: #16a34a; }
    .loc-fp-coin-sym { color: #f1f5f9; }
    .loc-fp-pagination { border-color: #334155; }
}

/* ── Visit Faucet button ──────────────────────────────────────── */
.loc-fp-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #16a34a;
    color: #fff !important;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
    border: none;
    cursor: pointer;
}
.loc-fp-visit-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
    text-decoration: none !important;
    color: #fff !important;
}
.loc-fp-row--disabled .loc-fp-visit-btn {
    background: #9ca3af;
    pointer-events: none;
}

/* ── Faucet name (now non-linked) ─────────────────────────────── */
.loc-fp-faucet-name {
    display: inline;
    font-weight: 600;
    color: #0f172a;
}

/* ── Bottom description block ─────────────────────────────────── */
.loc-fp-bottom-desc {
    margin-top: 32px;
    padding: 24px 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.75;
    color: #374151;
}
.loc-fp-bottom-desc h2,
.loc-fp-bottom-desc h3 {
    margin-top: 0;
    color: #0f172a;
}

@media (prefers-color-scheme: dark) {
    .loc-fp-faucet-name { color: #f1f5f9; }
    .loc-fp-bottom-desc { background: #1e293b; border-color: #334155; color: #cbd5e1; }
    .loc-fp-bottom-desc h2, .loc-fp-bottom-desc h3 { color: #f1f5f9; }
}

/* ── Ad banner rows ───────────────────────────────────────────── */
.loc-fp-ad-row {
    background: transparent !important;
}
.loc-fp-ad-cell {
    padding: 12px 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    text-align: center;
}
.loc-fp-ad-cell > * {
    max-width: 100%;
}
