/**
 * WCP IFS Account — Styles
 * Issue #4000: WooCommerce IFS Account Sections
 *
 * @author Olivier RAVEAU - Oliv.Ai
 * @date 2026-03-04
 */

/* ── IFS Badge in WC Sidebar ── */
.woocommerce-MyAccount-navigation ul li a[href*="ifs"]::after {
    content: 'IFS';
    display: inline-block;
    background: #e8572a;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

/* ── Section Wrapper ── */
.wcp-ifs-section {
    padding: 10px 0;
}
.wcp-ifs-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #1c1c1c;
}

/* ── JWT Gate ── */
.wcp-ifs-gate-card {
    text-align: center;
    padding: 48px 24px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
}
.wcp-ifs-gate-icon {
    font-size: 48px;
    color: #e8572a;
    margin-bottom: 16px;
    display: block;
}
.wcp-ifs-gate-card p {
    color: #555;
    font-size: 15px;
    margin-bottom: 20px;
}

/* ── Loading ── */
.wcp-ifs-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 15px;
}
.wcp-ifs-loading i {
    margin-right: 8px;
    color: #e8572a;
}

/* ── Error / Empty States ── */
.wcp-ifs-error,
.wcp-ifs-empty {
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
    font-size: 14px;
}
.wcp-ifs-error {
    background: #fef2f2;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}
.wcp-ifs-error i {
    margin-right: 6px;
}
.wcp-ifs-empty {
    background: #f8f9fa;
    color: #888;
}
.wcp-ifs-empty i {
    margin-right: 8px;
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

/* ── Toolbar ── */
.wcp-ifs-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
    gap: 8px;
}
.wcp-ifs-filter {
    padding: 6px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

/* ── DataTable Override ── */
.wcp-ifs-table thead th {
    background: #1c1c1c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border: none;
}
.wcp-ifs-table tbody td {
    padding: 10px 14px;
    font-size: 13px;
    vertical-align: middle;
}
.wcp-ifs-table tbody tr:hover {
    background: #f8f9fa;
}

/* ── Badges ── */
.wcp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}
.wcp-badge--paid {
    background: #d4edda;
    color: #198754;
}
.wcp-badge--pending {
    background: #fff3cd;
    color: #856404;
}
.wcp-badge--overdue {
    background: #f8d7da;
    color: #dc3545;
}
.wcp-badge--draft {
    background: #e2e3e5;
    color: #6c757d;
}

/* ── Buttons ── */
.wcp-btn-sm {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}
.wcp-btn-sm:hover {
    background: #f0f0f0;
    border-color: #ccc;
}
.wcp-btn-sm--danger {
    color: #dc3545;
    border-color: #f5c6cb;
}
.wcp-btn-sm--danger:hover {
    background: #fef2f2;
    color: #b02a37;
}

/* ── Payment Cards Grid ── */
.wcp-ifs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.wcp-ifs-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1.5px solid #eee;
    border-radius: 10px;
    transition: all 0.2s;
}
.wcp-ifs-card:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.wcp-ifs-card--default {
    border-color: #198754;
    background: #f0fdf4;
}
.wcp-ifs-card-icon {
    color: #555;
    min-width: 40px;
    text-align: center;
}
.wcp-ifs-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wcp-ifs-card-number {
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1c;
    letter-spacing: 1px;
}
.wcp-ifs-card-expiry {
    font-size: 12px;
    color: #888;
}
.wcp-ifs-card-name {
    font-size: 12px;
    color: #666;
}
.wcp-ifs-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

/* ── Detail Modal ── */
.wcp-ifs-detail h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1c1c1c;
}
.wcp-ifs-detail p {
    margin: 6px 0;
    font-size: 14px;
    color: #555;
}
.wcp-ifs-detail p strong {
    color: #333;
    min-width: 100px;
    display: inline-block;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .wcp-ifs-cards-grid {
        grid-template-columns: 1fr;
    }
    .wcp-ifs-card {
        flex-wrap: wrap;
    }
    .wcp-ifs-card-actions {
        width: 100%;
        margin-top: 8px;
        justify-content: flex-end;
    }
    .wcp-ifs-toolbar {
        flex-direction: column;
    }
}
